double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x * x)) / ((double) (y * y)))) + ((double) (((double) (z * z)) / ((double) (t * t))))));
}
double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) / ((double) (((double) cbrt(y)) * ((double) cbrt(y)))))) * ((double) (((double) (x / y)) * ((double) (((double) cbrt(x)) / ((double) cbrt(y)))))))) + ((double) (((double) (z / t)) * ((double) (z / 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.9 |
Initial program 33.3
Simplified25.0
rmApplied add-sqr-sqrt45.1
Applied times-frac41.1
Applied add-sqr-sqrt41.2
Applied unswap-sqr39.4
Simplified39.3
Simplified13.6
rmApplied add-sqr-sqrt38.6
Applied times-frac34.0
Applied add-sqr-sqrt34.1
Applied unswap-sqr32.3
Simplified32.2
Simplified0.4
rmApplied add-cube-cbrt0.8
Applied add-cube-cbrt0.9
Applied times-frac0.9
Applied associate-*l*0.9
Simplified0.9
Final simplification0.9
herbie shell --seed 2020192
(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))))