fabs fraction 1

Percentage Accurate: 91.3% → 99.7%
Time: 9.9s
Alternatives: 9
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \end{array} \]
(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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 9 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 91.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \end{array} \]
(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}

Alternative 1: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} y = |y|\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 5 \cdot 10^{-45}:\\ \;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|\\ \end{array} \end{array} \]
NOTE: y should be positive before calling this function
(FPCore (x y z)
 :precision binary64
 (if (<= y 5e-45)
   (fabs (/ (- (+ x 4.0) (* x z)) y))
   (fabs (- (/ (+ x 4.0) y) (* x (/ z y))))))
y = abs(y);
double code(double x, double y, double z) {
	double tmp;
	if (y <= 5e-45) {
		tmp = fabs((((x + 4.0) - (x * z)) / y));
	} else {
		tmp = fabs((((x + 4.0) / y) - (x * (z / y))));
	}
	return tmp;
}
NOTE: y should be positive before calling this function
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 (y <= 5d-45) then
        tmp = abs((((x + 4.0d0) - (x * z)) / y))
    else
        tmp = abs((((x + 4.0d0) / y) - (x * (z / y))))
    end if
    code = tmp
end function
y = Math.abs(y);
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 5e-45) {
		tmp = Math.abs((((x + 4.0) - (x * z)) / y));
	} else {
		tmp = Math.abs((((x + 4.0) / y) - (x * (z / y))));
	}
	return tmp;
}
y = abs(y)
def code(x, y, z):
	tmp = 0
	if y <= 5e-45:
		tmp = math.fabs((((x + 4.0) - (x * z)) / y))
	else:
		tmp = math.fabs((((x + 4.0) / y) - (x * (z / y))))
	return tmp
y = abs(y)
function code(x, y, z)
	tmp = 0.0
	if (y <= 5e-45)
		tmp = abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y));
	else
		tmp = abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(x * Float64(z / y))));
	end
	return tmp
end
y = abs(y)
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 5e-45)
		tmp = abs((((x + 4.0) - (x * z)) / y));
	else
		tmp = abs((((x + 4.0) / y) - (x * (z / y))));
	end
	tmp_2 = tmp;
end
NOTE: y should be positive before calling this function
code[x_, y_, z_] := If[LessEqual[y, 5e-45], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y = |y|\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5 \cdot 10^{-45}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.99999999999999976e-45

    1. Initial program 94.9%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/94.4%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/89.8%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified89.8%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Step-by-step derivation
      1. associate-*r/94.4%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. sub-div97.3%

        \[\leadsto \left|\color{blue}{\frac{\left(x + 4\right) - x \cdot z}{y}}\right| \]
    5. Applied egg-rr97.3%

      \[\leadsto \left|\color{blue}{\frac{\left(x + 4\right) - x \cdot z}{y}}\right| \]

    if 4.99999999999999976e-45 < y

    1. Initial program 98.6%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/94.9%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/99.9%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5 \cdot 10^{-45}:\\ \;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|\\ \end{array} \]

Alternative 2: 67.7% accurate, 1.0× speedup?

\[\begin{array}{l} y = |y|\\ \\ \begin{array}{l} t_0 := \left|z \cdot \frac{x}{y}\right|\\ \mathbf{if}\;x \leq -1.25 \cdot 10^{-124}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 4:\\ \;\;\;\;\left|\frac{4}{y}\right|\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+96} \lor \neg \left(x \leq 4 \cdot 10^{+157}\right) \land x \leq 1.75 \cdot 10^{+204}:\\ \;\;\;\;\left|\frac{x}{y}\right|\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \end{array} \]
NOTE: y should be positive before calling this function
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (fabs (* z (/ x y)))))
   (if (<= x -1.25e-124)
     t_0
     (if (<= x 4.0)
       (fabs (/ 4.0 y))
       (if (or (<= x 3.5e+96) (and (not (<= x 4e+157)) (<= x 1.75e+204)))
         (fabs (/ x y))
         t_0)))))
y = abs(y);
double code(double x, double y, double z) {
	double t_0 = fabs((z * (x / y)));
	double tmp;
	if (x <= -1.25e-124) {
		tmp = t_0;
	} else if (x <= 4.0) {
		tmp = fabs((4.0 / y));
	} else if ((x <= 3.5e+96) || (!(x <= 4e+157) && (x <= 1.75e+204))) {
		tmp = fabs((x / y));
	} else {
		tmp = t_0;
	}
	return tmp;
}
NOTE: y should be positive before calling this function
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((z * (x / y)))
    if (x <= (-1.25d-124)) then
        tmp = t_0
    else if (x <= 4.0d0) then
        tmp = abs((4.0d0 / y))
    else if ((x <= 3.5d+96) .or. (.not. (x <= 4d+157)) .and. (x <= 1.75d+204)) then
        tmp = abs((x / y))
    else
        tmp = t_0
    end if
    code = tmp
end function
y = Math.abs(y);
public static double code(double x, double y, double z) {
	double t_0 = Math.abs((z * (x / y)));
	double tmp;
	if (x <= -1.25e-124) {
		tmp = t_0;
	} else if (x <= 4.0) {
		tmp = Math.abs((4.0 / y));
	} else if ((x <= 3.5e+96) || (!(x <= 4e+157) && (x <= 1.75e+204))) {
		tmp = Math.abs((x / y));
	} else {
		tmp = t_0;
	}
	return tmp;
}
y = abs(y)
def code(x, y, z):
	t_0 = math.fabs((z * (x / y)))
	tmp = 0
	if x <= -1.25e-124:
		tmp = t_0
	elif x <= 4.0:
		tmp = math.fabs((4.0 / y))
	elif (x <= 3.5e+96) or (not (x <= 4e+157) and (x <= 1.75e+204)):
		tmp = math.fabs((x / y))
	else:
		tmp = t_0
	return tmp
y = abs(y)
function code(x, y, z)
	t_0 = abs(Float64(z * Float64(x / y)))
	tmp = 0.0
	if (x <= -1.25e-124)
		tmp = t_0;
	elseif (x <= 4.0)
		tmp = abs(Float64(4.0 / y));
	elseif ((x <= 3.5e+96) || (!(x <= 4e+157) && (x <= 1.75e+204)))
		tmp = abs(Float64(x / y));
	else
		tmp = t_0;
	end
	return tmp
