
(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 7 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}
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y)))
(if (<= (- t_0 (* (/ x y) z)) 2e+110)
(fabs (- t_0 (/ x (/ y z))))
(fabs (/ (- (* x z) (+ x 4.0)) y)))))
double code(double x, double y, double z) {
double t_0 = (x + 4.0) / y;
double tmp;
if ((t_0 - ((x / y) * z)) <= 2e+110) {
tmp = fabs((t_0 - (x / (y / z))));
} else {
tmp = fabs((((x * z) - (x + 4.0)) / y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (x + 4.0d0) / y
if ((t_0 - ((x / y) * z)) <= 2d+110) then
tmp = abs((t_0 - (x / (y / z))))
else
tmp = abs((((x * z) - (x + 4.0d0)) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + 4.0) / y;
double tmp;
if ((t_0 - ((x / y) * z)) <= 2e+110) {
tmp = Math.abs((t_0 - (x / (y / z))));
} else {
tmp = Math.abs((((x * z) - (x + 4.0)) / y));
}
return tmp;
}
def code(x, y, z): t_0 = (x + 4.0) / y tmp = 0 if (t_0 - ((x / y) * z)) <= 2e+110: tmp = math.fabs((t_0 - (x / (y / z)))) else: tmp = math.fabs((((x * z) - (x + 4.0)) / y)) return tmp
function code(x, y, z) t_0 = Float64(Float64(x + 4.0) / y) tmp = 0.0 if (Float64(t_0 - Float64(Float64(x / y) * z)) <= 2e+110) tmp = abs(Float64(t_0 - Float64(x / Float64(y / z)))); else tmp = abs(Float64(Float64(Float64(x * z) - Float64(x + 4.0)) / y)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + 4.0) / y; tmp = 0.0; if ((t_0 - ((x / y) * z)) <= 2e+110) tmp = abs((t_0 - (x / (y / z)))); else tmp = abs((((x * z) - (x + 4.0)) / y)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[N[(t$95$0 - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], 2e+110], N[Abs[N[(t$95$0 - N[(x / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(x * z), $MachinePrecision] - N[(x + 4.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + 4}{y}\\
\mathbf{if}\;t_0 - \frac{x}{y} \cdot z \leq 2 \cdot 10^{+110}:\\
\;\;\;\;\left|t_0 - \frac{x}{\frac{y}{z}}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x \cdot z - \left(x + 4\right)}{y}\right|\\
\end{array}
\end{array}
if (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) < 2e110Initial program 96.6%
associate-*l/95.3%
associate-/l*99.4%
Applied egg-rr99.4%
if 2e110 < (-.f64 (/.f64 (+.f64 x 4) y) (*.f64 (/.f64 x y) z)) Initial program 73.3%
associate-*l/79.6%
sub-div97.2%
Applied egg-rr97.2%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -3.8e+120) (not (<= z 3.2e+51))) (/ (fabs x) (fabs (/ y z))) (fabs (/ (- -4.0 x) y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.8e+120) || !(z <= 3.2e+51)) {
tmp = fabs(x) / fabs((y / z));
} else {
tmp = fabs(((-4.0 - x) / y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-3.8d+120)) .or. (.not. (z <= 3.2d+51))) then
tmp = abs(x) / abs((y / z))
else
tmp = abs((((-4.0d0) - x) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -3.8e+120) || !(z <= 3.2e+51)) {
tmp = Math.abs(x) / Math.abs((y / z));
} else {
tmp = Math.abs(((-4.0 - x) / y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.8e+120) or not (z <= 3.2e+51): tmp = math.fabs(x) / math.fabs((y / z)) else: tmp = math.fabs(((-4.0 - x) / y)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.8e+120) || !(z <= 3.2e+51)) tmp = Float64(abs(x) / abs(Float64(y / z))); else tmp = abs(Float64(Float64(-4.0 - x) / y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3.8e+120) || ~((z <= 3.2e+51))) tmp = abs(x) / abs((y / z)); else tmp = abs(((-4.0 - x) / y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.8e+120], N[Not[LessEqual[z, 3.2e+51]], $MachinePrecision]], N[(N[Abs[x], $MachinePrecision] / N[Abs[N[(y / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+120} \lor \neg \left(z \leq 3.2 \cdot 10^{+51}\right):\\
\;\;\;\;\frac{\left|x\right|}{\left|\frac{y}{z}\right|}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-4 - x}{y}\right|\\
\end{array}
\end{array}
if z < -3.7999999999999998e120 or 3.2000000000000002e51 < z Initial program 85.6%
Taylor expanded in z around inf 70.4%
*-commutative70.4%
metadata-eval70.4%
times-frac70.4%
*-lft-identity70.4%
neg-mul-170.4%
associate-/l*79.4%
distribute-frac-neg79.4%
Simplified79.4%
if -3.7999999999999998e120 < z < 3.2000000000000002e51Initial program 93.2%
Simplified99.2%
Taylor expanded in z around 0 92.6%
associate-*r/92.6%
distribute-lft-in92.6%
metadata-eval92.6%
neg-mul-192.6%
sub-neg92.6%
Simplified92.6%
Final simplification87.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fabs (/ 4.0 y))))
(if (<= x -4.4e-8)
(fabs (* (/ x y) z))
(if (<= x -2.4e-76)
t_0
(if (<= x -7.6e-97)
(fabs (* x (/ z y)))
(if (<= x 4.0) t_0 (fabs (/ x y))))))))
double code(double x, double y, double z) {
double t_0 = fabs((4.0 / y));
double tmp;
if (x <= -4.4e-8) {
tmp = fabs(((x / y) * z));
} else if (x <= -2.4e-76) {
tmp = t_0;
} else if (x <= -7.6e-97) {
tmp = fabs((x * (z / y)));
} else if (x <= 4.0) {
tmp = t_0;
} else {
tmp = fabs((x / y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = abs((4.0d0 / y))
if (x <= (-4.4d-8)) then
tmp = abs(((x / y) * z))
else if (x <= (-2.4d-76)) then
tmp = t_0
else if (x <= (-7.6d-97)) then
tmp = abs((x * (z / y)))
else if (x <= 4.0d0) then
tmp = t_0
else
tmp = abs((x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = Math.abs((4.0 / y));
double tmp;
if (x <= -4.4e-8) {
tmp = Math.abs(((x / y) * z));
} else if (x <= -2.4e-76) {
tmp = t_0;
} else if (x <= -7.6e-97) {
tmp = Math.abs((x * (z / y)));
} else if (x <= 4.0) {
tmp = t_0;
} else {
tmp = Math.abs((x / y));
}
return tmp;
}
def code(x, y, z): t_0 = math.fabs((4.0 / y)) tmp = 0 if x <= -4.4e-8: tmp = math.fabs(((x / y) * z)) elif x <= -2.4e-76: tmp = t_0 elif x <= -7.6e-97: tmp = math.fabs((x * (z / y))) elif x <= 4.0: tmp = t_0 else: tmp = math.fabs((x / y)) return tmp
function code(x, y, z) t_0 = abs(Float64(4.0 / y)) tmp = 0.0 if (x <= -4.4e-8) tmp = abs(Float64(Float64(x / y) * z)); elseif (x <= -2.4e-76) tmp = t_0; elseif (x <= -7.6e-97) tmp = abs(Float64(x * Float64(z / y))); elseif (x <= 4.0) tmp = t_0; else tmp = abs(Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = abs((4.0 / y)); tmp = 0.0; if (x <= -4.4e-8) tmp = abs(((x / y) * z)); elseif (x <= -2.4e-76) tmp = t_0; elseif (x <= -7.6e-97) tmp = abs((x * (z / y))); elseif (x <= 4.0) tmp = t_0; else tmp = abs((x / y)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[Abs[N[(4.0 / y), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -4.4e-8], N[Abs[N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, -2.4e-76], t$95$0, If[LessEqual[x, -7.6e-97], N[Abs[N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 4.0], t$95$0, N[Abs[N[(x / y), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left|\frac{4}{y}\right|\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{-8}:\\
\;\;\;\;\left|\frac{x}{y} \cdot z\right|\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-76}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -7.6 \cdot 10^{-97}:\\
\;\;\;\;\left|x \cdot \frac{z}{y}\right|\\
\mathbf{elif}\;x \leq 4:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{y}\right|\\
\end{array}
\end{array}
if x < -4.3999999999999997e-8Initial program 85.5%
Simplified93.7%
Taylor expanded in z around inf 47.4%
*-commutative47.4%
associate-*l/62.3%
*-commutative62.3%
Simplified62.3%
if -4.3999999999999997e-8 < x < -2.40000000000000013e-76 or -7.6000000000000001e-97 < x < 4Initial program 95.6%
Taylor expanded in x around 0 78.4%
if -2.40000000000000013e-76 < x < -7.6000000000000001e-97Initial program 81.2%
Simplified99.7%
Taylor expanded in z around inf 99.4%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
if 4 < x Initial program 86.2%
associate-*l/80.9%
sub-div90.0%
Applied egg-rr90.0%
Taylor expanded in x around inf 89.1%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in z around 0 66.1%
Final simplification71.7%
(FPCore (x y z) :precision binary64 (if (<= x 2e+43) (fabs (/ (- (* x z) (+ x 4.0)) y)) (fabs (/ (+ z -1.0) (/ y x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2e+43) {
tmp = fabs((((x * z) - (x + 4.0)) / y));
} else {
tmp = fabs(((z + -1.0) / (y / x)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 2d+43) then
tmp = abs((((x * z) - (x + 4.0d0)) / y))
else
tmp = abs(((z + (-1.0d0)) / (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2e+43) {
tmp = Math.abs((((x * z) - (x + 4.0)) / y));
} else {
tmp = Math.abs(((z + -1.0) / (y / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2e+43: tmp = math.fabs((((x * z) - (x + 4.0)) / y)) else: tmp = math.fabs(((z + -1.0) / (y / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2e+43) tmp = abs(Float64(Float64(Float64(x * z) - Float64(x + 4.0)) / y)); else tmp = abs(Float64(Float64(z + -1.0) / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2e+43) tmp = abs((((x * z) - (x + 4.0)) / y)); else tmp = abs(((z + -1.0) / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2e+43], N[Abs[N[(N[(N[(x * z), $MachinePrecision] - N[(x + 4.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(z + -1.0), $MachinePrecision] / N[(y / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{+43}:\\
\;\;\;\;\left|\frac{x \cdot z - \left(x + 4\right)}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{z + -1}{\frac{y}{x}}\right|\\
\end{array}
\end{array}
if x < 2.00000000000000003e43Initial program 92.3%
associate-*l/94.9%
sub-div98.0%
Applied egg-rr98.0%
if 2.00000000000000003e43 < x Initial program 84.1%
Simplified88.3%
Taylor expanded in x around inf 88.4%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification98.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.9e+121) (not (<= z 2.2e+52))) (fabs (* x (/ z y))) (fabs (/ (- -4.0 x) y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.9e+121) || !(z <= 2.2e+52)) {
tmp = fabs((x * (z / y)));
} else {
tmp = fabs(((-4.0 - x) / y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-1.9d+121)) .or. (.not. (z <= 2.2d+52))) then
tmp = abs((x * (z / y)))
else
tmp = abs((((-4.0d0) - x) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.9e+121) || !(z <= 2.2e+52)) {
tmp = Math.abs((x * (z / y)));
} else {
tmp = Math.abs(((-4.0 - x) / y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.9e+121) or not (z <= 2.2e+52): tmp = math.fabs((x * (z / y))) else: tmp = math.fabs(((-4.0 - x) / y)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.9e+121) || !(z <= 2.2e+52)) tmp = abs(Float64(x * Float64(z / y))); else tmp = abs(Float64(Float64(-4.0 - x) / y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.9e+121) || ~((z <= 2.2e+52))) tmp = abs((x * (z / y))); else tmp = abs(((-4.0 - x) / y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.9e+121], N[Not[LessEqual[z, 2.2e+52]], $MachinePrecision]], N[Abs[N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(-4.0 - x), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+121} \lor \neg \left(z \leq 2.2 \cdot 10^{+52}\right):\\
\;\;\;\;\left|x \cdot \frac{z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{-4 - x}{y}\right|\\
\end{array}
\end{array}
if z < -1.9e121 or 2.2e52 < z Initial program 85.6%
Simplified89.6%
Taylor expanded in z around inf 70.4%
associate-*l/79.4%
*-commutative79.4%
Simplified79.4%
if -1.9e121 < z < 2.2e52Initial program 93.2%
Simplified99.2%
Taylor expanded in z around 0 92.6%
associate-*r/92.6%
distribute-lft-in92.6%
metadata-eval92.6%
neg-mul-192.6%
sub-neg92.6%
Simplified92.6%
Final simplification87.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -11.0) (not (<= x 4.0))) (fabs (/ x y)) (fabs (/ 4.0 y))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -11.0) || !(x <= 4.0)) {
tmp = fabs((x / y));
} else {
tmp = fabs((4.0 / y));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-11.0d0)) .or. (.not. (x <= 4.0d0))) then
tmp = abs((x / y))
else
tmp = abs((4.0d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -11.0) || !(x <= 4.0)) {
tmp = Math.abs((x / y));
} else {
tmp = Math.abs((4.0 / y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -11.0) or not (x <= 4.0): tmp = math.fabs((x / y)) else: tmp = math.fabs((4.0 / y)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -11.0) || !(x <= 4.0)) tmp = abs(Float64(x / y)); else tmp = abs(Float64(4.0 / y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -11.0) || ~((x <= 4.0))) tmp = abs((x / y)); else tmp = abs((4.0 / y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -11.0], N[Not[LessEqual[x, 4.0]], $MachinePrecision]], N[Abs[N[(x / y), $MachinePrecision]], $MachinePrecision], N[Abs[N[(4.0 / y), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -11 \lor \neg \left(x \leq 4\right):\\
\;\;\;\;\left|\frac{x}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{4}{y}\right|\\
\end{array}
\end{array}
if x < -11 or 4 < x Initial program 85.5%
associate-*l/82.2%
sub-div91.7%
Applied egg-rr91.7%
Taylor expanded in x around inf 91.2%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in z around 0 64.3%
if -11 < x < 4Initial program 95.2%
Taylor expanded in x around 0 74.4%
Final simplification69.4%
(FPCore (x y z) :precision binary64 (fabs (/ 4.0 y)))
double code(double x, double y, double z) {
return fabs((4.0 / y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = abs((4.0d0 / y))
end function
public static double code(double x, double y, double z) {
return Math.abs((4.0 / y));
}
def code(x, y, z): return math.fabs((4.0 / y))
function code(x, y, z) return abs(Float64(4.0 / y)) end
function tmp = code(x, y, z) tmp = abs((4.0 / y)); end
code[x_, y_, z_] := N[Abs[N[(4.0 / y), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\left|\frac{4}{y}\right|
\end{array}
Initial program 90.4%
Taylor expanded in x around 0 40.2%
Final simplification40.2%
herbie shell --seed 2023196
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))