\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.3 |
|---|---|
| Target | 11.1 |
| Herbie | 3.1 |
Initial program 11.3
rmApplied associate-/l*_binary6410.9
Simplified10.9
rmApplied add-cube-cbrt_binary6411.5
Applied add-cube-cbrt_binary6411.6
Applied times-frac_binary6411.6
Applied add-cube-cbrt_binary6411.7
Applied times-frac_binary648.1
Applied add-cube-cbrt_binary648.2
Applied times-frac_binary643.1
Final simplification3.1
herbie shell --seed 2021205
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:precision binary64
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))