end
y = abs(y)
function tmp_2 = code(x, y, z)
	t_0 = abs((z * (x / y)));
	tmp = 0.0;
	if (x <= -1.25e-124)
		tmp = t_0;
	elseif (x <= 4.0)
		tmp = abs((4.0 / y));
	elseif ((x <= 3.5e+96) || (~((x <= 4e+157)) && (x <= 1.75e+204)))
		tmp = abs((x / y));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
NOTE: y should be positive before calling this function
code[x_, y_, z_] := Block[{t$95$0 = N[Abs[N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -1.25e-124], t$95$0, If[LessEqual[x, 4.0], N[Abs[N[(4.0 / y), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[x, 3.5e+96], And[N[Not[LessEqual[x, 4e+157]], $MachinePrecision], LessEqual[x, 1.75e+204]]], N[Abs[N[(x / y), $MachinePrecision]], $MachinePrecision], t$95$0]]]]
\begin{array}{l}
y = |y|\\
\\
\begin{array}{l}
t_0 := \left|z \cdot \frac{x}{y}\right|\\
\mathbf{if}\;x \leq -1.25 \cdot 10^{-124}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\left|\frac{4}{y}\right|\\

\mathbf{elif}\;x \leq 3.5 \cdot 10^{+96} \lor \neg \left(x \leq 4 \cdot 10^{+157}\right) \land x \leq 1.75 \cdot 10^{+204}:\\
\;\;\;\;\left|\frac{x}{y}\right|\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.2500000000000001e-124 or 3.4999999999999999e96 < x < 3.99999999999999993e157 or 1.74999999999999995e204 < x

    1. Initial program 94.1%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/91.2%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/93.6%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified93.6%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in z around inf 60.0%

      \[\leadsto \left|\color{blue}{-1 \cdot \frac{z \cdot x}{y}}\right| \]
    5. Step-by-step derivation
      1. mul-1-neg60.0%

        \[\leadsto \left|\color{blue}{-\frac{z \cdot x}{y}}\right| \]
      2. associate-/l*69.3%

        \[\leadsto \left|-\color{blue}{\frac{z}{\frac{y}{x}}}\right| \]
      3. distribute-neg-frac69.3%

        \[\leadsto \left|\color{blue}{\frac{-z}{\frac{y}{x}}}\right| \]
    6. Simplified69.3%

      \[\leadsto \left|\color{blue}{\frac{-z}{\frac{y}{x}}}\right| \]
    7. Step-by-step derivation
      1. clear-num69.2%

        \[\leadsto \left|\color{blue}{\frac{1}{\frac{\frac{y}{x}}{-z}}}\right| \]
      2. associate-/r/69.2%

        \[\leadsto \left|\color{blue}{\frac{1}{\frac{y}{x}} \cdot \left(-z\right)}\right| \]
      3. clear-num69.2%

        \[\leadsto \left|\color{blue}{\frac{x}{y}} \cdot \left(-z\right)\right| \]
      4. add-sqr-sqrt36.9%

        \[\leadsto \left|\frac{x}{y} \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)}\right| \]
      5. sqrt-unprod45.0%

        \[\leadsto \left|\frac{x}{y} \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right| \]
      6. sqr-neg45.0%

        \[\leadsto \left|\frac{x}{y} \cdot \sqrt{\color{blue}{z \cdot z}}\right| \]
      7. sqrt-unprod32.3%

        \[\leadsto \left|\frac{x}{y} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}\right| \]
      8. add-sqr-sqrt69.2%

        \[\leadsto \left|\frac{x}{y} \cdot \color{blue}{z}\right| \]
    8. Applied egg-rr69.2%

      \[\leadsto \left|\color{blue}{\frac{x}{y} \cdot z}\right| \]

    if -1.2500000000000001e-124 < x < 4

    1. Initial program 98.9%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/90.0%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified90.0%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in x around 0 82.1%

      \[\leadsto \left|\color{blue}{\frac{4}{y}}\right| \]

    if 4 < x < 3.4999999999999999e96 or 3.99999999999999993e157 < x < 1.74999999999999995e204

    1. Initial program 94.6%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/92.5%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/97.3%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified97.3%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in z around 0 72.9%

      \[\leadsto \left|\color{blue}{4 \cdot \frac{1}{y} + \frac{x}{y}}\right| \]
    5. Step-by-step derivation
      1. associate-*r/72.9%

        \[\leadsto \left|\color{blue}{\frac{4 \cdot 1}{y}} + \frac{x}{y}\right| \]
      2. metadata-eval72.9%

        \[\leadsto \left|\frac{\color{blue}{4}}{y} + \frac{x}{y}\right| \]
    6. Simplified72.9%

      \[\leadsto \left|\color{blue}{\frac{4}{y} + \frac{x}{y}}\right| \]
    7. Taylor expanded in x around inf 68.9%

      \[\leadsto \left|\color{blue}{\frac{x}{y}}\right| \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.25 \cdot 10^{-124}:\\ \;\;\;\;\left|z \cdot \frac{x}{y}\right|\\ \mathbf{elif}\;x \leq 4:\\ \;\;\;\;\left|\frac{4}{y}\right|\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+96} \lor \neg \left(x \leq 4 \cdot 10^{+157}\right) \land x \leq 1.75 \cdot 10^{+204}:\\ \;\;\;\;\left|\frac{x}{y}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|z \cdot \frac{x}{y}\right|\\ \end{array} \]

Alternative 3: 67.1% accurate, 1.0× speedup?

\[\begin{array}{l} y = |y|\\ \\ \begin{array}{l} t_0 := \left|\frac{x}{y}\right|\\ t_1 := \left|\frac{z}{\frac{y}{x}}\right|\\ \mathbf{if}\;x \leq -1.25 \cdot 10^{-124}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4:\\ \;\;\;\;\left|\frac{4}{y}\right|\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+98}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{+160}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{+208}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\left|z \cdot \frac{x}{y}\right|\\ \end{array} \end{array} \]
NOTE: y should be positive before calling this function
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (fabs (/ x y))) (t_1 (fabs (/ z (/ y x)))))
   (if (<= x -1.25e-124)
     t_1
     (if (<= x 4.0)
       (fabs (/ 4.0 y))
       (if (<= x 7e+98)
         t_0
         (if (<= x 1.4e+160)
           t_1
           (if (<= x 3.4e+208) t_0 (fabs (* z (/ x y))))))))))
