Here is a more flexible functional representation of numerals, courtesy Steensgaard-Madsen [1989], but written in Fexl:<p><pre><code>  \zero = (\zero\succ zero)
  \succ = (\n \zero\succ succ n)
</code></pre>
This delays the binding of the handler functions (zero and succ) until each step instead of deciding once way up at the top.<p>Addition is easy:<p><pre><code>  \add = (\x\y x y \p succ (add p y))
</code></pre>
As is multiplication:<p><pre><code>  \mul = (\x\y x 0 \p add y (mul p y))
</code></pre>
Now unary notation is fine for some things, but when I'm using arbitrarily large numbers in Fexl I use a binary notation (lists of bits), with representations as follows:<p><pre><code>  []    = 0
  [F|N] = 2*N   (where N != 0)
  [T|N] = 2*N+1
</code></pre>
In that notation addition is a little harder but not too bad:<p><pre><code>  \add = (\x\y x y \xb\xn y x \yb\yn
      \z=(add xn yn)
      xb
          (yb [F,T|z] [T|z])
          (yb [T|z] [F|z]))
</code></pre>
Multiplication is:<p><pre><code>  \twice = (\x x [] \_\_ [F|x])

  \mul = (\x\y x y \xb\xn y x \yb\yn
      \z=(twice; mul xn yn)
      xb
          (yb [T|add xn; add yn z] [F|add yn z])
          (yb [F|add xn z] [F|z]))
</code></pre>
[The ';' you see there is the Fexl "right-pivot" operator, a syntactic device for avoiding right-nesting.  For example, (add 1; add 2; add 3; 0) is a shorthand for (add 1 (add 2 (add 3 0))).  Also the notation [x|y] is a shorthand for (cons x y), where cons = (\head\tail \null\cons cons head tail).]<p>You can also harness the full power of the <i>computable numbers</i>, which is how you do the so-called "real" numbers on a physical computing device.  A computable number is a pair of lists of bits (T or F).  One list is the integer part and the other is the fractional part.  The fractional part can be infinite, allowing exact representation of numbers like pi and e.  (Come to think of it you could  have an infinite integer part as well, which might actually be useful somehow.)<p>If you're careful to avoid non-termination you can do useful work with lazily evaluated computable numbers.  Something like (add pi e) will work just fine and give you an exact result to any number of places you desire.  On the other hand (equal pi pi) will loop forever, searching futilely for two bits which disagree.  But when you're looking for "close enough" you can just apply (clip 20) to the numbers and then compare them.