x \cdot \sqrt{y \cdot y - z \cdot z}\left(\left|\sqrt[3]{y + z} \cdot \sqrt[3]{y - z}\right| \cdot x\right) \cdot \sqrt{\sqrt[3]{y + z} \cdot \sqrt[3]{y - z}}(FPCore (x y z) :precision binary64 (* x (sqrt (- (* y y) (* z z)))))
(FPCore (x y z) :precision binary64 (* (* (fabs (* (cbrt (+ y z)) (cbrt (- y z)))) x) (sqrt (* (cbrt (+ y z)) (cbrt (- y z))))))
double code(double x, double y, double z) {
return x * sqrt((y * y) - (z * z));
}
double code(double x, double y, double z) {
return (fabs(cbrt(y + z) * cbrt(y - z)) * x) * sqrt(cbrt(y + z) * cbrt(y - z));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 25.0 |
|---|---|
| Target | 0.5 |
| Herbie | 1.2 |
Initial program 25.0
rmApplied add-cube-cbrt_binary6425.5
Applied sqrt-prod_binary6425.5
Applied associate-*r*_binary6425.5
Simplified25.5
rmApplied difference-of-squares_binary6425.5
Applied cbrt-prod_binary6425.5
rmApplied difference-of-squares_binary6425.5
Applied cbrt-prod_binary641.2
Final simplification1.2
herbie shell --seed 2020231
(FPCore (x y z)
:name "Diagrams.TwoD.Apollonian:initialConfig from diagrams-contrib-1.3.0.5, B"
:precision binary64
:herbie-target
(if (< y 2.5816096488251695e-278) (- (* x y)) (* x (* (sqrt (+ y z)) (sqrt (- y z)))))
(* x (sqrt (- (* y y) (* z z)))))