\frac{a1 \cdot a2}{b1 \cdot b2}\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\frac{\sqrt[3]{b1} \cdot \sqrt[3]{b1}}{\frac{\sqrt[3]{a2} \cdot \sqrt[3]{a2}}{\sqrt[3]{b2} \cdot \sqrt[3]{b2}}}} \cdot \frac{\sqrt[3]{a1}}{\frac{\sqrt[3]{b1}}{\frac{\sqrt[3]{a2}}{\sqrt[3]{b2}}}}(FPCore (a1 a2 b1 b2) :precision binary64 (/ (* a1 a2) (* b1 b2)))
(FPCore (a1 a2 b1 b2)
:precision binary64
(*
(/
(* (cbrt a1) (cbrt a1))
(/
(* (cbrt b1) (cbrt b1))
(/ (* (cbrt a2) (cbrt a2)) (* (cbrt b2) (cbrt b2)))))
(/ (cbrt a1) (/ (cbrt b1) (/ (cbrt a2) (cbrt b2))))))double code(double a1, double a2, double b1, double b2) {
return (a1 * a2) / (b1 * b2);
}
double code(double a1, double a2, double b1, double b2) {
return ((cbrt(a1) * cbrt(a1)) / ((cbrt(b1) * cbrt(b1)) / ((cbrt(a2) * cbrt(a2)) / (cbrt(b2) * cbrt(b2))))) * (cbrt(a1) / (cbrt(b1) / (cbrt(a2) / cbrt(b2))));
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.1 |
|---|---|
| Target | 11.5 |
| Herbie | 3.4 |
Initial program 11.1
rmApplied associate-/l*_binary64_241010.9
Simplified11.2
rmApplied add-cube-cbrt_binary64_250011.8
Applied add-cube-cbrt_binary64_250012.0
Applied times-frac_binary64_247112.0
Applied add-cube-cbrt_binary64_250012.1
Applied times-frac_binary64_24718.2
Applied add-cube-cbrt_binary64_25008.3
Applied times-frac_binary64_24713.4
Final simplification3.4
herbie shell --seed 2021084
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:precision binary64
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))