diff options
Diffstat (limited to 'src/math/rint.c')
| -rw-r--r-- | src/math/rint.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/math/rint.c b/src/math/rint.c index a1868cbb..a97c4709 100644 --- a/src/math/rint.c +++ b/src/math/rint.c @@ -4,6 +4,12 @@ TYPE TGFN(rint)(TYPE x) { + switch (fpclassify(x)) { + case FP_ZERO: return x; + case FP_INFINITE: return x; + default: break; + } + return x; } |
