Module Name: src Committed By: isaki Date: Sat Apr 20 05:09:41 UTC 2013
Modified Files: src/sys/arch/m68k/fpe: fpu_trig.c Log Message: Support tan(-0.0). To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/m68k/fpe/fpu_trig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/m68k/fpe/fpu_trig.c diff -u src/sys/arch/m68k/fpe/fpu_trig.c:1.12 src/sys/arch/m68k/fpe/fpu_trig.c:1.13 --- src/sys/arch/m68k/fpe/fpu_trig.c:1.12 Fri Apr 19 13:57:52 2013 +++ src/sys/arch/m68k/fpe/fpu_trig.c Sat Apr 20 05:09:41 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_trig.c,v 1.12 2013/04/19 13:57:52 isaki Exp $ */ +/* $NetBSD: fpu_trig.c,v 1.13 2013/04/20 05:09:41 isaki Exp $ */ /* * Copyright (c) 1995 Ken Nakata @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fpu_trig.c,v 1.12 2013/04/19 13:57:52 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu_trig.c,v 1.13 2013/04/20 05:09:41 isaki Exp $"); #include "fpu_emulate.h" @@ -409,6 +409,10 @@ fpu_tan(struct fpemu *fe) 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); /* sin(x) */