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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 3.7 |
|---|---|
| Target | 1.8 |
| Herbie | 1.6 |
Initial program 3.7
Applied add-cube-cbrt_binary643.9
Applied times-frac_binary641.6
Final simplification1.6
herbie shell --seed 2022130
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))