Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm/src Report correct exception for fmodl.
details: https://anonhg.NetBSD.org/src/rev/0ca747c94259
branches: trunk
changeset: 791465:0ca747c94259
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Nov 19 14:04:24 2013 +0000
description:
Report correct exception for fmodl.
diffstat:
lib/libm/src/k_standard.c | 10 ++++++++--
lib/libm/src/w_fmodl.c | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r e676ee97c200 -r 0ca747c94259 lib/libm/src/k_standard.c
--- a/lib/libm/src/k_standard.c Tue Nov 19 14:02:59 2013 +0000
+++ b/lib/libm/src/k_standard.c Tue Nov 19 14:04:24 2013 +0000
@@ -12,7 +12,7 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_standard.c,v 1.17 2011/04/11 15:17:33 drochner Exp $");
+__RCSID("$NetBSD: k_standard.c,v 1.18 2013/11/19 14:04:24 joerg Exp $");
#endif
#include "math.h"
@@ -532,9 +532,15 @@
break;
case 27:
case 127:
+ case 227:
/* fmod(x,0) */
exc.type = DOMAIN;
- exc.name = type < 100 ? "fmod" : "fmodf";
+ if (type == 27)
+ exc.name = "fmod";
+ else if (type == 127)
+ exc.name = "fmodf";
+ else
+ exc.name = "fmodl";
if (_LIB_VERSION == _SVID_)
exc.retval = x;
else
diff -r e676ee97c200 -r 0ca747c94259 lib/libm/src/w_fmodl.c
--- a/lib/libm/src/w_fmodl.c Tue Nov 19 14:02:59 2013 +0000
+++ b/lib/libm/src/w_fmodl.c Tue Nov 19 14:04:24 2013 +0000
@@ -11,7 +11,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: w_fmodl.c,v 1.2 2013/11/13 01:03:08 joerg Exp $");
+__RCSID("$NetBSD: w_fmodl.c,v 1.3 2013/11/19 14:04:24 joerg Exp $");
/*
* wrapper fmodl(x,y)
@@ -37,7 +37,7 @@
z = __ieee754_fmodl(x,y);
if(_LIB_VERSION == _IEEE_ ||isnan(y)||isnan(x)) return z;
if(y==0.0) {
- return __kernel_standard(x,y,27); /* fmod(x,0) */
+ return __kernel_standard(x,y,227); /* fmod(x,0) */
} else
return z;
#endif
Home |
Main Index |
Thread Index |
Old Index