home *** CD-ROM | disk | FTP | other *** search
- /*********
- * MANTISSA.C
- *
- * by Ralph Davis
- * modified by Tom Rettig
- *
- * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
- *
- * Syntax: MANTISSA( <expN> )
- * Return: Number times which 2^(EXPONENT(n)) is multiplied to give <expN>
- *********/
-
- #include "trlib.h"
-
- TRTYPE mantissa()
- {
- if ( PCOUNT==1 && ISNUM(1) )
- {
- int expon;
- double result, n;
-
- n = _parnd(1);
- result = _tr_frexp(n,&expon); /* Returns mantissa in result */
- _retnd(result);
- }
- else
- _retnd( (double)ERROR );
- }
-