Converting to and from external representations

Variable *PRECISION* Default precision.

Macro WITH-PRECISION Evalute BODY with *precision* bound to PREC.

Function DECIMAL-FROM-FLOAT Convert FLOAT to an exact value with precision PRECISION using ROUNDING-METHOD to do any neccessary rounding.

Function FLOAT-FROM-DECIMAL Convert the exact decimal value DECIMAL to a (not neccassily equal) floating point value.

Rounding functions

Function ROUND-DOWN Round towards 0.

Function ROUND-HALF-UP Round towards the nearest value allowed with the current precision.

Function ROUND-HALF-EVEN Round towards the nearest value allowed with the current precision.

Function ROUND-CEILING Round towards positive infintity

Function ROUND-FLOOR Round towards negative infinity.

Function ROUND-HALF-DOWN Round towards the nearest legal value.

Function ROUND-UP Round away from 0.