(FPCore (x y z t) :precision binary64 (+ (* (/ x y) (- z t)) t))
(FPCore (x y z t) :precision binary64 (+ t (* (/ (* (cbrt x) (cbrt x)) (pow (cbrt y) 2.0)) (* (/ (cbrt x) (cbrt y)) (- z t)))))
double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + t;
}
double code(double x, double y, double z, double t) {
return t + (((cbrt(x) * cbrt(x)) / pow(cbrt(y), 2.0)) * ((cbrt(x) / cbrt(y)) * (z - t)));
}
public static double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + t;
}
public static double code(double x, double y, double z, double t) {
return t + (((Math.cbrt(x) * Math.cbrt(x)) / Math.pow(Math.cbrt(y), 2.0)) * ((Math.cbrt(x) / Math.cbrt(y)) * (z - t)));
}
function code(x, y, z, t) return Float64(Float64(Float64(x / y) * Float64(z - t)) + t) end
function code(x, y, z, t) return Float64(t + Float64(Float64(Float64(cbrt(x) * cbrt(x)) / (cbrt(y) ^ 2.0)) * Float64(Float64(cbrt(x) / cbrt(y)) * Float64(z - t)))) end
code[x_, y_, z_, t_] := N[(N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]
code[x_, y_, z_, t_] := N[(t + N[(N[(N[(N[Power[x, 1/3], $MachinePrecision] * N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[y, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[x, 1/3], $MachinePrecision] / N[Power[y, 1/3], $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{x}{y} \cdot \left(z - t\right) + t
t + \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{{\left(\sqrt[3]{y}\right)}^{2}} \cdot \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}} \cdot \left(z - t\right)\right)




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.4 |
| Herbie | 0.9 |
Initial program 2.0
Applied add-cube-cbrt_binary642.5
Applied add-cube-cbrt_binary642.7
Applied times-frac_binary642.7
Applied associate-*l*_binary640.9
Applied pow2_binary640.9
Final simplification0.9
herbie shell --seed 2022131
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))
(+ (* (/ x y) (- z t)) t))