Am 21.03.2014 22:57, schrieb Richard Fateman:
Your arithmetic is defective unless you work at it.
The problem is that it's not possible to implement reliable arithmetic
in Python.
You can't rely on the inexact flag. Not all processors implement it
cleanly, I hear some C libraries modify the FPU settings, and it's not
even threadsafe (well in Python it is, but not all C libraries that
Python uses are).
I think these issues can be tackled using a validation suite so people
can check that their hardware/software configuration works, and a lot of
effort.
You'd need to:
- Research all the corner cases known to exist.
- Defined what fp operations SymPy uses, and how they should work for
every corner case.
- Write unit tests that are specially marked as "fp validation tests".
Anybody who does accuracy-sensitive work with SymPy would be asked to
run the validation tests on their hardware/software configuration.
Until (and if!) that's done, we should write a warning that IEEE
arithmetic isn't accurate, that some parts of SymPy assume accuracy
nevertheless, and that Float shouldn't be used to avoid that effect.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/532D935E.1040308%40durchholz.org.
For more options, visit https://groups.google.com/d/optout.