### User Tools

A PCRE internal error occured. This might be caused by a faulty plugin

# Differences

This shows you the differences between two versions of the page.

 cl:functions:numerator [2019/06/15 02:00] cl:functions:numerator [2020/05/28 19:00] (current) Line 1: Line 1: + ====== Function NUMERATOR, DENOMINATOR ====== + + ====Syntax==== + * **numerator ** //​rational//​ → //​numerator// ​ + * **denominator** //​rational//​ → //​denominator//​ + + ====Arguments and Values==== + * //​rational//​ - a //​[[CL:​Glossary:​rational]]//​. + * //​numerator//​ - an //​[[CL:​Glossary:​integer]]//​. + * //​denominator//​ - a positive //​[[CL:​Glossary:​integer]]//​. + + ====Description==== + **numerator** and **denominator** reduce //​rational//​ to canonical form and compute the numerator or denominator of that number. + + **numerator** and **denominator** return the numerator or denominator of the canonical form of //​rational//​. + + If //​rational//​ is an //​[[CL:​Glossary:​integer]]//,​ **numerator** returns //​rational//​ and **denominator** returns 1. + + ====Examples==== ​ + <​blockquote> ​ + (numerator 1/2) 1 + (denominator 12/36) 3 + (numerator -1) -1 + (denominator ([[CL:​Functions:​math-divide|/​]] -33)) 33 + (numerator ([[CL:​Functions:​math-divide|/​]] 8 -6)) -4 + (denominator ([[CL:​Functions:​math-divide|/​]] 8 -6)) 3 + ​ + + ====Side Effects==== + None. + + ====Affected By==== + None. + + ====Exceptional Situations==== + None. + + ====See Also==== + * **[[CL:​Functions:​math-divide|Function /]]** + + ====Notes==== ​ + <​blockquote> ​ + (gcd (numerator x) (denominator x)) 1 + ​ +