y = abs(y);
double code(double x, double y, double z) {
	double t_0 = fabs((x / y));
	double t_1 = fabs((z / (y / x)));
	double tmp;
	if (x <= -1.25e-124) {
		tmp = t_1;
	} else if (x <= 4.0) {
		tmp = fabs((4.0 / y));
	} else if (x <= 7e+98) {
		tmp = t_0;
	} else if (x <= 1.4e+160) {
		tmp = t_1;
	} else if (x <= 3.4e+208) {
		tmp = t_0;
	} else {
		tmp = fabs((z * (x / y)));
	}
	return tmp;
}
NOTE: y should be positive before calling this function
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) :: t_1
    real(8) :: tmp
    t_0 = abs((x / y))
    t_1 = abs((z / (y / x)))
    if (x <= (-1.25d-124)) then
        tmp = t_1
    else if (x <= 4.0d0) then
        tmp = abs((4.0d0 / y))
    else if (x <= 7d+98) then
        tmp = t_0
    else if (x <= 1.4d+160) then
        tmp = t_1
    else if (x <= 3.4d+208) then
        tmp = t_0
    else
        tmp = abs((z * (x / y)))
    end if
    code = tmp
end function
y = Math.abs(y);
public static double code(double x, double y, double z) {
	double t_0 = Math.abs((x / y));
	double t_1 = Math.abs((z / (y / x)));
	double tmp;
	if (x <= -1.25e-124) {
		tmp = t_1;
	} else if (x <= 4.0) {
		tmp = Math.abs((4.0 / y));
	} else if (x <= 7e+98) {
		tmp = t_0;
	} else if (x <= 1.4e+160) {
		tmp = t_1;
	} else if (x <= 3.4e+208) {
		tmp = t_0;
	} else {
		tmp = Math.abs((z * (x / y)));
	}
	return tmp;
}
y = abs(y)
def code(x, y, z):
	t_0 = math.fabs((x / y))
	t_1 = math.fabs((z / (y / x)))
	tmp = 0
	if x <= -1.25e-124:
		tmp = t_1
	elif x <= 4.0:
		tmp = math.fabs((4.0 / y))
	elif x <= 7e+98:
		tmp = t_0
	elif x <= 1.4e+160:
		tmp = t_1
	elif x <= 3.4e+208:
		tmp = t_0
	else:
		tmp = math.fabs((z * (x / y)))
	return tmp
y = abs(y)
function code(x, y, z)
	t_0 = abs(Float64(x / y))
	t_1 = abs(Float64(z / Float64(y / x)))
	tmp = 0.0
	if (x <= -1.25e-124)
		tmp = t_1;
	elseif (x <= 4.0)
		tmp = abs(Float64(4.0 / y));
	elseif (x <= 7e+98)
		tmp = t_0;
	elseif (x <= 1.4e+160)
		tmp = t_1;
	elseif (x <= 3.4e+208)
		tmp = t_0;
	else
		tmp = abs(Float64(z * Float64(x / y)));
	end
	return tmp
end
y = abs(y)
function tmp_2 = code(x, y, z)
	t_0 = abs((x / y));
	t_1 = abs((z / (y / x)));
	tmp = 0.0;
	if (x <= -1.25e-124)
		tmp = t_1;
	elseif (x <= 4.0)
		tmp = abs((4.0 / y));
	elseif (x <= 7e+98)
		tmp = t_0;
	elseif (x <= 1.4e+160)
		tmp = t_1;
	elseif (x <= 3.4e+208)
		tmp = t_0;
	else
		tmp = abs((z * (x / y)));
	end
	tmp_2 = tmp;
