(FPCore (x y z t) :precision binary64 (/ x (* (- y z) (- t z))))
(FPCore (x y z t) :precision binary64 (let* ((t_1 (cbrt (- y z)))) (* (/ (cbrt x) (* t_1 t_1)) (* (/ (cbrt x) (- t z)) (/ (cbrt x) t_1)))))
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) {
double t_1 = cbrt((y - z));
return (cbrt(x) / (t_1 * t_1)) * ((cbrt(x) / (t - z)) * (cbrt(x) / t_1));
}
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
public static double code(double x, double y, double z, double t) {
double t_1 = Math.cbrt((y - z));
return (Math.cbrt(x) / (t_1 * t_1)) * ((Math.cbrt(x) / (t - z)) * (Math.cbrt(x) / t_1));
}
function code(x, y, z, t) return Float64(x / Float64(Float64(y - z) * Float64(t - z))) end
function code(x, y, z, t) t_1 = cbrt(Float64(y - z)) return Float64(Float64(cbrt(x) / Float64(t_1 * t_1)) * Float64(Float64(cbrt(x) / Float64(t - z)) * Float64(cbrt(x) / t_1))) end
code[x_, y_, z_, t_] := N[(x / N[(N[(y - z), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Power[N[(y - z), $MachinePrecision], 1/3], $MachinePrecision]}, N[(N[(N[Power[x, 1/3], $MachinePrecision] / N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[x, 1/3], $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\frac{x}{\left(y - z\right) \cdot \left(t - z\right)}
\begin{array}{l}
t_1 := \sqrt[3]{y - z}\\
\frac{\sqrt[3]{x}}{t_1 \cdot t_1} \cdot \left(\frac{\sqrt[3]{x}}{t - z} \cdot \frac{\sqrt[3]{x}}{t_1}\right)
\end{array}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.5 |
|---|---|
| Target | 8.3 |
| Herbie | 1.2 |
Initial program 7.5
Applied add-cube-cbrt_binary648.0
Applied times-frac_binary641.7
Applied add-cube-cbrt_binary641.8
Applied times-frac_binary641.8
Applied associate-*l*_binary641.2
Simplified1.2
Final simplification1.2
herbie shell --seed 2022129
(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))))