New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
infinities, NaNs, Atan2, and Windows TM portability #756
Comments
Nothing to tell about atan2() just want to let you know that I have an idea to rewrite builtin functions to avoid duplicate arguments computation and return exact value for cos(90) :-) |
The problem is with infinity and NaN arguments to Atan2, and then only when running the 32-bit under 64-bit Windows 7 .... funnily enough this is not reproducable under Wine. Result of
http://files.openscad.org/tests/win_586_amd-m880g-with_sicj_report.html The key part here is
Under 64 bit Windows TM this is fine, but running the 32 bit binary under 64 bit windows TM produces this alternate output. As noted in the links above, the 'standard' for Atan2 differs between manufacturers when it comes to infinities and NaNs. There is also a bizarro bug under 64 bit windows that only affects OpenCSG and ThrownTogether rendering of infinites when used in transformations like translate() or rotate()
http://files.openscad.org/tests/win_8664_amd-m880g-with_ewcb_report.html The most bizarre part is that the ordinary 'echo tests' of infinities does not have any problem. It doesnt even have the 32-bit bug as noted above. Only the actual Preview (f5) drawing of transformed objects is a problem here.... f6 mode works fine. (Note the "Cubes" should not be drawn... they are normally removed because they have been rotated by infinity and/or NaN) |
See also #978 for a simple test program and some results. |
it seems that atan2 is giving different values for the tests of infinity on Windows vs Linux.
I am working on a solution which is to force it to work like the OpenGroup / linux manpage standard and add many more tests to testdata/scad/functions/inf-tests. But I wanted to post this to see if anyone else has ideas.
Some interesting links:
http://pubs.opengroup.org/onlinepubs/009695399/functions/atan2.html
http://www.cplusplus.com/reference/cmath/atan2/
http://msdn.microsoft.com/en-us/library/system.math.atan2.aspx
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: