\frac{x \cdot x}{y \cdot y} + \frac{z \cdot z}{t \cdot t}\left(x \cdot \left(\sqrt[3]{x} \cdot \frac{\sqrt[3]{x}}{y}\right)\right) \cdot \frac{\sqrt[3]{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}}{y} + \frac{z}{t} \cdot \frac{z}{t}double code(double x, double y, double z, double t) {
return ((double) ((((double) (x * x)) / ((double) (y * y))) + (((double) (z * z)) / ((double) (t * t)))));
}
double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x * ((double) (((double) cbrt(x)) * (((double) cbrt(x)) / y))))) * (((double) (((double) cbrt(((double) (((double) cbrt(x)) * ((double) cbrt(x)))))) * ((double) cbrt(((double) cbrt(x)))))) / y))) + ((double) ((z / t) * (z / t)))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 33.7 |
|---|---|
| Target | 0.4 |
| Herbie | 1.4 |
Initial program 33.7
Simplified24.2
rmApplied add-sqr-sqrt44.4
Applied times-frac40.4
Applied add-sqr-sqrt40.4
Applied unswap-sqr38.7
Simplified38.6
Simplified13.0
rmApplied add-cube-cbrt13.3
Applied times-frac4.6
Applied associate-*r*1.3
Simplified1.3
rmApplied add-cube-cbrt1.4
Applied cbrt-prod1.4
Final simplification1.4
herbie shell --seed 2020196
(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))))