Arithmetic/Rational: Difference between revisions
Content deleted Content added
→{{header|TI-89 BASIC}}: added zkl |
Frink |
||
Line 1,112: | Line 1,112: | ||
496 |
496 |
||
8128</pre> |
8128</pre> |
||
=={{header|Frink}}== |
|||
Rational numbers are built into Frink and the numerator and denominator can be arbitrarily-sized. They are automatically simplified into simplest form, and collapsed into integers if necessary. All functions in the language can work with rational numbers. |
|||
<lang frink> |
|||
1/2 + 2/3 |
|||
// 7/6 (approx. 1.1666666666666667) |
|||
1/2 + 1/2 |
|||
// 1 |
|||
1/sextillion |
|||
// 1/1000000000000000000000 (exactly 1e-21) |
|||
</lang> |
|||
=={{header|GAP}}== |
=={{header|GAP}}== |