Surreal Numbers

Lloyd Allison
April 2026

Surreal Numbers were invented by John Conway [Con75, Rob15]. The calculator below uses recursive data-structures [All89, All93] and lazy evaluation to carry out arithmetic on surreal numbers quite quickly as described in [All26]. Note, a "short" surreal number can be described by a meaningful string, e.g., "S(7/4)" or 1 3/4, for readability but that is just for human benefit and is not used in the actual surreal arithmetic.

Reverse-Polish Calculator

The calculator below is stack based.
You can enter a surreal number in the field labelled 'surreal:', either in <|> notation or as one of a very few named numbers (ZERO, ONE, TWO, THREE, FOUR, NEG1, NEG2, HALF, QTR) and
select an operation (push, pop, +, −, ×). An arithmetic operation acts on elements at the top of the stack and leaves its result on the stack.
A generation may be shawn as, for example, 'g8'.
Calculating surreal numbers up to 8×8=64 is reasonably quick but I recommend not going much beyond that.

surreal:
↓    
  stack:
operation:            

messages:
   

References

[All26] Lloyd Allison, 'Surreal Arithmetic, Lazily', arxiv:2604.17885, April 2026.
[All93] Lloyd Allison, 'Applications of Recursively Defined Data Structures', Australian Computer Journal, 25(1), pp.14-20, arxiv:2206.12795, 1993.
Also see [more].
[All89] Lloyd Allison, 'Circular Programs and Self-Referential Structures', Software Practice & Experience, 19(2), pp.99-109, doi:10.1002/spe.4380190202 or arxiv:2403.01866, February 1989.
Also see [more].
[Con75] John Horton Conway, 'On Numbers and Games', Academic Press, isbn:978-0121863500, 1975 (and second edition isbn:isbn:1568811276, Taylor and Francis, 2001).
[Rob15] Siobhan Roberts, 'Genius at Play: The Curious Mind of John Horton Conway', Bloomsbury, 2015, and Princeton University Press, jstor:jj.14527547, 2024.
— a biography of JHC.