Conversation
|
A number of results are different under windows (e.g. pow(-1, -inf) = 1 on linux and nan on windows), because the underlying c functions give different results. I guess we should just use the results that the platform gives. If that sounds ok to you then I will adjust the tests accordingly. |
|
Hm, I feared that might happend. Guess for now it's ok to proceed as you propose; please just comment out the asserts that break on win32 so that we later either may fix this from rust or at least document the behavior as undefined. This is an intermediary step. There is room for improvement (C99, more elegant imports than the current duplication of constants etc.) I think math should just merge into float, and math_f32, math_f64 into f32, f64 accordingly, later. I wonder if the runtime should include its own math functions to avoid such floating point woes in the long run. Any thougts on this? |
|
I pulled this and opened #1222. My weak preference is for them to behave the same on all platforms. |
Run more rustc tests
I rewrote math.rs. Now has support for f32, f64, and float and covers C95 completely, C99 can be added later.
This still needs testing on win32, to which I don't have access.