x \cdot \left(x - 1\right)
\mathsf{fma}\left(x, x, \left(-1\right) \cdot x\right)double f(double x) {
double r330659 = x;
double r330660 = 1.0;
double r330661 = r330659 - r330660;
double r330662 = r330659 * r330661;
return r330662;
}
double f(double x) {
double r330663 = x;
double r330664 = 1.0;
double r330665 = -r330664;
double r330666 = r330665 * r330663;
double r330667 = fma(r330663, r330663, r330666);
return r330667;
}




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 2019350 +o rules:numerics
(FPCore (x)
:name "Statistics.Correlation.Kendall:numOfTiesBy from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(- (* x x) x)
(* x (- x 1)))