\frac{\left(1 - x\right) \cdot \left(3 - x\right)}{y \cdot 3}\mathsf{fma}\left(0.3333333333333333148296162562473909929395, \frac{x}{\frac{y}{x}}, \frac{1}{y}\right) - 1.333333333333333259318465024989563971758 \cdot \frac{x}{y}double f(double x, double y) {
double r23055015 = 1.0;
double r23055016 = x;
double r23055017 = r23055015 - r23055016;
double r23055018 = 3.0;
double r23055019 = r23055018 - r23055016;
double r23055020 = r23055017 * r23055019;
double r23055021 = y;
double r23055022 = r23055021 * r23055018;
double r23055023 = r23055020 / r23055022;
return r23055023;
}
double f(double x, double y) {
double r23055024 = 0.3333333333333333;
double r23055025 = x;
double r23055026 = y;
double r23055027 = r23055026 / r23055025;
double r23055028 = r23055025 / r23055027;
double r23055029 = 1.0;
double r23055030 = r23055029 / r23055026;
double r23055031 = fma(r23055024, r23055028, r23055030);
double r23055032 = 1.3333333333333333;
double r23055033 = r23055025 / r23055026;
double r23055034 = r23055032 * r23055033;
double r23055035 = r23055031 - r23055034;
return r23055035;
}




Bits error versus x




Bits error versus y
| Original | 5.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 5.9
rmApplied associate-/l*0.3
Taylor expanded around 0 5.7
Simplified0.2
Final simplification0.2
herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y)
:name "Diagrams.TwoD.Arc:bezierFromSweepQ1 from diagrams-lib-1.3.0.3"
:herbie-target
(* (/ (- 1.0 x) y) (/ (- 3.0 x) 3.0))
(/ (* (- 1.0 x) (- 3.0 x)) (* y 3.0)))