Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/m68k/fpe Support sinh(-0.0) and tanh(-0.0).
details: https://anonhg.NetBSD.org/src/rev/4227ccdd4cb7
branches: trunk
changeset: 786220:4227ccdd4cb7
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Apr 20 07:33:05 2013 +0000
description:
Support sinh(-0.0) and tanh(-0.0).
diffstat:
sys/arch/m68k/fpe/fpu_hyperb.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r 74d6f80a764e -r 4227ccdd4cb7 sys/arch/m68k/fpe/fpu_hyperb.c
--- a/sys/arch/m68k/fpe/fpu_hyperb.c Sat Apr 20 07:32:45 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_hyperb.c Sat Apr 20 07:33:05 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_hyperb.c,v 1.14 2013/04/20 05:27:05 isaki Exp $ */
+/* $NetBSD: fpu_hyperb.c,v 1.15 2013/04/20 07:33:05 isaki Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_hyperb.c,v 1.14 2013/04/20 05:27:05 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_hyperb.c,v 1.15 2013/04/20 07:33:05 isaki Exp $");
#include <machine/ieee.h>
@@ -233,6 +233,10 @@
if (ISINF(&fe->fe_f2))
return &fe->fe_f2;
+ /* if x is +0/-0, return +0/-0 */
+ if (ISZERO(&fe->fe_f2))
+ return &fe->fe_f2;
+
CPYFPN(&s0, &fe->fe_f2);
r = __fpu_sinhcosh_taylor(fe, &s0, 2);
@@ -250,6 +254,10 @@
if (ISNAN(&fe->fe_f2))
return &fe->fe_f2;
+ /* if x is +0/-0, return +0/-0 */
+ if (ISZERO(&fe->fe_f2))
+ return &fe->fe_f2;
+
if (ISINF(&fe->fe_f2)) {
sign = fe->fe_f2.fp_sign;
fpu_const(&fe->fe_f2, FPU_CONST_1);
Home |
Main Index |
Thread Index |
Old Index