(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 (fma y (/ (- z t) (- z a)) x)))
(if (<= y -5.3186352085026664e-11)
t_1
(if (<= y 3.850809288581042e-38)
(- (+ x (/ (* y z) (- z a))) (/ (* y t) (- z a)))
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 = fma(y, ((z - t) / (z - a)), x);
double tmp;
if (y <= -5.3186352085026664e-11) {
tmp = t_1;
} else if (y <= 3.850809288581042e-38) {
tmp = (x + ((y * z) / (z - a))) - ((y * t) / (z - a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function code(x, y, z, t, a) t_1 = fma(y, Float64(Float64(z - t) / Float64(z - a)), x) tmp = 0.0 if (y <= -5.3186352085026664e-11) tmp = t_1; elseif (y <= 3.850809288581042e-38) tmp = Float64(Float64(x + Float64(Float64(y * z) / Float64(z - a))) - Float64(Float64(y * t) / Float64(z - a))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -5.3186352085026664e-11], t$95$1, If[LessEqual[y, 3.850809288581042e-38], N[(N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
x + \frac{y \cdot \left(z - t\right)}{z - a}
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)\\
\mathbf{if}\;y \leq -5.3186352085026664 \cdot 10^{-11}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.850809288581042 \cdot 10^{-38}:\\
\;\;\;\;\left(x + \frac{y \cdot z}{z - a}\right) - \frac{y \cdot t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 11.3 |
|---|---|
| Target | 1.4 |
| Herbie | 0.4 |
if y < -5.31863520850266644e-11 or 3.8508092885810421e-38 < y Initial program 22.1
Simplified0.6
Applied add-cube-cbrt_binary641.8
Applied pow1/3_binary6434.4
Applied pow1/3_binary6434.9
Applied pow1/3_binary6435.2
Applied pow-sqr_binary6435.2
Applied pow-prod-up_binary640.6
if -5.31863520850266644e-11 < y < 3.8508092885810421e-38Initial program 0.3
Simplified2.6
Taylor expanded in y around 0 0.3
Final simplification0.4
herbie shell --seed 2022131
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))