-
Notifications
You must be signed in to change notification settings - Fork 359
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
Improve the patch for NaN with MSVC #8628
Conversation
Hmmm, the patch still doesn't work in our CI. |
The definition I found in another #ifndef _HUGE_ENUF My first attempt had just (no const qualifier) #define NAN (-(float)(1e+300 * 1e+300 * 0.0F)) and that passed our CI' Edit: I see that your change was to put it like that, but you also changed the non MSVC branch. Better not do it. If the problem is only with MSVC, restrict changes to it. EDIT2: The other difference to my first patch is that it was applied into a different header, that presumably was included first that this one. |
it turns our in PR #8627, the CI was still using the old MSVC 19.41.34123.0 (that's why the CI passes), while in the master branch and this PR, the CI has upgraded to MSVC 19.42.34433.0. |
OK, let's try this that is a distillation of the NAN definition in a header called
|
can we just include this header file? |
Sounds complicated. That header is part of |
Description of proposed changes
Not sure what's happening. Changes in PR #8627 passed in that PR, but failed after merging into the master branch (see https://github.com/GenericMappingTools/gmt/actions/runs/11934957233/job/33265224118).
ChatGPT told me:
So, this PR improves the definition NAN without any floating-point arithmetic.
With the new patch, the conda-forge building in conda-forge/gmt-feedstock#302 passes.