Open k-arrows opened 1 year ago
Consider the following two functions:
#include <cmath> double f1(double x) { return exp(exp(x)) / exp(x); } double f2(double x) { return exp(exp(x) - x); }
When these functions are compiled with -Ofast, Clang emits code for f1 that performs floating-point division. GCC does not emit code that performs floating-point division for either function.
-Ofast
f1
taking a look
Consider the following two functions:
When these functions are compiled with
-Ofast
, Clang emits code forf1
that performs floating-point division. GCC does not emit code that performs floating-point division for either function.