-
-
Notifications
You must be signed in to change notification settings - Fork 709
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
Make std.math.fmax() and .fmin() variadic. Add explicit NaN handling. #4346
Conversation
|
||
if (mixin(`m4 ` ~ op ~ ` ret`)) | ||
ret = m4; | ||
else if (m4.isNaN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be the first comparison?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
|
my suggestion was to use fmax and fmin in max and min. |
|
Shouldn't they be in |
I don't know. See std.math in LDC Phobos The best option for math functions is to be templates (so they can be inlined) and support all FP types. |
The description of |
But this is just declarations. |
It is analogous to |
This is not really important. Functions in core.math and std.math are deprecated:
The good std.math update should allow to use all math functions from LLVM list http://llvm.org/docs/LangRef.html#standard-c-library-intrinsics. |
This can be fixed. There's nothing stopping us from adding
|
No description provided.