end
NOTE: y should be positive before calling this function
code[x_, y_, z_] := Block[{t$95$0 = N[Abs[N[(x / y), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -1.25e-124], t$95$1, If[LessEqual[x, 4.0], N[Abs[N[(4.0 / y), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 7e+98], t$95$0, If[LessEqual[x, 1.4e+160], t$95$1, If[LessEqual[x, 3.4e+208], t$95$0, N[Abs[N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
y = |y|\\
\\
\begin{array}{l}
t_0 := \left|\frac{x}{y}\right|\\
t_1 := \left|\frac{z}{\frac{y}{x}}\right|\\
\mathbf{if}\;x \leq -1.25 \cdot 10^{-124}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 4:\\
\;\;\;\;\left|\frac{4}{y}\right|\\

\mathbf{elif}\;x \leq 7 \cdot 10^{+98}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;x \leq 1.4 \cdot 10^{+160}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;x \leq 3.4 \cdot 10^{+208}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\left|z \cdot \frac{x}{y}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -1.2500000000000001e-124 or 7e98 < x < 1.4e160

    1. Initial program 96.0%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/92.4%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/94.3%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified94.3%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in z around inf 59.2%

      \[\leadsto \left|\color{blue}{-1 \cdot \frac{z \cdot x}{y}}\right| \]
    5. Step-by-step derivation
      1. mul-1-neg59.2%

        \[\leadsto \left|\color{blue}{-\frac{z \cdot x}{y}}\right| \]
      2. associate-/l*67.5%

        \[\leadsto \left|-\color{blue}{\frac{z}{\frac{y}{x}}}\right| \]
      3. distribute-neg-frac67.5%

        \[\leadsto \left|\color{blue}{\frac{-z}{\frac{y}{x}}}\right| \]
    6. Simplified67.5%

      \[\leadsto \left|\color{blue}{\frac{-z}{\frac{y}{x}}}\right| \]
    7. Step-by-step derivation
      1. associate-/r/61.1%

        \[\leadsto \left|\color{blue}{\frac{-z}{y} \cdot x}\right| \]
      2. add-sqr-sqrt33.1%

        \[\leadsto \left|\frac{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{y} \cdot x\right| \]
      3. sqrt-unprod41.7%

        \[\leadsto \left|\frac{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{y} \cdot x\right| \]
      4. sqr-neg41.7%

        \[\leadsto \left|\frac{\sqrt{\color{blue}{z \cdot z}}}{y} \cdot x\right| \]
      5. sqrt-unprod27.7%

        \[\leadsto \left|\frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{y} \cdot x\right| \]
      6. add-sqr-sqrt61.1%

        \[\leadsto \left|\frac{\color{blue}{z}}{y} \cdot x\right| \]
    8. Applied egg-rr61.1%

      \[\leadsto \left|\color{blue}{\frac{z}{y} \cdot x}\right| \]
    9. Step-by-step derivation
      1. associate-*l/59.2%

        \[\leadsto \left|\color{blue}{\frac{z \cdot x}{y}}\right| \]
      2. associate-/l*67.5%

        \[\leadsto \left|\color{blue}{\frac{z}{\frac{y}{x}}}\right| \]
    10. Applied egg-rr67.5%

      \[\leadsto \left|\color{blue}{\frac{z}{\frac{y}{x}}}\right| \]

    if -1.2500000000000001e-124 < x < 4

    1. Initial program 98.9%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/90.0%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified90.0%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in x around 0 82.1%

      \[\leadsto \left|\color{blue}{\frac{4}{y}}\right| \]

    if 4 < x < 7e98 or 1.4e160 < x < 3.3999999999999998e208

    1. Initial program 94.6%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/92.5%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/97.3%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified97.3%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in z around 0 72.9%

      \[\leadsto \left|\color{blue}{4 \cdot \frac{1}{y} + \frac{x}{y}}\right| \]
    5. Step-by-step derivation
      1. associate-*r/72.9%

        \[\leadsto \left|\color{blue}{\frac{4 \cdot 1}{y}} + \frac{x}{y}\right| \]
      2. metadata-eval72.9%

        \[\leadsto \left|\frac{\color{blue}{4}}{y} + \frac{x}{y}\right| \]
    6. Simplified72.9%

      \[\leadsto \left|\color{blue}{\frac{4}{y} + \frac{x}{y}}\right| \]
    7. Taylor expanded in x around inf 68.9%

      \[\leadsto \left|\color{blue}{\frac{x}{y}}\right| \]

    if 3.3999999999999998e208 < x

    1. Initial program 84.1%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/84.5%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/89.5%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified89.5%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in z around inf 64.2%

      \[\leadsto \left|\color{blue}{-1 \cdot \frac{z \cdot x}{y}}\right| \]
    5. Step-by-step derivation
      1. mul-1-neg64.2%

        \[\leadsto \left|\color{blue}{-\frac{z \cdot x}{y}}\right| \]
      2. associate-/l*79.1%

        \[\leadsto \left|-\color{blue}{\frac{z}{\frac{y}{x}}}\right| \]
      3. distribute-neg-frac79.1%

        \[\leadsto \left|\color{blue}{\frac{-z}{\frac{y}{x}}}\right| \]
    6. Simplified79.1%

      \[\leadsto \left|\color{blue}{\frac{-z}{\frac{y}{x}}}\right| \]
    7. Step-by-step derivation
      1. clear-num79.0%

        \[\leadsto \left|\color{blue}{\frac{1}{\frac{\frac{y}{x}}{-z}}}\right| \]
      2. associate-/r/79.1%

        \[\leadsto \left|\color{blue}{\frac{1}{\frac{y}{x}} \cdot \left(-z\right)}\right| \]
      3. clear-num79.1%

        \[\leadsto \left|\color{blue}{\frac{x}{y}} \cdot \left(-z\right)\right| \]
      4. add-sqr-sqrt32.1%

        \[\leadsto \left|\frac{x}{y} \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)}\right| \]
      5. sqrt-unprod63.5%

        \[\leadsto \left|\frac{x}{y} \cdot \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right| \]
      6. sqr-neg63.5%

        \[\leadsto \left|\frac{x}{y} \cdot \sqrt{\color{blue}{z \cdot z}}\right| \]
      7. sqrt-unprod47.0%

        \[\leadsto \left|\frac{x}{y} \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}\right| \]
      8. add-sqr-sqrt79.1%

        \[\leadsto \left|\frac{x}{y} \cdot \color{blue}{z}\right| \]
    8. Applied egg-rr79.1%

      \[\leadsto \left|\color{blue}{\frac{x}{y} \cdot z}\right| \]
  3. Recombined 4 regimes into one program.
  4. Final simplification74.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.25 \cdot 10^{-124}:\\ \;\;\;\;\left|\frac{z}{\frac{y}{x}}\right|\\ \mathbf{elif}\;x \leq 4:\\ \;\;\;\;\left|\frac{4}{y}\right|\\ \mathbf{elif}\;x \leq 7 \cdot 10^{+98}:\\ \;\;\;\;\left|\frac{x}{y}\right|\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{+160}:\\ \;\;\;\;\left|\frac{z}{\frac{y}{x}}\right|\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{+208}:\\ \;\;\;\;\left|\frac{x}{y}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|z \cdot \frac{x}{y}\right|\\ \end{array} \]

Alternative 4: 85.1% accurate, 1.0× speedup?

\[\begin{array}{l} y = |y|\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.46 \cdot 10^{-15} \lor \neg \left(z \leq 800000\right):\\ \;\;\;\;\left|\frac{x}{y} \cdot \left(1 - z\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x + 4}{y}\right|\\ \end{array} \end{array} \]
NOTE: y should be positive before calling this function
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -1.46e-15) (not (<= z 800000.0)))
   (fabs (* (/ x y) (- 1.0 z)))
   (fabs (/ (+ x 4.0) y))))
y = abs(y);
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -1.46e-15) || !(z <= 800000.0)) {
		tmp = fabs(((x / y) * (1.0 - z)));
	} else {
		tmp = fabs(((x + 4.0) / y));
	}
	return tmp;
}
NOTE: y should be positive before calling this function
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.46d-15)) .or. (.not. (z <= 800000.0d0))) then
        tmp = abs(((x / y) * (1.0d0 - z)))
    else
        tmp = abs(((x + 4.0d0) / y))
    end if
    code = tmp
