Previous Up Next

6.7.1  Transform a floating point number into a rational: exact float2rational

Rational numbers can be approximated by floating point numbers, but since floating point numbers are not exact, they can’t typically be converted back to the original rational number. However, the float2rational command will try convert a floating point to a nearby rational number.
exact is a synonym for float2rational.


Examples.


Previous Up Next