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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 14.1 |
|---|---|
| Target | 1.4 |
| Herbie | 2.1 |
Initial program 14.1
Simplified6.1
Applied add-cube-cbrt_binary646.9
Applied add-cube-cbrt_binary647.1
Applied times-frac_binary647.1
Applied associate-*r*_binary642.1
Applied pow2_binary642.1
Final simplification2.1
herbie shell --seed 2022131
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, B"
:precision binary64
:herbie-target
(if (< (/ (* (/ y z) t) t) -1.20672205123045e+245) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) -5.907522236933906e-275) (* x (/ y z)) (if (< (/ (* (/ y z) t) t) 5.658954423153415e-65) (/ y (/ z x)) (if (< (/ (* (/ y z) t) t) 2.0087180502407133e+217) (* x (/ y z)) (/ (* y x) z)))))
(* x (/ (* (/ y z) t) t)))