Re: Replace cos and avoid FPU trigonometry (was: tanf returns NaN for large inputs)

2022-01-18 Thread Mark Kettenis
> From: Greg Steuck > Date: Mon, 10 Jan 2022 20:59:17 -0800 > > Greg Steuck writes: > > > This failure can be reduced to a trivial program which does change > > its behavior for the worse if s_cos.S is taken out: > > > > #include > > #include > > > > int main(int a, char**b) { > > double

Replace cos and avoid FPU trigonometry (was: tanf returns NaN for large inputs)

2022-01-10 Thread Greg Steuck
Greg Steuck writes: > This failure can be reduced to a trivial program which does change > its behavior for the worse if s_cos.S is taken out: > > #include > #include > > int main(int a, char**b) { > double y = -0.34061437849088045332; > printf("cos(%lf)=%le delta=%e\n", y, cos(y),

Re: tanf returns NaN for large inputs

2022-01-09 Thread Daniel Dickman
With numpy/i386 we don't fix any of the currently broken tests and surprisingly one new regression is introduced: -13 failed, 10900 passed, 88 skipped, 108 deselected, 19 xfailed, 2 xpassed, 5 warnings in 206.14 seconds +14 failed, 10899 passed, 88 skipped, 108 deselected, 19 xfailed, 2 xpassed,

Re: tanf returns NaN for large inputs

2022-01-09 Thread Greg Steuck
Daniel Dickman writes: > Here's the link to the commit Mark referenced: > https://github.com/NetBSD/src/commit/4f9e11b0dddf04640fe0553a9133a471af613627 > > And then the actual implementations were removed in this commit: >

Re: tanf returns NaN for large inputs

2022-01-09 Thread Mark Kettenis
> From: Daniel Dickman > Date: Sun, 9 Jan 2022 16:36:33 -0500 > > On Sun, Jan 9, 2022 at 4:18 PM Mark Kettenis wrote: > > > > > From: Greg Steuck > > > Date: Sun, 09 Jan 2022 12:47:14 -0800 > > > > > > Greg Steuck writes: > > > > > > > This was reduced from a ghc test. The results of the

Re: tanf returns NaN for large inputs

2022-01-09 Thread Daniel Dickman
On Sun, Jan 9, 2022 at 4:18 PM Mark Kettenis wrote: > > > From: Greg Steuck > > Date: Sun, 09 Jan 2022 12:47:14 -0800 > > > > Greg Steuck writes: > > > > > This was reduced from a ghc test. The results of the program differ > > > between OpenBSD 7.0-current-amd64 and a couple of other systems:

Re: tanf returns NaN for large inputs

2022-01-09 Thread Mark Kettenis
> From: Greg Steuck > Date: Sun, 09 Jan 2022 12:47:14 -0800 > > Greg Steuck writes: > > > This was reduced from a ghc test. The results of the program differ > > between OpenBSD 7.0-current-amd64 and a couple of other systems: > > Thanks to phessler@ for testing on arm64 where the bug doesn't

Re: tanf returns NaN for large inputs

2022-01-09 Thread Greg Steuck
Greg Steuck writes: > This was reduced from a ghc test. The results of the program differ > between OpenBSD 7.0-current-amd64 and a couple of other systems: Thanks to phessler@ for testing on arm64 where the bug doesn't happen. This patch makes OpenBSD-amd64 work the rest of the systems. I

tanf returns NaN for large inputs

2022-01-09 Thread Greg Steuck
This was reduced from a ghc test. The results of the program differ between OpenBSD 7.0-current-amd64 and a couple of other systems: % cat tanf.c #include #include int main(int a, char**b) { float x = 1e18; printf("tanf(%f)=%f\n", x, tanf(x)); float y = 1e19;