end function
y = Math.abs(y);
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -1.46e-15) || !(z <= 800000.0)) {
		tmp = Math.abs(((x / y) * (1.0 - z)));
	} else {
		tmp = Math.abs(((x + 4.0) / y));
	}
	return tmp;
}
y = abs(y)
def code(x, y, z):
	tmp = 0
	if (z <= -1.46e-15) or not (z <= 800000.0):
		tmp = math.fabs(((x / y) * (1.0 - z)))
	else:
		tmp = math.fabs(((x + 4.0) / y))
	return tmp
y = abs(y)
function code(x, y, z)
	tmp = 0.0
	if ((z <= -1.46e-15) || !(z <= 800000.0))
		tmp = abs(Float64(Float64(x / y) * Float64(1.0 - z)));
	else
		tmp = abs(Float64(Float64(x + 4.0) / y));
	end
	return tmp
end
y = abs(y)
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -1.46e-15) || ~((z <= 800000.0)))
		tmp = abs(((x / y) * (1.0 - z)));
	else
		tmp = abs(((x + 4.0) / y));
	end
	tmp_2 = tmp;
end
NOTE: y should be positive before calling this function
code[x_, y_, z_] := If[Or[LessEqual[z, -1.46e-15], N[Not[LessEqual[z, 800000.0]], $MachinePrecision]], N[Abs[N[(N[(x / y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y = |y|\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.46 \cdot 10^{-15} \lor \neg \left(z \leq 800000\right):\\
\;\;\;\;\left|\frac{x}{y} \cdot \left(1 - z\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4600000000000001e-15 or 8e5 < z

    1. Initial program 95.3%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Taylor expanded in x around inf 76.4%

      \[\leadsto \left|\color{blue}{\frac{x}{y}} - \frac{x}{y} \cdot z\right| \]
    3. Step-by-step derivation
      1. *-un-lft-identity76.4%

        \[\leadsto \left|\color{blue}{1 \cdot \frac{x}{y}} - \frac{x}{y} \cdot z\right| \]
      2. *-commutative76.4%

        \[\leadsto \left|1 \cdot \frac{x}{y} - \color{blue}{z \cdot \frac{x}{y}}\right| \]
      3. distribute-rgt-out--79.4%

        \[\leadsto \left|\color{blue}{\frac{x}{y} \cdot \left(1 - z\right)}\right| \]
    4. Applied egg-rr79.4%

      \[\leadsto \left|\color{blue}{\frac{x}{y} \cdot \left(1 - z\right)}\right| \]

    if -1.4600000000000001e-15 < z < 8e5

    1. Initial program 96.7%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/99.1%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/99.1%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified99.1%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in z around 0 100.0%

      \[\leadsto \left|\color{blue}{4 \cdot \frac{1}{y} + \frac{x}{y}}\right| \]
    5. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \left|\color{blue}{\frac{x}{y} + 4 \cdot \frac{1}{y}}\right| \]
      2. *-rgt-identity100.0%

        \[\leadsto \left|\frac{\color{blue}{x \cdot 1}}{y} + 4 \cdot \frac{1}{y}\right| \]
      3. associate-*r/99.8%

        \[\leadsto \left|\color{blue}{x \cdot \frac{1}{y}} + 4 \cdot \frac{1}{y}\right| \]
      4. distribute-rgt-in99.8%

        \[\leadsto \left|\color{blue}{\frac{1}{y} \cdot \left(x + 4\right)}\right| \]
      5. associate-*l/100.0%

        \[\leadsto \left|\color{blue}{\frac{1 \cdot \left(x + 4\right)}{y}}\right| \]
      6. *-lft-identity100.0%

        \[\leadsto \left|\frac{\color{blue}{x + 4}}{y}\right| \]
    6. Simplified100.0%

      \[\leadsto \left|\color{blue}{\frac{x + 4}{y}}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.46 \cdot 10^{-15} \lor \neg \left(z \leq 800000\right):\\ \;\;\;\;\left|\frac{x}{y} \cdot \left(1 - z\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x + 4}{y}\right|\\ \end{array} \]

Alternative 5: 85.2% accurate, 1.0× speedup?

\[\begin{array}{l} y = |y|\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.46 \cdot 10^{-15} \lor \neg \left(z \leq 108000000000\right):\\ \;\;\;\;\left|\frac{x}{y} \cdot \left(1 - z\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x}{y} + \frac{4}{y}\right|\\ \end{array} \end{array} \]
NOTE: y should be positive before calling this function
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -1.46e-15) (not (<= z 108000000000.0)))
   (fabs (* (/ x y) (- 1.0 z)))
   (fabs (+ (/ x y) (/ 4.0 y)))))
y = abs(y);
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -1.46e-15) || !(z <= 108000000000.0)) {
		tmp = fabs(((x / y) * (1.0 - z)));
	} else {
		tmp = fabs(((x / y) + (4.0 / y)));
	}
	return tmp;
}
NOTE: y should be positive before calling this function
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.46d-15)) .or. (.not. (z <= 108000000000.0d0))) then
        tmp = abs(((x / y) * (1.0d0 - z)))
    else
        tmp = abs(((x / y) + (4.0d0 / y)))
    end if
    code = tmp
end function
y = Math.abs(y);
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -1.46e-15) || !(z <= 108000000000.0)) {
		tmp = Math.abs(((x / y) * (1.0 - z)));
	} else {
		tmp = Math.abs(((x / y) + (4.0 / y)));
	}
	return tmp;
}
y = abs(y)
def code(x, y, z):
	tmp = 0
	if (z <= -1.46e-15) or not (z <= 108000000000.0):
		tmp = math.fabs(((x / y) * (1.0 - z)))
	else:
		tmp = math.fabs(((x / y) + (4.0 / y)))
	return tmp
y = abs(y)
function code(x, y, z)
	tmp = 0.0
	if ((z <= -1.46e-15) || !(z <= 108000000000.0))
		tmp = abs(Float64(Float64(x / y) * Float64(1.0 - z)));
	else
		tmp = abs(Float64(Float64(x / y) + Float64(4.0 / y)));
	end
	return tmp
