Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - mantissa(<expn>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 MANTISSA(<expN>)
 Evaluates the memory representation of <expN>.
 Returns <expN> number between 1 and 1.999... mantissa of parameter.

 Useful for tracing numeric accuracy problems due to the rounding
 of floating-point representation.

 Clipper represents floating-point numbers in an 8-byte (64-bit) format.
 The bits are used as follows:

    Bit 63:      sign of the number (0 = positive, 1 = negative)
    Bits 62-52:  exponent of the number plus 1023 (i.e., highest power
                    of 2 smaller than the number)
    Bits 51-0:   mantissa of the number (i.e., binary digits to the
                    right of the binary point).  The integer bit to the
                    left of the binary point is implied, and is always
                    assumed to be 1.

 The formula is MANTISSA( <expN> ) * 2(EXPONENT( <expN> )) = <expN>

 * Evaluate the number between 1 and 1.999... that is used to represent 100.
 ? MANTISSA( 100 )    && returns 1.56


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: EXPONENT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson