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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 1.3 |
|---|---|
| Target | 1.1 |
| Herbie | 0.5 |
Initial program 1.3
Applied add-cube-cbrt_binary641.8
Applied add-cube-cbrt_binary641.6
Applied times-frac_binary641.6
Applied associate-*r*_binary640.5
Applied pow1_binary640.5
Applied pow1_binary640.5
Applied pow-sqr_binary640.5
Final simplification0.5
herbie shell --seed 2022130
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))