Skip to content
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

Fix for issue 773 #782

Merged
merged 1 commit into from
Apr 18, 2022
Merged

Fix for issue 773 #782

merged 1 commit into from
Apr 18, 2022

Conversation

mborland
Copy link
Member

No description provided.

@mborland mborland linked an issue Apr 18, 2022 that may be closed by this pull request
@mborland
Copy link
Member Author

@NAThompson do you concur with this handling of NaNs? I thought this would be much lighter weigh than throwing an exception.

@NAThompson
Copy link
Collaborator

@mborland : In computer graphics, nans always render black. So this is the correct behavior.

Why doesn't the std::isnan from std work?

@mborland
Copy link
Member Author

mborland commented Apr 18, 2022

Why doesn't the std::isnan from std work?

Isn't the behavior of boost::math::isnan more stable across compilers/optimizations? Passing a NaN to std::clamp should be UB since clamp requires the less than comparable concept. I was trying to avoid this with configurations that replace std::isnan with false.

@NAThompson
Copy link
Collaborator

I was trying to avoid this with configurations that replace std::isnan with false.

Oh yeah that's just awful. . .

@NAThompson NAThompson merged commit 51dc64e into boostorg:develop Apr 18, 2022
@mborland mborland deleted the issue773 branch April 18, 2022 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Color table segfault with NaN argument
2 participants