2014-04-29 21:16 GMT+02:00 Matthew Brett <matthew.br...@gmail.com>: > Hi, > > I'm sorry to ask this question without more information, but I'm > hoping you can give me an idea what more information I need. > > Some of us got very interested in using Mingw-w64 as the standard > compiler for Python numerical tools such as numpy and scipy: > > https://github.com/numpy/numpy/wiki > http://www.mail-archive.com/numpy-discussion@scipy.org/msg44967.html > > One question that came up was the accuracy of the mingw exp function: > > http://www.mail-archive.com/numpy-discussion@scipy.org/msg44950.html > > I believe this is implemented here: > > http://sourceforge.net/p/mingw-w64/code/HEAD/tree/trunk/mingw-w64-crt/math/exp.def.h > > It looks as if this implementation is slightly less accurate than > other implementations on OSX and Linux: > > http://www.mail-archive.com/numpy-discussion@scipy.org/msg44987.html > > Specifically, the Linux implementation achieves 100% floating point > accuracy, whereas the Mingw-w64 implementation gets about 80% of > values exactly (floating point) correct, with the remainder off by one > unit at the last place (ULP).
Hmm, well, we use here variant provided by netbsd. This 1 ULP thing isn't necessarily an inaccuracy in general. Mostly it might be either an issue of rounding, or of method you use to display them. If you want more accurate value-print I would recommment to use the __mingw_(printf) functions instead of the MS-C-runtime one. Issue here is that values by MS-printf getting rounded different (and sometimes inaccurate). > I writing to ask whether I should investigate this further to see if > another implementation would give better accuracy for similar speed. > Or do y'all consider the current accuracy good enough? Of course we are interested in approving our math accuracy. It would be great to improve it. Nevertheless keep please in mind that not all licenses (and so not all implementations) are acceptable for us. And for such patches some testcases would be important, too. Another pretty important thing here is also the calculation-performance. Another interesting aspect of current implementation would be to make calculation table-based without use of x87-FPU instructions (especially for x64). > Cheers, > > Matthew Cheers, Kai ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public