Skip to content
Snippets Groups Projects
Commit 0a1f1811 authored by Alexander Launi's avatar Alexander Launi
Browse files

Directly manipulate signbit of x in float128 abs rather than conditional

negation.
parent 12e60ede
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,8 @@ namespace std {
*/
inline
float128 abs(float128 x)
{
return (x < 0 ? -x : x);
{
return signbit(x) ? changesign(x) : x;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment