\frac{x \cdot x}{y \cdot y} + \frac{z \cdot z}{t \cdot t}\frac{x}{y} \cdot \frac{x}{y} + \left(\frac{z}{t} \cdot \sqrt[3]{z}\right) \cdot \frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{t}(FPCore (x y z t) :precision binary64 (+ (/ (* x x) (* y y)) (/ (* z z) (* t t))))
(FPCore (x y z t) :precision binary64 (+ (* (/ x y) (/ x y)) (* (* (/ z t) (cbrt z)) (/ (* (cbrt z) (cbrt z)) t))))
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) * (x / y)) + (((z / t) * cbrt(z)) * ((cbrt(z) * cbrt(z)) / t));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 34.0 |
|---|---|
| Target | 0.4 |
| Herbie | 0.8 |
Initial program 34.0
rmApplied times-frac_binary6419.3
rmApplied times-frac_binary640.4
rmApplied add-sqr-sqrt_binary6431.7
Applied add-cube-cbrt_binary6431.9
Applied times-frac_binary6431.9
Applied add-sqr-sqrt_binary6431.9
Applied add-cube-cbrt_binary6432.0
Applied times-frac_binary6432.0
Applied swap-sqr_binary6432.0
Simplified31.9
Simplified0.8
Final simplification0.8
herbie shell --seed 2020253
(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))))