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 sin(-0.0).
details: https://anonhg.NetBSD.org/src/rev/74d6f80a764e
branches: trunk
changeset: 786219:74d6f80a764e
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Apr 20 07:32:45 2013 +0000
description:
Support sin(-0.0).
diffstat:
sys/arch/m68k/fpe/fpu_trig.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 7048f8212648 -r 74d6f80a764e sys/arch/m68k/fpe/fpu_trig.c
--- a/sys/arch/m68k/fpe/fpu_trig.c Sat Apr 20 05:46:20 2013 +0000
+++ b/sys/arch/m68k/fpe/fpu_trig.c Sat Apr 20 07:32:45 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_trig.c,v 1.14 2013/04/20 05:27:05 isaki Exp $ */
+/* $NetBSD: fpu_trig.c,v 1.15 2013/04/20 07:32:45 isaki Exp $ */
/*
* Copyright (c) 1995 Ken Nakata
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_trig.c,v 1.14 2013/04/20 05:27:05 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_trig.c,v 1.15 2013/04/20 07:32:45 isaki Exp $");
#include "fpu_emulate.h"
@@ -330,6 +330,10 @@
if (ISINF(&fe->fe_f2))
return fpu_newnan(fe);
+ /* if x is +0/-0, return +0/-0 */
+ if (ISZERO(&fe->fe_f2))
+ return &fe->fe_f2;
+
CPYFPN(&x, &fe->fe_f2);
/* x = abs(input) */
Home |
Main Index |
Thread Index |
Old Index