end
y = abs(y)
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -1.46e-15) || ~((z <= 108000000000.0)))
		tmp = abs(((x / y) * (1.0 - z)));
	else
		tmp = abs(((x / y) + (4.0 / y)));
	end
	tmp_2 = tmp;
end
NOTE: y should be positive before calling this function
code[x_, y_, z_] := If[Or[LessEqual[z, -1.46e-15], N[Not[LessEqual[z, 108000000000.0]], $MachinePrecision]], N[Abs[N[(N[(x / y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(x / y), $MachinePrecision] + N[(4.0 / y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y = |y|\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.46 \cdot 10^{-15} \lor \neg \left(z \leq 108000000000\right):\\
\;\;\;\;\left|\frac{x}{y} \cdot \left(1 - z\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{y} + \frac{4}{y}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4600000000000001e-15 or 1.08e11 < z

    1. Initial program 95.3%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Taylor expanded in x around inf 76.4%

      \[\leadsto \left|\color{blue}{\frac{x}{y}} - \frac{x}{y} \cdot z\right| \]
    3. Step-by-step derivation
      1. *-un-lft-identity76.4%

        \[\leadsto \left|\color{blue}{1 \cdot \frac{x}{y}} - \frac{x}{y} \cdot z\right| \]
      2. *-commutative76.4%

        \[\leadsto \left|1 \cdot \frac{x}{y} - \color{blue}{z \cdot \frac{x}{y}}\right| \]
      3. distribute-rgt-out--79.4%

        \[\leadsto \left|\color{blue}{\frac{x}{y} \cdot \left(1 - z\right)}\right| \]
    4. Applied egg-rr79.4%

      \[\leadsto \left|\color{blue}{\frac{x}{y} \cdot \left(1 - z\right)}\right| \]

    if -1.4600000000000001e-15 < z < 1.08e11

    1. Initial program 96.7%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/99.1%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/99.1%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified99.1%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in z around 0 100.0%

      \[\leadsto \left|\color{blue}{4 \cdot \frac{1}{y} + \frac{x}{y}}\right| \]
    5. Step-by-step derivation
      1. associate-*r/100.0%

        \[\leadsto \left|\color{blue}{\frac{4 \cdot 1}{y}} + \frac{x}{y}\right| \]
      2. metadata-eval100.0%

        \[\leadsto \left|\frac{\color{blue}{4}}{y} + \frac{x}{y}\right| \]
    6. Simplified100.0%

      \[\leadsto \left|\color{blue}{\frac{4}{y} + \frac{x}{y}}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.46 \cdot 10^{-15} \lor \neg \left(z \leq 108000000000\right):\\ \;\;\;\;\left|\frac{x}{y} \cdot \left(1 - z\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x}{y} + \frac{4}{y}\right|\\ \end{array} \]

Alternative 6: 97.6% accurate, 1.0× speedup?

\[\begin{array}{l} y = |y|\\ \\ \begin{array}{l} \mathbf{if}\;x \leq 3.7 \cdot 10^{+147}:\\ \;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x}{y} \cdot \left(1 - z\right)\right|\\ \end{array} \end{array} \]
NOTE: y should be positive before calling this function
(FPCore (x y z)
 :precision binary64
 (if (<= x 3.7e+147)
   (fabs (/ (- (+ x 4.0) (* x z)) y))
   (fabs (* (/ x y) (- 1.0 z)))))
y = abs(y);
double code(double x, double y, double z) {
	double tmp;
	if (x <= 3.7e+147) {
		tmp = fabs((((x + 4.0) - (x * z)) / y));
	} else {
		tmp = fabs(((x / y) * (1.0 - z)));
	}
	return tmp;
}
NOTE: y should be positive before calling this function
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 <= 3.7d+147) then
        tmp = abs((((x + 4.0d0) - (x * z)) / y))
    else
        tmp = abs(((x / y) * (1.0d0 - z)))
    end if
    code = tmp
end function
y = Math.abs(y);
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= 3.7e+147) {
		tmp = Math.abs((((x + 4.0) - (x * z)) / y));
	} else {
		tmp = Math.abs(((x / y) * (1.0 - z)));
	}
	return tmp;
}
y = abs(y)
def code(x, y, z):
	tmp = 0
	if x <= 3.7e+147:
		tmp = math.fabs((((x + 4.0) - (x * z)) / y))
	else:
		tmp = math.fabs(((x / y) * (1.0 - z)))
	return tmp
y = abs(y)
function code(x, y, z)
	tmp = 0.0
	if (x <= 3.7e+147)
		tmp = abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y));
	else
		tmp = abs(Float64(Float64(x / y) * Float64(1.0 - z)));
	end
	return tmp
end
y = abs(y)
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= 3.7e+147)
		tmp = abs((((x + 4.0) - (x * z)) / y));
	else
		tmp = abs(((x / y) * (1.0 - z)));
	end
	tmp_2 = tmp;
end
NOTE: y should be positive before calling this function
code[x_, y_, z_] := If[LessEqual[x, 3.7e+147], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(x / y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y = |y|\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.7 \cdot 10^{+147}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{y} \cdot \left(1 - z\right)\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.7e147

    1. Initial program 97.6%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/97.2%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/93.0%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified93.0%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Step-by-step derivation
      1. associate-*r/97.2%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. sub-div98.1%

        \[\leadsto \left|\color{blue}{\frac{\left(x + 4\right) - x \cdot z}{y}}\right| \]
    5. Applied egg-rr98.1%

      \[\leadsto \left|\color{blue}{\frac{\left(x + 4\right) - x \cdot z}{y}}\right| \]

    if 3.7e147 < x

    1. Initial program 86.1%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Taylor expanded in x around inf 86.1%

      \[\leadsto \left|\color{blue}{\frac{x}{y}} - \frac{x}{y} \cdot z\right| \]
    3. Step-by-step derivation
      1. *-un-lft-identity86.1%

        \[\leadsto \left|\color{blue}{1 \cdot \frac{x}{y}} - \frac{x}{y} \cdot z\right| \]
      2. *-commutative86.1%

        \[\leadsto \left|1 \cdot \frac{x}{y} - \color{blue}{z \cdot \frac{x}{y}}\right| \]
      3. distribute-rgt-out--100.0%

        \[\leadsto \left|\color{blue}{\frac{x}{y} \cdot \left(1 - z\right)}\right| \]
    4. Applied egg-rr100.0%

      \[\leadsto \left|\color{blue}{\frac{x}{y} \cdot \left(1 - z\right)}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.7 \cdot 10^{+147}:\\ \;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x}{y} \cdot \left(1 - z\right)\right|\\ \end{array} \]

Alternative 7: 85.2% accurate, 1.0× speedup?

\[\begin{array}{l} y = |y|\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -44000 \lor \neg \left(z \leq 7200000000000\right):\\ \;\;\;\;\left|\frac{z}{\frac{y}{x}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x + 4}{y}\right|\\ \end{array} \end{array} \]
NOTE: y should be positive before calling this function
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -44000.0) (not (<= z 7200000000000.0)))
   (fabs (/ z (/ y x)))
   (fabs (/ (+ x 4.0) y))))
