(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y)))
(if (<= x -1e+106)
(fabs (- t_0 (/ z (/ y x))))
(if (<= x 2.211824109761336e-38)
(fabs (/ (- x (fma z x -4.0)) y))
(fabs (- t_0 (/ x (/ y z))))))))double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
double code(double x, double y, double z) {
double t_0 = (x + 4.0) / y;
double tmp;
if (x <= -1e+106) {
tmp = fabs((t_0 - (z / (y / x))));
} else if (x <= 2.211824109761336e-38) {
tmp = fabs(((x - fma(z, x, -4.0)) / y));
} else {
tmp = fabs((t_0 - (x / (y / z))));
}
return tmp;
}
function code(x, y, z) return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z))) end
function code(x, y, z) t_0 = Float64(Float64(x + 4.0) / y) tmp = 0.0 if (x <= -1e+106) tmp = abs(Float64(t_0 - Float64(z / Float64(y / x)))); elseif (x <= 2.211824109761336e-38) tmp = abs(Float64(Float64(x - fma(z, x, -4.0)) / y)); else tmp = abs(Float64(t_0 - Float64(x / Float64(y / z)))); end return tmp end
code[x_, y_, z_] := N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[x, -1e+106], N[Abs[N[(t$95$0 - N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 2.211824109761336e-38], N[Abs[N[(N[(x - N[(z * x + -4.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision], N[Abs[N[(t$95$0 - N[(x / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\begin{array}{l}
t_0 := \frac{x + 4}{y}\\
\mathbf{if}\;x \leq -1 \cdot 10^{+106}:\\
\;\;\;\;\left|t_0 - \frac{z}{\frac{y}{x}}\right|\\
\mathbf{elif}\;x \leq 2.211824109761336 \cdot 10^{-38}:\\
\;\;\;\;\left|\frac{x - \mathsf{fma}\left(z, x, -4\right)}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t_0 - \frac{x}{\frac{y}{z}}\right|\\
\end{array}
if x < -1.00000000000000009e106Initial program 0.1
Applied egg-rr0.1
if -1.00000000000000009e106 < x < 2.21182410976133591e-38Initial program 2.2
Taylor expanded in x around 0 5.3
Taylor expanded in y around 0 0.4
Simplified0.4
if 2.21182410976133591e-38 < x Initial program 0.1
Applied egg-rr0.3
Final simplification0.4
herbie shell --seed 2022210
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))