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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 33.3 |
|---|---|
| Target | 0.4 |
| Herbie | 0.8 |
Initial program Error: 33.3 bits
SimplifiedError: 24.2 bits
rmApplied add-sqr-sqrtError: 44.2 bits
Applied times-fracError: 40.1 bits
Applied add-sqr-sqrtError: 40.1 bits
Applied unswap-sqrError: 38.6 bits
SimplifiedError: 38.5 bits
SimplifiedError: 13.0 bits
rmApplied associate-/r*Error: 4.4 bits
rmApplied *-un-lft-identityError: 4.4 bits
Applied add-cube-cbrtError: 4.7 bits
Applied *-un-lft-identityError: 4.7 bits
Applied times-fracError: 4.7 bits
Applied times-fracError: 4.7 bits
Applied associate-*r*Error: 0.8 bits
SimplifiedError: 0.8 bits
Final simplificationError: 0.8 bits
herbie shell --seed 2020203
(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))))