y = abs(y);
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -44000.0) || !(z <= 7200000000000.0)) {
		tmp = fabs((z / (y / x)));
	} else {
		tmp = fabs(((x + 4.0) / y));
	}
	return tmp;
}
NOTE: y should be positive before calling this function
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 <= (-44000.0d0)) .or. (.not. (z <= 7200000000000.0d0))) then
        tmp = abs((z / (y / x)))
    else
        tmp = abs(((x + 4.0d0) / y))
    end if
    code = tmp
end function
y = Math.abs(y);
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -44000.0) || !(z <= 7200000000000.0)) {
		tmp = Math.abs((z / (y / x)));
	} else {
		tmp = Math.abs(((x + 4.0) / y));
	}
	return tmp;
}
y = abs(y)
def code(x, y, z):
	tmp = 0
	if (z <= -44000.0) or not (z <= 7200000000000.0):
		tmp = math.fabs((z / (y / x)))
	else:
		tmp = math.fabs(((x + 4.0) / y))
	return tmp
y = abs(y)
function code(x, y, z)
	tmp = 0.0
	if ((z <= -44000.0) || !(z <= 7200000000000.0))
		tmp = abs(Float64(z / Float64(y / x)));
	else
		tmp = abs(Float64(Float64(x + 4.0) / y));
	end
	return tmp
end
y = abs(y)
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -44000.0) || ~((z <= 7200000000000.0)))
		tmp = abs((z / (y / x)));
	else
		tmp = abs(((x + 4.0) / y));
	end
	tmp_2 = tmp;
end
NOTE: y should be positive before calling this function
code[x_, y_, z_] := If[Or[LessEqual[z, -44000.0], N[Not[LessEqual[z, 7200000000000.0]], $MachinePrecision]], N[Abs[N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
y = |y|\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -44000 \lor \neg \left(z \leq 7200000000000\right):\\
\;\;\;\;\left|\frac{z}{\frac{y}{x}}\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -44000 or 7.2e12 < z

    1. Initial program 95.2%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/90.2%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/86.7%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified86.7%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in z around inf 73.9%

      \[\leadsto \left|\color{blue}{-1 \cdot \frac{z \cdot x}{y}}\right| \]
    5. Step-by-step derivation
      1. mul-1-neg73.9%

        \[\leadsto \left|\color{blue}{-\frac{z \cdot x}{y}}\right| \]
      2. associate-/l*78.9%

        \[\leadsto \left|-\color{blue}{\frac{z}{\frac{y}{x}}}\right| \]
      3. distribute-neg-frac78.9%

        \[\leadsto \left|\color{blue}{\frac{-z}{\frac{y}{x}}}\right| \]
    6. Simplified78.9%

      \[\leadsto \left|\color{blue}{\frac{-z}{\frac{y}{x}}}\right| \]
    7. Step-by-step derivation
      1. associate-/r/74.5%

        \[\leadsto \left|\color{blue}{\frac{-z}{y} \cdot x}\right| \]
      2. add-sqr-sqrt39.3%

        \[\leadsto \left|\frac{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{y} \cdot x\right| \]
      3. sqrt-unprod51.8%

        \[\leadsto \left|\frac{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{y} \cdot x\right| \]
      4. sqr-neg51.8%

        \[\leadsto \left|\frac{\sqrt{\color{blue}{z \cdot z}}}{y} \cdot x\right| \]
      5. sqrt-unprod35.0%

        \[\leadsto \left|\frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{y} \cdot x\right| \]
      6. add-sqr-sqrt74.5%

        \[\leadsto \left|\frac{\color{blue}{z}}{y} \cdot x\right| \]
    8. Applied egg-rr74.5%

      \[\leadsto \left|\color{blue}{\frac{z}{y} \cdot x}\right| \]
    9. Step-by-step derivation
      1. associate-*l/73.9%

        \[\leadsto \left|\color{blue}{\frac{z \cdot x}{y}}\right| \]
      2. associate-/l*78.9%

        \[\leadsto \left|\color{blue}{\frac{z}{\frac{y}{x}}}\right| \]
    10. Applied egg-rr78.9%

      \[\leadsto \left|\color{blue}{\frac{z}{\frac{y}{x}}}\right| \]

    if -44000 < z < 7.2e12

    1. Initial program 96.8%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/99.2%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/99.2%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in z around 0 99.2%

      \[\leadsto \left|\color{blue}{4 \cdot \frac{1}{y} + \frac{x}{y}}\right| \]
    5. Step-by-step derivation
      1. +-commutative99.2%

        \[\leadsto \left|\color{blue}{\frac{x}{y} + 4 \cdot \frac{1}{y}}\right| \]
      2. *-rgt-identity99.2%

        \[\leadsto \left|\frac{\color{blue}{x \cdot 1}}{y} + 4 \cdot \frac{1}{y}\right| \]
      3. associate-*r/99.0%

        \[\leadsto \left|\color{blue}{x \cdot \frac{1}{y}} + 4 \cdot \frac{1}{y}\right| \]
      4. distribute-rgt-in99.0%

        \[\leadsto \left|\color{blue}{\frac{1}{y} \cdot \left(x + 4\right)}\right| \]
      5. associate-*l/99.2%

        \[\leadsto \left|\color{blue}{\frac{1 \cdot \left(x + 4\right)}{y}}\right| \]
      6. *-lft-identity99.2%

        \[\leadsto \left|\frac{\color{blue}{x + 4}}{y}\right| \]
    6. Simplified99.2%

      \[\leadsto \left|\color{blue}{\frac{x + 4}{y}}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -44000 \lor \neg \left(z \leq 7200000000000\right):\\ \;\;\;\;\left|\frac{z}{\frac{y}{x}}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{x + 4}{y}\right|\\ \end{array} \]

Alternative 8: 69.4% accurate, 1.0× speedup?

\[\begin{array}{l} y = |y|\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1.55 \lor \neg \left(x \leq 4\right):\\ \;\;\;\;\left|\frac{x}{y}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{4}{y}\right|\\ \end{array} \end{array} \]
NOTE: y should be positive before calling this function
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -1.55) (not (<= x 4.0))) (fabs (/ x y)) (fabs (/ 4.0 y))))
y = abs(y);
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1.55) || !(x <= 4.0)) {
		tmp = fabs((x / y));
	} else {
		tmp = fabs((4.0 / y));
	}
	return tmp;
}
NOTE: y should be positive before calling this function
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 <= (-1.55d0)) .or. (.not. (x <= 4.0d0))) then
        tmp = abs((x / y))
    else
        tmp = abs((4.0d0 / y))
    end if
    code = tmp
