Uh oh!
There was an error while loading. Please reload this page.
libmath - #1221
Conversation
brson
commented
Nov 24, 2011
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. |
boggle
commented
Nov 25, 2011
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? |
brson
commented
Nov 25, 2011
I pulled this and opened #1222. My weak preference is for them to behave the same on all platforms. |
Run more rustc tests
1221: Use correct FileId when expanding macros in expressions r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
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.