
(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = abs((((x + 4.0d0) / y) - ((x / y) * z)))
end function
public static double code(double x, double y, double z) {
return Math.abs((((x + 4.0) / y) - ((x / y) * z)));
}
def code(x, y, z): return math.fabs((((x + 4.0) / y) - ((x / y) * z)))
function code(x, y, z) return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z))) end
function tmp = code(x, y, z) tmp = abs((((x + 4.0) / y) - ((x / y) * z))); 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]
\begin{array}{l}
\\
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = abs((((x + 4.0d0) / y) - ((x / y) * z)))
end function
public static double code(double x, double y, double z) {
return Math.abs((((x + 4.0) / y) - ((x / y) * z)));
}
def code(x, y, z): return math.fabs((((x + 4.0) / y) - ((x / y) * z)))
function code(x, y, z) return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z))) end
function tmp = code(x, y, z) tmp = abs((((x + 4.0) / y) - ((x / y) * z))); 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]
\begin{array}{l}
\\
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\end{array}
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 9.2e-46) (fabs (/ (- (+ x 4.0) (* x z)) y_m)) (fabs (fma x (/ z y_m) (/ (- -4.0 x) y_m)))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 9.2e-46) {
tmp = fabs((((x + 4.0) - (x * z)) / y_m));
} else {
tmp = fabs(fma(x, (z / y_m), ((-4.0 - x) / y_m)));
}
return tmp;
}
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 9.2e-46) tmp = abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m)); else tmp = abs(fma(x, Float64(z / y_m), Float64(Float64(-4.0 - x) / y_m))); end return tmp end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[y$95$m, 9.2e-46], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(x * N[(z / y$95$m), $MachinePrecision] + N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 9.2 \cdot 10^{-46}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\mathsf{fma}\left(x, \frac{z}{y\_m}, \frac{-4 - x}{y\_m}\right)\right|\\
\end{array}
\end{array}
if y < 9.1999999999999997e-46Initial program 85.8%
associate-*l/88.8%
sub-div95.1%
Applied egg-rr95.1%
if 9.1999999999999997e-46 < y Initial program 96.5%
fabs-sub96.5%
associate-*l/94.1%
associate-*r/99.9%
fma-neg99.9%
distribute-neg-frac99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification96.6%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (fabs (* z (/ x y_m)))) (t_1 (fabs (/ x y_m))))
(if (<= x -8e+105)
t_0
(if (<= x -3.8e+80)
t_1
(if (<= x -2e-78)
t_0
(if (<= x 4900000000.0)
(fabs (/ 4.0 y_m))
(if (<= x 4.4e+70) t_0 t_1)))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs((z * (x / y_m)));
double t_1 = fabs((x / y_m));
double tmp;
if (x <= -8e+105) {
tmp = t_0;
} else if (x <= -3.8e+80) {
tmp = t_1;
} else if (x <= -2e-78) {
tmp = t_0;
} else if (x <= 4900000000.0) {
tmp = fabs((4.0 / y_m));
} else if (x <= 4.4e+70) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = abs((z * (x / y_m)))
t_1 = abs((x / y_m))
if (x <= (-8d+105)) then
tmp = t_0
else if (x <= (-3.8d+80)) then
tmp = t_1
else if (x <= (-2d-78)) then
tmp = t_0
else if (x <= 4900000000.0d0) then
tmp = abs((4.0d0 / y_m))
else if (x <= 4.4d+70) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs((z * (x / y_m)));
double t_1 = Math.abs((x / y_m));
double tmp;
if (x <= -8e+105) {
tmp = t_0;
} else if (x <= -3.8e+80) {
tmp = t_1;
} else if (x <= -2e-78) {
tmp = t_0;
} else if (x <= 4900000000.0) {
tmp = Math.abs((4.0 / y_m));
} else if (x <= 4.4e+70) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs((z * (x / y_m))) t_1 = math.fabs((x / y_m)) tmp = 0 if x <= -8e+105: tmp = t_0 elif x <= -3.8e+80: tmp = t_1 elif x <= -2e-78: tmp = t_0 elif x <= 4900000000.0: tmp = math.fabs((4.0 / y_m)) elif x <= 4.4e+70: tmp = t_0 else: tmp = t_1 return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(z * Float64(x / y_m))) t_1 = abs(Float64(x / y_m)) tmp = 0.0 if (x <= -8e+105) tmp = t_0; elseif (x <= -3.8e+80) tmp = t_1; elseif (x <= -2e-78) tmp = t_0; elseif (x <= 4900000000.0) tmp = abs(Float64(4.0 / y_m)); elseif (x <= 4.4e+70) tmp = t_0; else tmp = t_1; end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs((z * (x / y_m))); t_1 = abs((x / y_m)); tmp = 0.0; if (x <= -8e+105) tmp = t_0; elseif (x <= -3.8e+80) tmp = t_1; elseif (x <= -2e-78) tmp = t_0; elseif (x <= 4900000000.0) tmp = abs((4.0 / y_m)); elseif (x <= 4.4e+70) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -8e+105], t$95$0, If[LessEqual[x, -3.8e+80], t$95$1, If[LessEqual[x, -2e-78], t$95$0, If[LessEqual[x, 4900000000.0], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 4.4e+70], t$95$0, t$95$1]]]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|z \cdot \frac{x}{y\_m}\right|\\
t_1 := \left|\frac{x}{y\_m}\right|\\
\mathbf{if}\;x \leq -8 \cdot 10^{+105}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -3.8 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 4900000000:\\
\;\;\;\;\left|\frac{4}{y\_m}\right|\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+70}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -7.9999999999999995e105 or -3.79999999999999997e80 < x < -2e-78 or 4.9e9 < x < 4.40000000000000001e70Initial program 88.8%
Simplified90.4%
Taylor expanded in z around inf 54.0%
associate-*r/54.0%
neg-mul-154.0%
distribute-rgt-neg-in54.0%
Simplified54.0%
*-commutative54.0%
associate-/l*72.5%
add-sqr-sqrt39.4%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod32.8%
add-sqr-sqrt72.5%
Applied egg-rr72.5%
if -7.9999999999999995e105 < x < -3.79999999999999997e80 or 4.40000000000000001e70 < x Initial program 85.1%
Taylor expanded in z around 0 73.8%
Taylor expanded in x around inf 73.8%
if -2e-78 < x < 4.9e9Initial program 91.9%
Simplified99.8%
Taylor expanded in x around 0 70.8%
Final simplification72.1%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (fabs (* x (/ z y_m)))) (t_1 (fabs (/ x y_m))))
(if (<= z -1.0)
t_0
(if (<= z 2.15e-303)
t_1
(if (<= z 3e-172) (fabs (/ 4.0 y_m)) (if (<= z 2.7) t_1 t_0))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs((x * (z / y_m)));
double t_1 = fabs((x / y_m));
double tmp;
if (z <= -1.0) {
tmp = t_0;
} else if (z <= 2.15e-303) {
tmp = t_1;
} else if (z <= 3e-172) {
tmp = fabs((4.0 / y_m));
} else if (z <= 2.7) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = abs((x * (z / y_m)))
t_1 = abs((x / y_m))
if (z <= (-1.0d0)) then
tmp = t_0
else if (z <= 2.15d-303) then
tmp = t_1
else if (z <= 3d-172) then
tmp = abs((4.0d0 / y_m))
else if (z <= 2.7d0) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs((x * (z / y_m)));
double t_1 = Math.abs((x / y_m));
double tmp;
if (z <= -1.0) {
tmp = t_0;
} else if (z <= 2.15e-303) {
tmp = t_1;
} else if (z <= 3e-172) {
tmp = Math.abs((4.0 / y_m));
} else if (z <= 2.7) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs((x * (z / y_m))) t_1 = math.fabs((x / y_m)) tmp = 0 if z <= -1.0: tmp = t_0 elif z <= 2.15e-303: tmp = t_1 elif z <= 3e-172: tmp = math.fabs((4.0 / y_m)) elif z <= 2.7: tmp = t_1 else: tmp = t_0 return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(x * Float64(z / y_m))) t_1 = abs(Float64(x / y_m)) tmp = 0.0 if (z <= -1.0) tmp = t_0; elseif (z <= 2.15e-303) tmp = t_1; elseif (z <= 3e-172) tmp = abs(Float64(4.0 / y_m)); elseif (z <= 2.7) tmp = t_1; else tmp = t_0; end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs((x * (z / y_m))); t_1 = abs((x / y_m)); tmp = 0.0; if (z <= -1.0) tmp = t_0; elseif (z <= 2.15e-303) tmp = t_1; elseif (z <= 3e-172) tmp = abs((4.0 / y_m)); elseif (z <= 2.7) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -1.0], t$95$0, If[LessEqual[z, 2.15e-303], t$95$1, If[LessEqual[z, 3e-172], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 2.7], t$95$1, t$95$0]]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|x \cdot \frac{z}{y\_m}\right|\\
t_1 := \left|\frac{x}{y\_m}\right|\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-172}:\\
\;\;\;\;\left|\frac{4}{y\_m}\right|\\
\mathbf{elif}\;z \leq 2.7:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -1 or 2.7000000000000002 < z Initial program 87.3%
Simplified90.3%
Taylor expanded in z around inf 70.1%
associate-*r/70.1%
neg-mul-170.1%
distribute-rgt-neg-in70.1%
Simplified70.1%
distribute-rgt-neg-out70.1%
distribute-frac-neg70.1%
distribute-frac-neg270.1%
associate-*r/77.5%
*-commutative77.5%
add-sqr-sqrt42.3%
sqrt-unprod54.2%
sqr-neg54.2%
sqrt-unprod35.0%
add-sqr-sqrt77.5%
Applied egg-rr77.5%
if -1 < z < 2.14999999999999991e-303 or 2.99999999999999984e-172 < z < 2.7000000000000002Initial program 95.8%
Taylor expanded in z around 0 99.0%
Taylor expanded in x around inf 62.4%
if 2.14999999999999991e-303 < z < 2.99999999999999984e-172Initial program 71.4%
Simplified99.9%
Taylor expanded in x around 0 64.6%
Final simplification70.8%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (fabs (/ x y_m))))
(if (<= z -1.0)
(fabs (/ x (/ y_m z)))
(if (<= z 8.5e-303)
t_0
(if (<= z 4.8e-175)
(fabs (/ 4.0 y_m))
(if (<= z 2.6) t_0 (fabs (* x (/ z y_m)))))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs((x / y_m));
double tmp;
if (z <= -1.0) {
tmp = fabs((x / (y_m / z)));
} else if (z <= 8.5e-303) {
tmp = t_0;
} else if (z <= 4.8e-175) {
tmp = fabs((4.0 / y_m));
} else if (z <= 2.6) {
tmp = t_0;
} else {
tmp = fabs((x * (z / y_m)));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = abs((x / y_m))
if (z <= (-1.0d0)) then
tmp = abs((x / (y_m / z)))
else if (z <= 8.5d-303) then
tmp = t_0
else if (z <= 4.8d-175) then
tmp = abs((4.0d0 / y_m))
else if (z <= 2.6d0) then
tmp = t_0
else
tmp = abs((x * (z / y_m)))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs((x / y_m));
double tmp;
if (z <= -1.0) {
tmp = Math.abs((x / (y_m / z)));
} else if (z <= 8.5e-303) {
tmp = t_0;
} else if (z <= 4.8e-175) {
tmp = Math.abs((4.0 / y_m));
} else if (z <= 2.6) {
tmp = t_0;
} else {
tmp = Math.abs((x * (z / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs((x / y_m)) tmp = 0 if z <= -1.0: tmp = math.fabs((x / (y_m / z))) elif z <= 8.5e-303: tmp = t_0 elif z <= 4.8e-175: tmp = math.fabs((4.0 / y_m)) elif z <= 2.6: tmp = t_0 else: tmp = math.fabs((x * (z / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(x / y_m)) tmp = 0.0 if (z <= -1.0) tmp = abs(Float64(x / Float64(y_m / z))); elseif (z <= 8.5e-303) tmp = t_0; elseif (z <= 4.8e-175) tmp = abs(Float64(4.0 / y_m)); elseif (z <= 2.6) tmp = t_0; else tmp = abs(Float64(x * Float64(z / y_m))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs((x / y_m)); tmp = 0.0; if (z <= -1.0) tmp = abs((x / (y_m / z))); elseif (z <= 8.5e-303) tmp = t_0; elseif (z <= 4.8e-175) tmp = abs((4.0 / y_m)); elseif (z <= 2.6) tmp = t_0; else tmp = abs((x * (z / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -1.0], N[Abs[N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 8.5e-303], t$95$0, If[LessEqual[z, 4.8e-175], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 2.6], t$95$0, N[Abs[N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|\frac{x}{y\_m}\right|\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;\left|\frac{x}{\frac{y\_m}{z}}\right|\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-303}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-175}:\\
\;\;\;\;\left|\frac{4}{y\_m}\right|\\
\mathbf{elif}\;z \leq 2.6:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left|x \cdot \frac{z}{y\_m}\right|\\
\end{array}
\end{array}
if z < -1Initial program 92.1%
Simplified91.7%
Taylor expanded in z around inf 72.4%
mul-1-neg72.4%
distribute-frac-neg272.4%
associate-/l*77.8%
Simplified77.8%
clear-num77.7%
un-div-inv77.9%
add-sqr-sqrt42.0%
sqrt-unprod54.7%
sqr-neg54.7%
sqrt-unprod35.6%
add-sqr-sqrt77.9%
Applied egg-rr77.9%
if -1 < z < 8.5e-303 or 4.8e-175 < z < 2.60000000000000009Initial program 95.8%
Taylor expanded in z around 0 99.0%
Taylor expanded in x around inf 62.4%
if 8.5e-303 < z < 4.8e-175Initial program 71.4%
Simplified99.9%
Taylor expanded in x around 0 64.6%
if 2.60000000000000009 < z Initial program 82.2%
Simplified88.7%
Taylor expanded in z around inf 67.7%
associate-*r/67.7%
neg-mul-167.7%
distribute-rgt-neg-in67.7%
Simplified67.7%
distribute-rgt-neg-out67.7%
distribute-frac-neg67.7%
distribute-frac-neg267.7%
associate-*r/77.2%
*-commutative77.2%
add-sqr-sqrt42.6%
sqrt-unprod53.8%
sqr-neg53.8%
sqrt-unprod34.4%
add-sqr-sqrt77.2%
Applied egg-rr77.2%
Final simplification70.8%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (fabs (/ (- -4.0 x) y_m))))
(if (<= z -9e+35)
(fabs (/ x (/ y_m z)))
(if (<= z 9000000000000.0)
t_0
(if (<= z 1.45e+92)
(fabs (* z (/ x y_m)))
(if (<= z 2.55e+157) t_0 (fabs (* x (/ z y_m)))))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs(((-4.0 - x) / y_m));
double tmp;
if (z <= -9e+35) {
tmp = fabs((x / (y_m / z)));
} else if (z <= 9000000000000.0) {
tmp = t_0;
} else if (z <= 1.45e+92) {
tmp = fabs((z * (x / y_m)));
} else if (z <= 2.55e+157) {
tmp = t_0;
} else {
tmp = fabs((x * (z / y_m)));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = abs((((-4.0d0) - x) / y_m))
if (z <= (-9d+35)) then
tmp = abs((x / (y_m / z)))
else if (z <= 9000000000000.0d0) then
tmp = t_0
else if (z <= 1.45d+92) then
tmp = abs((z * (x / y_m)))
else if (z <= 2.55d+157) then
tmp = t_0
else
tmp = abs((x * (z / y_m)))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs(((-4.0 - x) / y_m));
double tmp;
if (z <= -9e+35) {
tmp = Math.abs((x / (y_m / z)));
} else if (z <= 9000000000000.0) {
tmp = t_0;
} else if (z <= 1.45e+92) {
tmp = Math.abs((z * (x / y_m)));
} else if (z <= 2.55e+157) {
tmp = t_0;
} else {
tmp = Math.abs((x * (z / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs(((-4.0 - x) / y_m)) tmp = 0 if z <= -9e+35: tmp = math.fabs((x / (y_m / z))) elif z <= 9000000000000.0: tmp = t_0 elif z <= 1.45e+92: tmp = math.fabs((z * (x / y_m))) elif z <= 2.55e+157: tmp = t_0 else: tmp = math.fabs((x * (z / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(Float64(-4.0 - x) / y_m)) tmp = 0.0 if (z <= -9e+35) tmp = abs(Float64(x / Float64(y_m / z))); elseif (z <= 9000000000000.0) tmp = t_0; elseif (z <= 1.45e+92) tmp = abs(Float64(z * Float64(x / y_m))); elseif (z <= 2.55e+157) tmp = t_0; else tmp = abs(Float64(x * Float64(z / y_m))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs(((-4.0 - x) / y_m)); tmp = 0.0; if (z <= -9e+35) tmp = abs((x / (y_m / z))); elseif (z <= 9000000000000.0) tmp = t_0; elseif (z <= 1.45e+92) tmp = abs((z * (x / y_m))); elseif (z <= 2.55e+157) tmp = t_0; else tmp = abs((x * (z / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -9e+35], N[Abs[N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 9000000000000.0], t$95$0, If[LessEqual[z, 1.45e+92], N[Abs[N[(z * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 2.55e+157], t$95$0, N[Abs[N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|\frac{-4 - x}{y\_m}\right|\\
\mathbf{if}\;z \leq -9 \cdot 10^{+35}:\\
\;\;\;\;\left|\frac{x}{\frac{y\_m}{z}}\right|\\
\mathbf{elif}\;z \leq 9000000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+92}:\\
\;\;\;\;\left|z \cdot \frac{x}{y\_m}\right|\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{+157}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left|x \cdot \frac{z}{y\_m}\right|\\
\end{array}
\end{array}
if z < -8.9999999999999993e35Initial program 90.9%
Simplified90.4%
Taylor expanded in z around inf 78.1%
mul-1-neg78.1%
distribute-frac-neg278.1%
associate-/l*84.5%
Simplified84.5%
clear-num84.3%
un-div-inv84.5%
add-sqr-sqrt46.4%
sqrt-unprod57.8%
sqr-neg57.8%
sqrt-unprod37.8%
add-sqr-sqrt84.5%
Applied egg-rr84.5%
if -8.9999999999999993e35 < z < 9e12 or 1.45e92 < z < 2.55e157Initial program 91.8%
Simplified99.1%
Taylor expanded in z around 0 93.9%
+-commutative93.9%
rem-square-sqrt51.5%
fabs-sqr51.5%
rem-square-sqrt93.9%
fabs-neg93.9%
distribute-neg-frac93.9%
distribute-neg-in93.9%
metadata-eval93.9%
+-commutative93.9%
sub-neg93.9%
rem-square-sqrt41.8%
fabs-sqr41.8%
rem-square-sqrt93.9%
Simplified93.9%
if 9e12 < z < 1.45e92Initial program 92.5%
Simplified86.3%
Taylor expanded in z around inf 66.2%
associate-*r/66.2%
neg-mul-166.2%
distribute-rgt-neg-in66.2%
Simplified66.2%
*-commutative66.2%
associate-/l*78.7%
add-sqr-sqrt0.0%
sqrt-unprod78.7%
sqr-neg78.7%
sqrt-unprod78.1%
add-sqr-sqrt78.7%
Applied egg-rr78.7%
if 2.55e157 < z Initial program 74.0%
Simplified86.2%
Taylor expanded in z around inf 86.3%
associate-*r/86.3%
neg-mul-186.3%
distribute-rgt-neg-in86.3%
Simplified86.3%
distribute-rgt-neg-out86.3%
distribute-frac-neg86.3%
distribute-frac-neg286.3%
associate-*r/97.2%
*-commutative97.2%
add-sqr-sqrt50.1%
sqrt-unprod68.6%
sqr-neg68.6%
sqrt-unprod46.8%
add-sqr-sqrt97.2%
Applied egg-rr97.2%
Final simplification91.2%
y_m = (fabs.f64 y)
(FPCore (x y_m z)
:precision binary64
(let* ((t_0 (fabs (/ (- -4.0 x) y_m))))
(if (<= z -2.1e+37)
(fabs (/ x (/ y_m z)))
(if (<= z 2000000000000.0)
t_0
(if (<= z 1.5e+92)
(fabs (* (- 1.0 z) (/ x y_m)))
(if (<= z 2.55e+157) t_0 (fabs (* x (/ z y_m)))))))))y_m = fabs(y);
double code(double x, double y_m, double z) {
double t_0 = fabs(((-4.0 - x) / y_m));
double tmp;
if (z <= -2.1e+37) {
tmp = fabs((x / (y_m / z)));
} else if (z <= 2000000000000.0) {
tmp = t_0;
} else if (z <= 1.5e+92) {
tmp = fabs(((1.0 - z) * (x / y_m)));
} else if (z <= 2.55e+157) {
tmp = t_0;
} else {
tmp = fabs((x * (z / y_m)));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = abs((((-4.0d0) - x) / y_m))
if (z <= (-2.1d+37)) then
tmp = abs((x / (y_m / z)))
else if (z <= 2000000000000.0d0) then
tmp = t_0
else if (z <= 1.5d+92) then
tmp = abs(((1.0d0 - z) * (x / y_m)))
else if (z <= 2.55d+157) then
tmp = t_0
else
tmp = abs((x * (z / y_m)))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double t_0 = Math.abs(((-4.0 - x) / y_m));
double tmp;
if (z <= -2.1e+37) {
tmp = Math.abs((x / (y_m / z)));
} else if (z <= 2000000000000.0) {
tmp = t_0;
} else if (z <= 1.5e+92) {
tmp = Math.abs(((1.0 - z) * (x / y_m)));
} else if (z <= 2.55e+157) {
tmp = t_0;
} else {
tmp = Math.abs((x * (z / y_m)));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): t_0 = math.fabs(((-4.0 - x) / y_m)) tmp = 0 if z <= -2.1e+37: tmp = math.fabs((x / (y_m / z))) elif z <= 2000000000000.0: tmp = t_0 elif z <= 1.5e+92: tmp = math.fabs(((1.0 - z) * (x / y_m))) elif z <= 2.55e+157: tmp = t_0 else: tmp = math.fabs((x * (z / y_m))) return tmp
y_m = abs(y) function code(x, y_m, z) t_0 = abs(Float64(Float64(-4.0 - x) / y_m)) tmp = 0.0 if (z <= -2.1e+37) tmp = abs(Float64(x / Float64(y_m / z))); elseif (z <= 2000000000000.0) tmp = t_0; elseif (z <= 1.5e+92) tmp = abs(Float64(Float64(1.0 - z) * Float64(x / y_m))); elseif (z <= 2.55e+157) tmp = t_0; else tmp = abs(Float64(x * Float64(z / y_m))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) t_0 = abs(((-4.0 - x) / y_m)); tmp = 0.0; if (z <= -2.1e+37) tmp = abs((x / (y_m / z))); elseif (z <= 2000000000000.0) tmp = t_0; elseif (z <= 1.5e+92) tmp = abs(((1.0 - z) * (x / y_m))); elseif (z <= 2.55e+157) tmp = t_0; else tmp = abs((x * (z / y_m))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision]
code[x_, y$95$m_, z_] := Block[{t$95$0 = N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -2.1e+37], N[Abs[N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 2000000000000.0], t$95$0, If[LessEqual[z, 1.5e+92], N[Abs[N[(N[(1.0 - z), $MachinePrecision] * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[z, 2.55e+157], t$95$0, N[Abs[N[(x * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
t_0 := \left|\frac{-4 - x}{y\_m}\right|\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+37}:\\
\;\;\;\;\left|\frac{x}{\frac{y\_m}{z}}\right|\\
\mathbf{elif}\;z \leq 2000000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+92}:\\
\;\;\;\;\left|\left(1 - z\right) \cdot \frac{x}{y\_m}\right|\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{+157}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left|x \cdot \frac{z}{y\_m}\right|\\
\end{array}
\end{array}
if z < -2.1000000000000001e37Initial program 90.9%
Simplified90.4%
Taylor expanded in z around inf 78.1%
mul-1-neg78.1%
distribute-frac-neg278.1%
associate-/l*84.5%
Simplified84.5%
clear-num84.3%
un-div-inv84.5%
add-sqr-sqrt46.4%
sqrt-unprod57.8%
sqr-neg57.8%
sqrt-unprod37.8%
add-sqr-sqrt84.5%
Applied egg-rr84.5%
if -2.1000000000000001e37 < z < 2e12 or 1.50000000000000007e92 < z < 2.55e157Initial program 91.8%
Simplified99.1%
Taylor expanded in z around 0 93.9%
+-commutative93.9%
rem-square-sqrt51.5%
fabs-sqr51.5%
rem-square-sqrt93.9%
fabs-neg93.9%
distribute-neg-frac93.9%
distribute-neg-in93.9%
metadata-eval93.9%
+-commutative93.9%
sub-neg93.9%
rem-square-sqrt41.8%
fabs-sqr41.8%
rem-square-sqrt93.9%
Simplified93.9%
if 2e12 < z < 1.50000000000000007e92Initial program 92.5%
Simplified86.3%
Taylor expanded in x around inf 66.2%
mul-1-neg66.2%
*-commutative66.2%
associate-/l*79.7%
distribute-lft-neg-in79.7%
neg-sub079.7%
associate-+l-79.7%
neg-sub079.7%
+-commutative79.7%
unsub-neg79.7%
Simplified79.7%
if 2.55e157 < z Initial program 74.0%
Simplified86.2%
Taylor expanded in z around inf 86.3%
associate-*r/86.3%
neg-mul-186.3%
distribute-rgt-neg-in86.3%
Simplified86.3%
distribute-rgt-neg-out86.3%
distribute-frac-neg86.3%
distribute-frac-neg286.3%
associate-*r/97.2%
*-commutative97.2%
add-sqr-sqrt50.1%
sqrt-unprod68.6%
sqr-neg68.6%
sqrt-unprod46.8%
add-sqr-sqrt97.2%
Applied egg-rr97.2%
Final simplification91.3%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= y_m 1.65e-118) (fabs (/ (- (+ x 4.0) (* x z)) y_m)) (fabs (- (/ (+ x 4.0) y_m) (/ x (/ y_m z))))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 1.65e-118) {
tmp = fabs((((x + 4.0) - (x * z)) / y_m));
} else {
tmp = fabs((((x + 4.0) / y_m) - (x / (y_m / z))));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (y_m <= 1.65d-118) then
tmp = abs((((x + 4.0d0) - (x * z)) / y_m))
else
tmp = abs((((x + 4.0d0) / y_m) - (x / (y_m / z))))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (y_m <= 1.65e-118) {
tmp = Math.abs((((x + 4.0) - (x * z)) / y_m));
} else {
tmp = Math.abs((((x + 4.0) / y_m) - (x / (y_m / z))));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if y_m <= 1.65e-118: tmp = math.fabs((((x + 4.0) - (x * z)) / y_m)) else: tmp = math.fabs((((x + 4.0) / y_m) - (x / (y_m / z)))) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (y_m <= 1.65e-118) tmp = abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m)); else tmp = abs(Float64(Float64(Float64(x + 4.0) / y_m) - Float64(x / Float64(y_m / z)))); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (y_m <= 1.65e-118) tmp = abs((((x + 4.0) - (x * z)) / y_m)); else tmp = abs((((x + 4.0) / y_m) - (x / (y_m / z)))); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[y$95$m, 1.65e-118], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y$95$m), $MachinePrecision] - N[(x / N[(y$95$m / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;y\_m \leq 1.65 \cdot 10^{-118}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y\_m} - \frac{x}{\frac{y\_m}{z}}\right|\\
\end{array}
\end{array}
if y < 1.65e-118Initial program 84.5%
associate-*l/87.7%
sub-div94.6%
Applied egg-rr94.6%
if 1.65e-118 < y Initial program 97.1%
associate-*l/95.0%
associate-*r/98.9%
clear-num98.8%
un-div-inv99.8%
Applied egg-rr99.8%
Final simplification96.6%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (<= x -8.2) (fabs (* (- 1.0 z) (/ x y_m))) (fabs (/ (- (+ x 4.0) (* x z)) y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if (x <= -8.2) {
tmp = fabs(((1.0 - z) * (x / y_m)));
} else {
tmp = fabs((((x + 4.0) - (x * z)) / y_m));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-8.2d0)) then
tmp = abs(((1.0d0 - z) * (x / y_m)))
else
tmp = abs((((x + 4.0d0) - (x * z)) / y_m))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if (x <= -8.2) {
tmp = Math.abs(((1.0 - z) * (x / y_m)));
} else {
tmp = Math.abs((((x + 4.0) - (x * z)) / y_m));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if x <= -8.2: tmp = math.fabs(((1.0 - z) * (x / y_m))) else: tmp = math.fabs((((x + 4.0) - (x * z)) / y_m)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if (x <= -8.2) tmp = abs(Float64(Float64(1.0 - z) * Float64(x / y_m))); else tmp = abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if (x <= -8.2) tmp = abs(((1.0 - z) * (x / y_m))); else tmp = abs((((x + 4.0) - (x * z)) / y_m)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[LessEqual[x, -8.2], N[Abs[N[(N[(1.0 - z), $MachinePrecision] * N[(x / y$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y$95$m), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2:\\
\;\;\;\;\left|\left(1 - z\right) \cdot \frac{x}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y\_m}\right|\\
\end{array}
\end{array}
if x < -8.1999999999999993Initial program 85.1%
Simplified88.3%
Taylor expanded in x around inf 88.4%
mul-1-neg88.4%
*-commutative88.4%
associate-/l*99.9%
distribute-lft-neg-in99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
if -8.1999999999999993 < x Initial program 91.2%
associate-*l/94.8%
sub-div97.7%
Applied egg-rr97.7%
Final simplification98.4%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (if (or (<= x -8.2) (not (<= x 4.0))) (fabs (/ x y_m)) (fabs (/ 4.0 y_m))))
y_m = fabs(y);
double code(double x, double y_m, double z) {
double tmp;
if ((x <= -8.2) || !(x <= 4.0)) {
tmp = fabs((x / y_m));
} else {
tmp = fabs((4.0 / y_m));
}
return tmp;
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-8.2d0)) .or. (.not. (x <= 4.0d0))) then
tmp = abs((x / y_m))
else
tmp = abs((4.0d0 / y_m))
end if
code = tmp
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
double tmp;
if ((x <= -8.2) || !(x <= 4.0)) {
tmp = Math.abs((x / y_m));
} else {
tmp = Math.abs((4.0 / y_m));
}
return tmp;
}
y_m = math.fabs(y) def code(x, y_m, z): tmp = 0 if (x <= -8.2) or not (x <= 4.0): tmp = math.fabs((x / y_m)) else: tmp = math.fabs((4.0 / y_m)) return tmp
y_m = abs(y) function code(x, y_m, z) tmp = 0.0 if ((x <= -8.2) || !(x <= 4.0)) tmp = abs(Float64(x / y_m)); else tmp = abs(Float64(4.0 / y_m)); end return tmp end
y_m = abs(y); function tmp_2 = code(x, y_m, z) tmp = 0.0; if ((x <= -8.2) || ~((x <= 4.0))) tmp = abs((x / y_m)); else tmp = abs((4.0 / y_m)); end tmp_2 = tmp; end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := If[Or[LessEqual[x, -8.2], N[Not[LessEqual[x, 4.0]], $MachinePrecision]], N[Abs[N[(x / y$95$m), $MachinePrecision]], $MachinePrecision], N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y_m = \left|y\right|
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \lor \neg \left(x \leq 4\right):\\
\;\;\;\;\left|\frac{x}{y\_m}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{4}{y\_m}\right|\\
\end{array}
\end{array}
if x < -8.1999999999999993 or 4 < x Initial program 86.7%
Taylor expanded in z around 0 60.9%
Taylor expanded in x around inf 60.5%
if -8.1999999999999993 < x < 4Initial program 92.6%
Simplified99.8%
Taylor expanded in x around 0 68.9%
Final simplification64.2%
y_m = (fabs.f64 y) (FPCore (x y_m z) :precision binary64 (fabs (/ 4.0 y_m)))
y_m = fabs(y);
double code(double x, double y_m, double z) {
return fabs((4.0 / y_m));
}
y_m = abs(y)
real(8) function code(x, y_m, z)
real(8), intent (in) :: x
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = abs((4.0d0 / y_m))
end function
y_m = Math.abs(y);
public static double code(double x, double y_m, double z) {
return Math.abs((4.0 / y_m));
}
y_m = math.fabs(y) def code(x, y_m, z): return math.fabs((4.0 / y_m))
y_m = abs(y) function code(x, y_m, z) return abs(Float64(4.0 / y_m)) end
y_m = abs(y); function tmp = code(x, y_m, z) tmp = abs((4.0 / y_m)); end
y_m = N[Abs[y], $MachinePrecision] code[x_, y$95$m_, z_] := N[Abs[N[(4.0 / y$95$m), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
y_m = \left|y\right|
\\
\left|\frac{4}{y\_m}\right|
\end{array}
Initial program 89.2%
Simplified94.6%
Taylor expanded in x around 0 33.3%
Final simplification33.3%
herbie shell --seed 2024080
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))