\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{t - z} \cdot \sqrt[3]{t - z}}}} \cdot \frac{\sqrt[3]{1}}{\frac{\sqrt[3]{y - z}}{\frac{\sqrt[3]{x}}{\sqrt[3]{t - z}}}}(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
(FPCore (x y z t)
:precision binary64
(*
(/
(* (cbrt 1.0) (cbrt 1.0))
(/
(* (cbrt (- y z)) (cbrt (- y z)))
(/ (* (cbrt x) (cbrt x)) (* (cbrt (- t z)) (cbrt (- t z))))))
(/ (cbrt 1.0) (/ (cbrt (- y z)) (/ (cbrt x) (cbrt (- t z)))))))double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
double code(double x, double y, double z, double t) {
return ((cbrt(1.0) * cbrt(1.0)) / ((cbrt(y - z) * cbrt(y - z)) / ((cbrt(x) * cbrt(x)) / (cbrt(t - z) * cbrt(t - z))))) * (cbrt(1.0) / (cbrt(y - z) / (cbrt(x) / cbrt(t - z))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 8.1 |
|---|---|
| Target | 8.9 |
| Herbie | 1.2 |
Initial program 8.1
rmApplied clear-num_binary64_208788.4
Simplified2.4
rmApplied add-cube-cbrt_binary64_209143.0
Applied add-cube-cbrt_binary64_209143.2
Applied times-frac_binary64_208853.2
Applied add-cube-cbrt_binary64_209143.3
Applied times-frac_binary64_208851.7
Applied add-cube-cbrt_binary64_209141.7
Applied times-frac_binary64_208851.2
Final simplification1.2
herbie shell --seed 2021098
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))