\frac{x \cdot x}{y \cdot y} + \frac{z \cdot z}{t \cdot t}\left(\frac{x}{y} \cdot \sqrt[3]{x}\right) \cdot \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{y} + {\left(\frac{z}{t}\right)}^{2}(FPCore (x y z t) :precision binary64 (+ (/ (* x x) (* y y)) (/ (* z z) (* t t))))
(FPCore (x y z t) :precision binary64 (+ (* (* (/ x y) (cbrt x)) (/ (* (cbrt x) (cbrt x)) y)) (pow (/ z t) 2.0)))
double code(double x, double y, double z, double t) {
return ((x * x) / (y * y)) + ((z * z) / (t * t));
}
double code(double x, double y, double z, double t) {
return (((x / y) * cbrt(x)) * ((cbrt(x) * cbrt(x)) / y)) + pow((z / t), 2.0);
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 33.8 |
|---|---|
| Target | 0.4 |
| Herbie | 0.8 |
Initial program 33.8
Taylor expanded around 0 33.8
Simplified19.2
rmApplied times-frac_binary64_203030.4
rmApplied add-sqr-sqrt_binary64_2031832.3
Applied add-cube-cbrt_binary64_2032932.5
Applied times-frac_binary64_2030332.5
Applied add-sqr-sqrt_binary64_2031832.5
Applied add-cube-cbrt_binary64_2032932.6
Applied times-frac_binary64_2030332.6
Applied swap-sqr_binary64_2026432.6
Simplified32.5
Simplified0.8
Final simplification0.8
herbie shell --seed 2020280
(FPCore (x y z t)
:name "Graphics.Rasterific.Svg.PathConverter:arcToSegments from rasterific-svg-0.2.3.1"
:precision binary64
:herbie-target
(+ (pow (/ x y) 2.0) (pow (/ z t) 2.0))
(+ (/ (* x x) (* y y)) (/ (* z z) (* t t))))