OpenMusic Reference
numerator
numerator
(lisp module) -- returns the numerator of the canonical reduced form of rational .
Syntax
numerator rational
Inputs
name | data type(s) | comments |
---|---|---|
rational | a rational |
Output
output | data type(s) | comments |
---|---|---|
first | an integer |
Description
Returns the top half of a fraction expressed as a/b. The fraction is automatically converted to the canonical reduced form, that is, both the numerator and denominator are divided by their highest common divisor, if one exists. 2/4 , for example, would be converted to 1/2 before the denominator is dropped. numerator of an integer returns the integer itself.
Prev | Home | Next |
---|---|---|
nth-random | Up | om^ |