\frac{a1 \cdot a2}{b1 \cdot b2}\left(a2 \cdot \frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{b1} \cdot \sqrt[3]{b1}}}{\sqrt[3]{b2} \cdot \sqrt[3]{b2}}\right) \cdot \frac{\frac{\sqrt[3]{a1}}{\sqrt[3]{b1}}}{\sqrt[3]{b2}}(FPCore (a1 a2 b1 b2) :precision binary64 (/ (* a1 a2) (* b1 b2)))
(FPCore (a1 a2 b1 b2)
:precision binary64
(*
(*
a2
(/
(/ (* (cbrt a1) (cbrt a1)) (* (cbrt b1) (cbrt b1)))
(* (cbrt b2) (cbrt b2))))
(/ (/ (cbrt a1) (cbrt b1)) (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 (a2 * (((cbrt(a1) * cbrt(a1)) / (cbrt(b1) * cbrt(b1))) / (cbrt(b2) * cbrt(b2)))) * ((cbrt(a1) / cbrt(b1)) / cbrt(b2));
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.4 |
|---|---|
| Target | 11.2 |
| Herbie | 3.1 |
Initial program 11.4
rmApplied associate-/r*_binary6411.5
Simplified11.3
rmApplied *-un-lft-identity_binary6411.3
Applied times-frac_binary6411.1
Simplified11.1
rmApplied add-cube-cbrt_binary6411.7
Applied add-cube-cbrt_binary6411.8
Applied add-cube-cbrt_binary6411.9
Applied times-frac_binary6411.9
Applied times-frac_binary648.0
Applied associate-*r*_binary643.1
Final simplification3.1
herbie shell --seed 2020231
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:precision binary64
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))