end function
y = Math.abs(y);
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1.55) || !(x <= 4.0)) {
		tmp = Math.abs((x / y));
	} else {
		tmp = Math.abs((4.0 / y));
	}
	return tmp;
}
y = abs(y)
def code(x, y, z):
	tmp = 0
	if (x <= -1.55) or not (x <= 4.0):
		tmp = math.fabs((x / y))
	else:
		tmp = math.fabs((4.0 / y))
	return tmp
y = abs(y)
function code(x, y, z)
	tmp = 0.0
	if ((x <= -1.55) || !(x <= 4.0))
		tmp = abs(Float64(x / y));
	else
		tmp = abs(Float64(4.0 / y));
	end
	return tmp
end
y = abs(y)
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -1.55) || ~((x <= 4.0)))
		tmp = abs((x / y));
	else
		tmp = abs((4.0 / y));
	end
	tmp_2 = tmp;
end
NOTE: y should be positive before calling this function
code[x_, y_, z_] := If[Or[LessEqual[x, -1.55], 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}
y = |y|\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \lor \neg \left(x \leq 4\right):\\
\;\;\;\;\left|\frac{x}{y}\right|\\

\mathbf{else}:\\
\;\;\;\;\left|\frac{4}{y}\right|\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.55000000000000004 or 4 < x

    1. Initial program 93.8%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/89.7%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/96.1%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified96.1%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in z around 0 56.9%

      \[\leadsto \left|\color{blue}{4 \cdot \frac{1}{y} + \frac{x}{y}}\right| \]
    5. Step-by-step derivation
      1. associate-*r/56.9%

        \[\leadsto \left|\color{blue}{\frac{4 \cdot 1}{y}} + \frac{x}{y}\right| \]
      2. metadata-eval56.9%

        \[\leadsto \left|\frac{\color{blue}{4}}{y} + \frac{x}{y}\right| \]
    6. Simplified56.9%

      \[\leadsto \left|\color{blue}{\frac{4}{y} + \frac{x}{y}}\right| \]
    7. Taylor expanded in x around inf 55.2%

      \[\leadsto \left|\color{blue}{\frac{x}{y}}\right| \]

    if -1.55000000000000004 < x < 4

    1. Initial program 98.3%

      \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
    2. Step-by-step derivation
      1. associate-*l/99.8%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
      2. associate-*r/89.2%

        \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
    3. Simplified89.2%

      \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
    4. Taylor expanded in x around 0 72.8%

      \[\leadsto \left|\color{blue}{\frac{4}{y}}\right| \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.55 \lor \neg \left(x \leq 4\right):\\ \;\;\;\;\left|\frac{x}{y}\right|\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{4}{y}\right|\\ \end{array} \]

Alternative 9: 40.6% accurate, 1.1× speedup?

\[\begin{array}{l} y = |y|\\ \\ \left|\frac{4}{y}\right| \end{array} \]
NOTE: y should be positive before calling this function
(FPCore (x y z) :precision binary64 (fabs (/ 4.0 y)))
y = abs(y);
double code(double x, double y, double z) {
	return fabs((4.0 / y));
}
NOTE: y should be positive before calling this function
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
y = Math.abs(y);
public static double code(double x, double y, double z) {
	return Math.abs((4.0 / y));
}
y = abs(y)
def code(x, y, z):
	return math.fabs((4.0 / y))
y = abs(y)
function code(x, y, z)
	return abs(Float64(4.0 / y))
end
y = abs(y)
function tmp = code(x, y, z)
	tmp = abs((4.0 / y));
end
NOTE: y should be positive before calling this function
code[x_, y_, z_] := N[Abs[N[(4.0 / y), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
y = |y|\\
\\
\left|\frac{4}{y}\right|
\end{array}
Derivation
  1. Initial program 96.0%

    \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right| \]
  2. Step-by-step derivation
    1. associate-*l/94.6%

      \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{\frac{x \cdot z}{y}}\right| \]
    2. associate-*r/92.8%

      \[\leadsto \left|\frac{x + 4}{y} - \color{blue}{x \cdot \frac{z}{y}}\right| \]
  3. Simplified92.8%

    \[\leadsto \color{blue}{\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|} \]
  4. Taylor expanded in x around 0 37.7%

    \[\leadsto \left|\color{blue}{\frac{4}{y}}\right| \]
  5. Final simplification37.7%

    \[\leadsto \left|\frac{4}{y}\right| \]

Reproduce

?
herbie shell --seed 2023274 
(FPCore (x y z)
  :name "fabs fraction 1"
  :precision binary64
  (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))