1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-17 00:22:59 +00:00

medleyfp.h includes (#82)

* Add missing <math.h> for FPTEST on Linux.

* Consolidate medleyfp.h DOS includes.
This commit is contained in:
Bruce Mitchener 2020-12-17 01:57:10 +07:00 committed by GitHub
parent 0a57ca5142
commit 6539dc287d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,10 +16,6 @@
/* */
/************************************************************************/
#ifdef DOS
#include <i32.h>
#endif /* DOS */
/* --------------------------------------------------
FPCLEAR - clear status as necessary
FPTEST(result) - check result or status
@ -61,6 +57,7 @@ volatile extern int FP_error;
#define FPTEST(result) (isinf(result) || isnan(result))
#elif defined(LINUX)
#include <math.h>
#define FPCLEAR
#define FPTEST(result) ((!finite(result)) || isnan(result))
@ -70,6 +67,7 @@ volatile extern int FP_error;
#define FPTEST(result) (!isfinite(result))
#elif defined(DOS)
#include <i32.h>
#define FPCLEAR
#define FPTEST(result) (_getrealerror() & ( I87_ZERO_DIVIDE | I87_OVERFLOW | I87_UNDERFLOW))