diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2014-04-13 14:30:56 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2014-04-13 14:30:56 -0400 |
commit | 94e3f93395de538d73826e128281a3ea9591a5a9 (patch) | |
tree | 45257e4b024537c5e0e5a3037a99ea9765583c99 /floatcomp.c | |
parent | c4300d657ba49db0b6d0f0884f41a29622edc58b (diff) | |
parent | a4b59faf911743b30f2e6e979c4f9c1ea0669ac3 (diff) | |
download | egawk-94e3f93395de538d73826e128281a3ea9591a5a9.tar.gz egawk-94e3f93395de538d73826e128281a3ea9591a5a9.tar.bz2 egawk-94e3f93395de538d73826e128281a3ea9591a5a9.zip |
Merge branch 'master' into select
Diffstat (limited to 'floatcomp.c')
-rw-r--r-- | floatcomp.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/floatcomp.c b/floatcomp.c index 9d24a67f..16a6d88e 100644 --- a/floatcomp.c +++ b/floatcomp.c @@ -26,6 +26,8 @@ #include "awk.h" #include <math.h> +#ifdef HAVE_UINTMAX_T + /* Assume IEEE-754 arithmetic on pre-C89 hosts. */ #ifndef FLT_RADIX #define FLT_RADIX 2 @@ -69,28 +71,6 @@ Please port the following code to your weird host; #define AWKNUM_FRACTION_BITS (AWKNUM_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4)) #define DBL_FRACTION_BITS (DBL_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4)) -/* - * Floor and Ceil --- Work around a problem in conversion of - * doubles to exact integers. - */ - -/* Floor --- do floor(), also for Cray */ - -AWKNUM -Floor(AWKNUM n) -{ - return floor(n); -} - -/* Ceil --- do ceil(), also for Cray */ - -AWKNUM -Ceil(AWKNUM n) -{ - return ceil(n); -} - -#ifdef HAVE_UINTMAX_T /* adjust_uint --- fiddle with values, ask Paul Eggert to explain */ uintmax_t |