home *** CD-ROM | disk | FTP | other *** search
- /*
- * File: x80.c
- * ©1993-1995 metrowerks Inc. All rights reserved
- *
- * Content: workaround for lack of 'long double' support in CodeWarrior for PowerPC
- *
- * Use these routines instead of x80told() and ldtox80() from <fp.h>.
- *
- * CodeWarrior does not support the 128-bit 'long double' format expected
- * by the various MathLib routines. All of these routines have 'double'
- * counterparts except for x80told() and ldtox80(). We provide 'double'
- * versions of those routines here.
- *
- * This file should be compiled with PPCC using the following command line:
- *
- * ppcc -appleext on -sym off -opt off -ldsize 128 x80.c -o x80.o
- */
-
- #ifndef __FP__
- #include <fp.h>
- #endif
-
- #ifndef __X80__
- #include <x80.h>
- #endif
-
- void x80tod ( const extended80 *x80, double *x )
- {
- long double ld;
-
- x80told(x80, &ld);
- *x = ld;
- }
-
- void dtox80 ( const double *x, extended80 *x80 )
- {
- long double ld;
-
- ld = *x;
- ldtox80(&ld, x80);
- }
-