Repository navigation
Disable value_stability test for 32-bit Cauchy distr - #894
Conversation
This appears not to be stable.
|
I'm not sure we can promise value stability for any distribution involving floating point arithmetic, at least not if transcendental functions are involved, which are not specified by the IEEE-754 standard (see here for details). |
|
You're right that there are a lot of things that can break value-stable portability of FP operations, but what can we do? I'd prefer to do the best we can (and warn about likely problems) than to give up completely. (I've had some success in the past with double-precision and enforcing SSE.) However on this particular test I think we should give up: it has yielded different results on Windows, Linux 64-bit and now Linux 32-bit MUSL, though curiously only for Perhaps we should make additional notes here. |
| test_samples(10f32, 7.0, &[15.023088, -5.446413, 3.7092876, 3.112482]); | ||
| // Unfortunately this test is not fully portable due to reliance on the | ||
| // system's implementation of tanf (see doc on Cauchy struct). | ||
| // test_samples(10f32, 7.0, &[15.023088, -5.446413, 3.7092876, 3.112482]); |
There was a problem hiding this comment.
How big is the difference? Are you getting completely different values?
There was a problem hiding this comment.
No, it's just the last digit of one of the results that differs by 2 or so; insignificant in most regards. Details are in Travis's log.
There was a problem hiding this comment.
Then I would prefer to keep the test and increase the error tolerance.
This appears not to be stable.