Convert decimal number to rational: Difference between revisions

Content added Content deleted
(→‎{{header|Factor}}: edit whitespace, show all imports, and simplify a bit)
Line 687: Line 687:


=={{header|Factor}}==
=={{header|Factor}}==
<lang factor>
<lang factor>USING: kernel math.floating-point prettyprint ;

USE: math.floating-point
{ 0.9054054 0.518518 0.75 } [ double>ratio ] map [ . ] each
0.9054054 0.518518 0.75 [ double>ratio . ] tri@</lang>
</lang>
{{out}}
{{out}}
<pre>
<pre>