Did you know ... Search Documentation:
Pack canny_tudor -- prolog/ieee/754.pl
PublicShow source
 ieee_754_float(+Bits, ?Word, ?Float) is det
ieee_754_float(-Bits, ?Word, ?Float) is nondet
Performs two-way pack and unpack for IEEE 754 floating-point numbers represented as words.

Not designed for performance. Uses CLP(FD) for bit manipulation. and hence remains within the integer domain. Float arithmetic applies outside the finite-domain constraints.

Arguments:
Word- is a non-negative integer. This implementation does not handle negative integers. Negative support implies a non-determinate solution for packing. A positive and negative answer exists for any given Float.
Sig- is the floating-point significand between plus and minus 1. Uses Sig rather than Mantissa; Sig short for Significand, another word for mantissa.