Explore
Exact arithmetic, free-form
Type anything the R template reads and press Enter. Each answer shows its type and, under every form, the ways Core can write it: fraction, mixed number, repeating decimal, continued fraction, interval forms. Name a value with a = 1/7 and use a later; ans is the last answer. The base menu reads unprefixed literals in another base (R.base) and adds that base's expansion to the forms.
Things to try
| type | what it shows |
|---|---|
| 1/97 | a repeating decimal with a 96-digit period |
| a = -1:2 then a * a and a ^ 2 | interval products: * treats the factors as independent, ^ is the image of one value |
| 3.~7~15~1~292 | a continued fraction for an approximation of π |
| 2^-10 + 0.#9 | 0.#9 is exactly 1 |
| 1.41421356? ^ 2 | a certified approximation: the guess and an enclosure that must contain the true square |
| 1/3:1/2:2/3 | a betweenness chain: true |
| 30! / 2^26 | large exact integers and fractions |
The explorer uses R, so it reads numbers and the operators + - * / ^ ! !! :. For method calls, loops and functions use the code box below; it runs JavaScript with the whole library in scope.
Try itEdit the code and run it with
@ratmath/core in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.