x \cdot \left(x - 1\right)
\mathsf{fma}\left(x, x, 1 \cdot \left(-x\right)\right)double f(double x) {
double r232914 = x;
double r232915 = 1.0;
double r232916 = r232914 - r232915;
double r232917 = r232914 * r232916;
return r232917;
}
double f(double x) {
double r232918 = x;
double r232919 = 1.0;
double r232920 = -r232918;
double r232921 = r232919 * r232920;
double r232922 = fma(r232918, r232918, r232921);
return r232922;
}




Bits error versus x
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0 |
Initial program 0.0
rmApplied sub-neg0.0
Applied distribute-lft-in0.0
Simplified0.0
rmApplied fma-def0
Final simplification0
herbie shell --seed 2019194 +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)))