Re: [Mingw-w64-public] Inconsistencies in C pow() function

2012-04-16 Thread Jonathan Liu
On 15/04/2012 1:41 AM, Kai Tietz wrote: > Hmm, well our implementation interpretes the ISO C99 definition > > "pow (x, y) signals the invalid operation exception for finite x< 0 > and finite non-integer y. Therefore has as result -Nan. Compared values are not the same (powtest.cpp:149) Expecte

Re: [Mingw-w64-public] Inconsistencies in C pow() function

2012-04-14 Thread Kai Tietz
Hmm, well our implementation interpretes the ISO C99 definition "pow (x, y) signals the invalid operation exception for finite x < 0 and finite non-integer y. Therefore has as result -Nan. Having here result +Inf looks wrong to me. Cheers, Kai --

Re: [Mingw-w64-public] Inconsistencies in C pow() function

2012-04-14 Thread Jonathan Liu
Attached is an updated test program. It will now show all failures at once instead of terminating after the first test failure. Regards, Jonathan #include #include #include #include #ifdef _MSC_VER #define INFINITY HUGE_VAL #define isfinite _finite #define isnan _isnan unsigned long nan[2]

Re: [Mingw-w64-public] Inconsistencies in C pow() function

2012-04-14 Thread Jonathan Liu
On 13/04/2012 9:54 PM, NightStrike wrote: > On Fri, Apr 13, 2012 at 4:39 AM, Jonathan Liu wrote: >> Visual C++ 2010 and GCC on Linux give the same expected output for these >> tests and pass. I just think it would be good if MinGW-w64 gave results >> that were more consistent with Visual C++ 2010

Re: [Mingw-w64-public] Inconsistencies in C pow() function

2012-04-13 Thread NightStrike
On Fri, Apr 13, 2012 at 4:39 AM, Jonathan Liu wrote: > Visual C++ 2010 and GCC on Linux give the same expected output for these > tests and pass. I just think it would be good if MinGW-w64 gave results > that were more consistent with Visual C++ 2010 and GCC on Linux. The > tests are based on what

Re: [Mingw-w64-public] Inconsistencies in C pow() function

2012-04-13 Thread Jonathan Liu
Visual C++ 2010 and GCC on Linux give the same expected output for these tests and pass. I just think it would be good if MinGW-w64 gave results that were more consistent with Visual C++ 2010 and GCC on Linux. The tests are based on what Google V8 expects to be the correct output - the differen

Re: [Mingw-w64-public] Inconsistencies in C pow() function

2012-04-12 Thread Ruben Van Boxem
2012/4/12 Jonathan Liu > Hi, > > I am getting some inconsistencies for the C pow() function between > MinGW-w64 and Visual C++: > > compare(INFINITY, pow(-INFINITY, 3.1)); > Compared values are not the same (test.cpp:145) > Expected (INFINITY): 1.#INF00 > Actual (pow(-INFINITY, 3.1)): -1.#IND

[Mingw-w64-public] Inconsistencies in C pow() function

2012-04-12 Thread Jonathan Liu
Hi, I am getting some inconsistencies for the C pow() function between MinGW-w64 and Visual C++: compare(INFINITY, pow(-INFINITY, 3.1)); Compared values are not the same (test.cpp:145) Expected (INFINITY): 1.#INF00 Actual (pow(-INFINITY, 3.1)): -1.#IND00 compare(+INFINITY, 1.0/pow(-INFI