x \cdot \left(x - 1\right)
\mathsf{fma}\left(x, x, x \cdot \left(-1\right)\right)double f(double x) {
double r12590901 = x;
double r12590902 = 1.0;
double r12590903 = r12590901 - r12590902;
double r12590904 = r12590901 * r12590903;
return r12590904;
}
double f(double x) {
double r12590905 = x;
double r12590906 = 1.0;
double r12590907 = -r12590906;
double r12590908 = r12590905 * r12590907;
double r12590909 = fma(r12590905, r12590905, r12590908);
return r12590909;
}




Bits error versus x
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0 |
Initial program 0.0
rmApplied sub-neg0.0
Applied distribute-rgt-in0.0
rmApplied fma-def0
Final simplification0
herbie shell --seed 2019171 +o rules:numerics
(FPCore (x)
:name "Statistics.Correlation.Kendall:numOfTiesBy from math-functions-0.1.5.2"
:herbie-target
(- (* x x) x)
(* x (- x 1.0)))