Ratio syntax

Factor handbook » The language » Syntax » Literals » Number syntax

Factor handbook » The language » Syntax » Literals » Number syntax

Prev: | Integer syntax |

Next: | Float syntax |

The printed representation of a ratio is a pair of integers separated by a slash ( / ). A ratio can also be written as a proper fraction by following an integer part with + or - (matching the sign of the integer) and a ratio. No intermediate whitespace is permitted within a ratio literal. Here are some examples:

More information on ratios can be found in Rational numbers.

75/33
1/10
1+1/3
-10-1/7

More information on ratios can be found in Rational numbers.

This documentation was generated offline from a
`load-all`

image. If you want, you can also
browse the documentation from within the UI developer tools. See
the Factor website
for more information.

Factor 0.99 x86.64 (2203, heads/master-424edf64aa, Mar 8 2023 13:48:50)