Crate surreal

Source
Expand description

Implementation of J. H. Conway’s surreal numbers, as explained in the book Surreal Numbers by Donald Knuth. This crate provides an interface to the rules and theorems in the book, as well as a comprehensive surreal type.

Structs§

Surreal
A struct to represent surreal numbers with non-infinite sets.
SurrealInf
A struct to represent surreal numbers with at least one infinite set.

Functions§

ftos
Converts a floating-point number into a surreal number.
is_divisible
Tests if a division will produce a result with finite sets. Useful in making sure a division of surreal numbers won’t panic.
is_pseudo
Tests if a given input is a pseudo-surreal number (created with surreal::Surreal::pseudo).
stof
Converts a surreal number (with non-infinite sets) into a floating-point number.