-
-
Notifications
You must be signed in to change notification settings - Fork 196
Cleanup duplicated overloads of scalar std:: functions #1765
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
Changes from all commits
47a04d4
a7f5fde
987b733
ecb3618
4bef707
b5330f8
ad978ec
e45f023
cfcbb88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,12 +36,8 @@ inline double atanh(double x) { | |
* @throw std::domain_error If argument is less than 1. | ||
*/ | ||
inline double atanh(int x) { | ||
if (is_nan(x)) { | ||
return x; | ||
} else { | ||
check_bounded("atanh", "x", x, -1, 1); | ||
return std::atanh(x); | ||
} | ||
check_bounded("atanh", "x", x, -1, 1); | ||
return std::atanh(x); | ||
Comment on lines
-39
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a sanity check, this was changed because the standard says below right?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Figure nan is a domain error There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was changed because I feel that its an unnecessary check. An int cant be NaN as NaN is defined only for floating point numbers.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a huge deal probably as I doubt many call atanh with ints. |
||
} | ||
|
||
/** | ||
|
Uh oh!
There was an error while loading. Please reload this page.