On 02/ 4/12 10:11 PM, Robert Bradshaw wrote:

Note that what is broken[1] here is ARM's libc, if one types
"gamma(6.0)" one gets "120.000000000000" on all systems. It's a
question about gamma(float(6.0)) which is explicitly requesting the
(presumably faster but potentially less accurate) system
implementation.

It would be worth testing the speed. If it's not faster, it would probably be best to get any change made outside of Sage. If you can provide evidence that the current implementation is inaccurate, and other implementations are more accurate with negligible increase in speed, then it would probably be fairly easy to get the upstream developers to change it.

The question is should we

1) Weaken this doctest to support this broken platform.
2) Provide a workaround for this platform (e.g. using gsl or similar)
to avoid the broken implementation of gamma.
3) Mark this test as broken (not tested?) on ARM, and ARM only.

I think options 2&  3 are far superior to 1.

- Robert

I personally like the idea of "expected failures" which many test suites have. On the case of ARM, this would simply be expected to fail.

I believe there are a fairly large number of doctests in Sage which have been weakened considerably just to take account of very minor differences in output on two platforms. The weakening is more than necessary, as the tests do not compare the absolute or relative error, but the printed digits in base 10, which is not the best way to me. I know one can see these are "documentation tests" but the fact is that 99% of the test in Sage are the doctests.

It would be hard for me to dig out an example, but I believe there are cases where tests permit relative errors of the order of 10^-10, when the differences between platforms is not more than 10^15. It's simply that the current testing framework is not good for differentiating cases like

7.1200000000000001
7.1199999999999999

which have a relatively small difference in numeric value, but a very large difference in how they are displayed in base 10.

Dave

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to