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) (x * ((double) (((double) cbrt(x)) / y)))) * ((double) (((double) cbrt(x)) * ((double) (((double) cbrt(x)) / 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.9 |
|---|---|
| Target | 0.4 |
| Herbie | 0.8 |
Initial program 33.9
Simplified25.2
rmApplied add-sqr-sqrt44.6
Applied times-frac40.9
Applied add-sqr-sqrt40.9
Applied unswap-sqr39.1
Simplified39.0
Simplified13.8
rmApplied add-sqr-sqrt38.7
Applied times-frac34.0
Applied add-sqr-sqrt34.0
Applied unswap-sqr32.0
Simplified31.9
Simplified0.4
rmApplied add-sqr-sqrt32.3
Applied add-cube-cbrt32.4
Applied times-frac32.4
Applied add-sqr-sqrt32.4
Applied add-cube-cbrt32.5
Applied times-frac32.5
Applied swap-sqr32.5
Simplified32.4
Simplified0.8
Final simplification0.8
herbie shell --seed 2020191
(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))))