Numeric.SpecFunctions:choose from math-functions-0.1.5.2

Percentage Accurate: 84.1% → 96.6%
Time: 7.1s
Alternatives: 6
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot \left(y + z\right)}{z} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* x (+ y z)) z))
double code(double x, double y, double z) {
	return (x * (y + z)) / z;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * (y + z)) / z
end function
public static double code(double x, double y, double z) {
	return (x * (y + z)) / z;
}
def code(x, y, z):
	return (x * (y + z)) / z
function code(x, y, z)
	return Float64(Float64(x * Float64(y + z)) / z)
end
function tmp = code(x, y, z)
	tmp = (x * (y + z)) / z;
end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \left(y + z\right)}{z}
\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 6 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: 84.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot \left(y + z\right)}{z} \end{array} \]
(FPCore (x y z) :precision binary64 (/ (* x (+ y z)) z))
double code(double x, double y, double z) {
	return (x * (y + z)) / z;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * (y + z)) / z
end function
public static double code(double x, double y, double z) {
	return (x * (y + z)) / z;
}
def code(x, y, z):
	return (x * (y + z)) / z
function code(x, y, z)
	return Float64(Float64(x * Float64(y + z)) / z)
end
function tmp = code(x, y, z)
	tmp = (x * (y + z)) / z;
end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot \left(y + z\right)}{z}
\end{array}

Alternative 1: 96.6% accurate, 0.4× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{x\_m \cdot \left(y + z\right)}{z} \leq -1 \cdot 10^{+87}:\\ \;\;\;\;\left(y + z\right) \cdot \frac{x\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \left(1 + \frac{y}{z}\right)\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z)
 :precision binary64
 (*
  x_s
  (if (<= (/ (* x_m (+ y z)) z) -1e+87)
    (* (+ y z) (/ x_m z))
    (* x_m (+ 1.0 (/ y z))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if (((x_m * (y + z)) / z) <= -1e+87) {
		tmp = (y + z) * (x_m / z);
	} else {
		tmp = x_m * (1.0 + (y / z));
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (((x_m * (y + z)) / z) <= (-1d+87)) then
        tmp = (y + z) * (x_m / z)
    else
        tmp = x_m * (1.0d0 + (y / z))
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if (((x_m * (y + z)) / z) <= -1e+87) {
		tmp = (y + z) * (x_m / z);
	} else {
		tmp = x_m * (1.0 + (y / z));
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z):
	tmp = 0
	if ((x_m * (y + z)) / z) <= -1e+87:
		tmp = (y + z) * (x_m / z)
	else:
		tmp = x_m * (1.0 + (y / z))
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z)
	tmp = 0.0
	if (Float64(Float64(x_m * Float64(y + z)) / z) <= -1e+87)
		tmp = Float64(Float64(y + z) * Float64(x_m / z));
	else
		tmp = Float64(x_m * Float64(1.0 + Float64(y / z)));
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z)
	tmp = 0.0;
	if (((x_m * (y + z)) / z) <= -1e+87)
		tmp = (y + z) * (x_m / z);
	else
		tmp = x_m * (1.0 + (y / z));
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[LessEqual[N[(N[(x$95$m * N[(y + z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], -1e+87], N[(N[(y + z), $MachinePrecision] * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{x\_m \cdot \left(y + z\right)}{z} \leq -1 \cdot 10^{+87}:\\
\;\;\;\;\left(y + z\right) \cdot \frac{x\_m}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 x (+.f64 y z)) z) < -9.9999999999999996e86

    1. Initial program 73.7%

      \[\frac{x \cdot \left(y + z\right)}{z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{z}{x \cdot \left(y + z\right)}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{1}{z} \cdot \color{blue}{\left(x \cdot \left(y + z\right)\right)} \]
      3. associate-*r*N/A

        \[\leadsto \left(\frac{1}{z} \cdot x\right) \cdot \color{blue}{\left(y + z\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{z} \cdot x\right), \color{blue}{\left(y + z\right)}\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1 \cdot x}{z}\right), \left(\color{blue}{y} + z\right)\right) \]
      6. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{x}{z}\right), \left(y + z\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, z\right), \left(\color{blue}{y} + z\right)\right) \]
      8. +-lowering-+.f6492.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, z\right), \mathsf{+.f64}\left(y, \color{blue}{z}\right)\right) \]
    4. Applied egg-rr92.9%

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

    if -9.9999999999999996e86 < (/.f64 (*.f64 x (+.f64 y z)) z)

    1. Initial program 86.7%

      \[\frac{x \cdot \left(y + z\right)}{z} \]
    2. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto x \cdot \color{blue}{\frac{y + z}{z}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y + z}{z}\right)}\right) \]
      3. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot \left(y + z\right)}{z}\right)\right) \]
      4. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot \left(y + z\right)}{z}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot \color{blue}{\left(y + z\right)}\right)\right) \]
      6. distribute-lft-inN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot y + \color{blue}{\frac{\frac{z}{z}}{z} \cdot z}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot y}{z} + \color{blue}{\frac{\frac{z}{z}}{z}} \cdot z\right)\right) \]
      8. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot y}{z} + \frac{\frac{\color{blue}{z}}{z}}{z} \cdot z\right)\right) \]
      9. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{\color{blue}{\frac{z}{z}}}{z} \cdot z\right)\right) \]
      10. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{1}{z} \cdot z\right)\right) \]
      11. lft-mult-inverseN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + 1\right)\right) \]
      12. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{z}{\color{blue}{z}}\right)\right) \]
      13. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{z}{z} + \color{blue}{\frac{y}{z}}\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{z}{z}\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      15. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\color{blue}{y}}{z}\right)\right)\right) \]
      16. *-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot 1}{z}\right)\right)\right) \]
      17. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot \frac{z}{z}}{z}\right)\right)\right) \]
      18. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y \cdot z}{z}}{z}\right)\right)\right) \]
      19. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y}{z} \cdot z}{z}\right)\right)\right) \]
      20. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{z \cdot \frac{y}{z}}{z}\right)\right)\right) \]
      21. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(z \cdot \frac{y}{z}\right), \color{blue}{z}\right)\right)\right) \]
      22. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y}{z} \cdot z\right), z\right)\right)\right) \]
      23. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y \cdot z}{z}\right), z\right)\right)\right) \]
      24. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot \frac{z}{z}\right), z\right)\right)\right) \]
      25. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot 1\right), z\right)\right)\right) \]
      26. *-rgt-identity97.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right) \]
    3. Simplified97.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot \left(y + z\right)}{z} \leq -1 \cdot 10^{+87}:\\ \;\;\;\;\left(y + z\right) \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 + \frac{y}{z}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 72.8% accurate, 0.5× speedup?

\[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.16 \cdot 10^{+21}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{-61}:\\ \;\;\;\;\frac{x\_m \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z)
 :precision binary64
 (* x_s (if (<= z -1.16e+21) x_m (if (<= z 1.05e-61) (/ (* x_m y) z) x_m))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if (z <= -1.16e+21) {
		tmp = x_m;
	} else if (z <= 1.05e-61) {
		tmp = (x_m * y) / z;
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (z <= (-1.16d+21)) then
        tmp = x_m
    else if (z <= 1.05d-61) then
        tmp = (x_m * y) / z
    else
        tmp = x_m
    end if
    code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if (z <= -1.16e+21) {
		tmp = x_m;
	} else if (z <= 1.05e-61) {
		tmp = (x_m * y) / z;
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x\_m = math.fabs(x)
x\_s = math.copysign(1.0, x)
def code(x_s, x_m, y, z):
	tmp = 0
	if z <= -1.16e+21:
		tmp = x_m
	elif z <= 1.05e-61:
		tmp = (x_m * y) / z
	else:
		tmp = x_m
	return x_s * tmp
x\_m = abs(x)
x\_s = copysign(1.0, x)
function code(x_s, x_m, y, z)
	tmp = 0.0
	if (z <= -1.16e+21)
		tmp = x_m;
	elseif (z <= 1.05e-61)
		tmp = Float64(Float64(x_m * y) / z);
	else
		tmp = x_m;
	end
	return Float64(x_s * tmp)
end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
function tmp_2 = code(x_s, x_m, y, z)
	tmp = 0.0;
	if (z <= -1.16e+21)
		tmp = x_m;
	elseif (z <= 1.05e-61)
		tmp = (x_m * y) / z;
	else
		tmp = x_m;
	end
	tmp_2 = x_s * tmp;
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[LessEqual[z, -1.16e+21], x$95$m, If[LessEqual[z, 1.05e-61], N[(N[(x$95$m * y), $MachinePrecision] / z), $MachinePrecision], x$95$m]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)

\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{+21}:\\
\;\;\;\;x\_m\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{-61}:\\
\;\;\;\;\frac{x\_m \cdot y}{z}\\

\mathbf{else}:\\
\;\;\;\;x\_m\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.16e21 or 1.05e-61 < z

    1. Initial program 70.1%

      \[\frac{x \cdot \left(y + z\right)}{z} \]
    2. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto x \cdot \color{blue}{\frac{y + z}{z}} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y + z}{z}\right)}\right) \]
      3. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot \left(y + z\right)}{z}\right)\right) \]
      4. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot \left(y + z\right)}{z}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot \color{blue}{\left(y + z\right)}\right)\right) \]
      6. distribute-lft-inN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot y + \color{blue}{\frac{\frac{z}{z}}{z} \cdot z}\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot y}{z} + \color{blue}{\frac{\frac{z}{z}}{z}} \cdot z\right)\right) \]
      8. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot y}{z} + \frac{\frac{\color{blue}{z}}{z}}{z} \cdot z\right)\right) \]
      9. *-lft-identityN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{\color{blue}{\frac{z}{z}}}{z} \cdot z\right)\right) \]
      10. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{1}{z} \cdot z\right)\right) \]
      11. lft-mult-inverseN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + 1\right)\right) \]
      12. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{z}{\color{blue}{z}}\right)\right) \]
      13. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{z}{z} + \color{blue}{\frac{y}{z}}\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{z}{z}\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
      15. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\color{blue}{y}}{z}\right)\right)\right) \]
      16. *-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot 1}{z}\right)\right)\right) \]
      17. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot \frac{z}{z}}{z}\right)\right)\right) \]
      18. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y \cdot z}{z}}{z}\right)\right)\right) \]
      19. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y}{z} \cdot z}{z}\right)\right)\right) \]
      20. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{z \cdot \frac{y}{z}}{z}\right)\right)\right) \]
      21. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(z \cdot \frac{y}{z}\right), \color{blue}{z}\right)\right)\right) \]
      22. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y}{z} \cdot z\right), z\right)\right)\right) \]
      23. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y \cdot z}{z}\right), z\right)\right)\right) \]
      24. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot \frac{z}{z}\right), z\right)\right)\right) \]
      25. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot 1\right), z\right)\right)\right) \]
      26. *-rgt-identity99.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right) \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y}{z}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0

      \[\leadsto \color{blue}{x} \]
    6. Step-by-step derivation
      1. Simplified77.8%

        \[\leadsto \color{blue}{x} \]

      if -1.16e21 < z < 1.05e-61

      1. Initial program 95.3%

        \[\frac{x \cdot \left(y + z\right)}{z} \]
      2. Add Preprocessing
      3. Taylor expanded in y around inf

        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(x \cdot y\right)}, z\right) \]
      4. Step-by-step derivation
        1. *-lowering-*.f6476.6%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, y\right), z\right) \]
      5. Simplified76.6%

        \[\leadsto \frac{\color{blue}{x \cdot y}}{z} \]
    7. Recombined 2 regimes into one program.
    8. Add Preprocessing

    Alternative 3: 72.5% accurate, 0.5× speedup?

    \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+20}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-63}:\\ \;\;\;\;y \cdot \frac{x\_m}{z}\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
    x\_m = (fabs.f64 x)
    x\_s = (copysign.f64 #s(literal 1 binary64) x)
    (FPCore (x_s x_m y z)
     :precision binary64
     (* x_s (if (<= z -7e+20) x_m (if (<= z 4.6e-63) (* y (/ x_m z)) x_m))))
    x\_m = fabs(x);
    x\_s = copysign(1.0, x);
    double code(double x_s, double x_m, double y, double z) {
    	double tmp;
    	if (z <= -7e+20) {
    		tmp = x_m;
    	} else if (z <= 4.6e-63) {
    		tmp = y * (x_m / z);
    	} else {
    		tmp = x_m;
    	}
    	return x_s * tmp;
    }
    
    x\_m = abs(x)
    x\_s = copysign(1.0d0, x)
    real(8) function code(x_s, x_m, y, z)
        real(8), intent (in) :: x_s
        real(8), intent (in) :: x_m
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: tmp
        if (z <= (-7d+20)) then
            tmp = x_m
        else if (z <= 4.6d-63) then
            tmp = y * (x_m / z)
        else
            tmp = x_m
        end if
        code = x_s * tmp
    end function
    
    x\_m = Math.abs(x);
    x\_s = Math.copySign(1.0, x);
    public static double code(double x_s, double x_m, double y, double z) {
    	double tmp;
    	if (z <= -7e+20) {
    		tmp = x_m;
    	} else if (z <= 4.6e-63) {
    		tmp = y * (x_m / z);
    	} else {
    		tmp = x_m;
    	}
    	return x_s * tmp;
    }
    
    x\_m = math.fabs(x)
    x\_s = math.copysign(1.0, x)
    def code(x_s, x_m, y, z):
    	tmp = 0
    	if z <= -7e+20:
    		tmp = x_m
    	elif z <= 4.6e-63:
    		tmp = y * (x_m / z)
    	else:
    		tmp = x_m
    	return x_s * tmp
    
    x\_m = abs(x)
    x\_s = copysign(1.0, x)
    function code(x_s, x_m, y, z)
    	tmp = 0.0
    	if (z <= -7e+20)
    		tmp = x_m;
    	elseif (z <= 4.6e-63)
    		tmp = Float64(y * Float64(x_m / z));
    	else
    		tmp = x_m;
    	end
    	return Float64(x_s * tmp)
    end
    
    x\_m = abs(x);
    x\_s = sign(x) * abs(1.0);
    function tmp_2 = code(x_s, x_m, y, z)
    	tmp = 0.0;
    	if (z <= -7e+20)
    		tmp = x_m;
    	elseif (z <= 4.6e-63)
    		tmp = y * (x_m / z);
    	else
    		tmp = x_m;
    	end
    	tmp_2 = x_s * tmp;
    end
    
    x\_m = N[Abs[x], $MachinePrecision]
    x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[LessEqual[z, -7e+20], x$95$m, If[LessEqual[z, 4.6e-63], N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], x$95$m]]), $MachinePrecision]
    
    \begin{array}{l}
    x\_m = \left|x\right|
    \\
    x\_s = \mathsf{copysign}\left(1, x\right)
    
    \\
    x\_s \cdot \begin{array}{l}
    \mathbf{if}\;z \leq -7 \cdot 10^{+20}:\\
    \;\;\;\;x\_m\\
    
    \mathbf{elif}\;z \leq 4.6 \cdot 10^{-63}:\\
    \;\;\;\;y \cdot \frac{x\_m}{z}\\
    
    \mathbf{else}:\\
    \;\;\;\;x\_m\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -7e20 or 4.6e-63 < z

      1. Initial program 70.1%

        \[\frac{x \cdot \left(y + z\right)}{z} \]
      2. Step-by-step derivation
        1. associate-/l*N/A

          \[\leadsto x \cdot \color{blue}{\frac{y + z}{z}} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y + z}{z}\right)}\right) \]
        3. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot \left(y + z\right)}{z}\right)\right) \]
        4. *-inversesN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot \left(y + z\right)}{z}\right)\right) \]
        5. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot \color{blue}{\left(y + z\right)}\right)\right) \]
        6. distribute-lft-inN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot y + \color{blue}{\frac{\frac{z}{z}}{z} \cdot z}\right)\right) \]
        7. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot y}{z} + \color{blue}{\frac{\frac{z}{z}}{z}} \cdot z\right)\right) \]
        8. *-inversesN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot y}{z} + \frac{\frac{\color{blue}{z}}{z}}{z} \cdot z\right)\right) \]
        9. *-lft-identityN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{\color{blue}{\frac{z}{z}}}{z} \cdot z\right)\right) \]
        10. *-inversesN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{1}{z} \cdot z\right)\right) \]
        11. lft-mult-inverseN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + 1\right)\right) \]
        12. *-inversesN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{z}{\color{blue}{z}}\right)\right) \]
        13. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{z}{z} + \color{blue}{\frac{y}{z}}\right)\right) \]
        14. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{z}{z}\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
        15. *-inversesN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\color{blue}{y}}{z}\right)\right)\right) \]
        16. *-rgt-identityN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot 1}{z}\right)\right)\right) \]
        17. *-inversesN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot \frac{z}{z}}{z}\right)\right)\right) \]
        18. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y \cdot z}{z}}{z}\right)\right)\right) \]
        19. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y}{z} \cdot z}{z}\right)\right)\right) \]
        20. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{z \cdot \frac{y}{z}}{z}\right)\right)\right) \]
        21. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(z \cdot \frac{y}{z}\right), \color{blue}{z}\right)\right)\right) \]
        22. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y}{z} \cdot z\right), z\right)\right)\right) \]
        23. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y \cdot z}{z}\right), z\right)\right)\right) \]
        24. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot \frac{z}{z}\right), z\right)\right)\right) \]
        25. *-inversesN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot 1\right), z\right)\right)\right) \]
        26. *-rgt-identity99.9%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right) \]
      3. Simplified99.9%

        \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y}{z}\right)} \]
      4. Add Preprocessing
      5. Taylor expanded in y around 0

        \[\leadsto \color{blue}{x} \]
      6. Step-by-step derivation
        1. Simplified77.8%

          \[\leadsto \color{blue}{x} \]

        if -7e20 < z < 4.6e-63

        1. Initial program 95.3%

          \[\frac{x \cdot \left(y + z\right)}{z} \]
        2. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{y + z}{z}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y + z}{z}\right)}\right) \]
          3. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot \left(y + z\right)}{z}\right)\right) \]
          4. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot \left(y + z\right)}{z}\right)\right) \]
          5. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot \color{blue}{\left(y + z\right)}\right)\right) \]
          6. distribute-lft-inN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot y + \color{blue}{\frac{\frac{z}{z}}{z} \cdot z}\right)\right) \]
          7. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot y}{z} + \color{blue}{\frac{\frac{z}{z}}{z}} \cdot z\right)\right) \]
          8. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot y}{z} + \frac{\frac{\color{blue}{z}}{z}}{z} \cdot z\right)\right) \]
          9. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{\color{blue}{\frac{z}{z}}}{z} \cdot z\right)\right) \]
          10. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{1}{z} \cdot z\right)\right) \]
          11. lft-mult-inverseN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + 1\right)\right) \]
          12. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{z}{\color{blue}{z}}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{z}{z} + \color{blue}{\frac{y}{z}}\right)\right) \]
          14. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{z}{z}\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
          15. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\color{blue}{y}}{z}\right)\right)\right) \]
          16. *-rgt-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot 1}{z}\right)\right)\right) \]
          17. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot \frac{z}{z}}{z}\right)\right)\right) \]
          18. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y \cdot z}{z}}{z}\right)\right)\right) \]
          19. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y}{z} \cdot z}{z}\right)\right)\right) \]
          20. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{z \cdot \frac{y}{z}}{z}\right)\right)\right) \]
          21. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(z \cdot \frac{y}{z}\right), \color{blue}{z}\right)\right)\right) \]
          22. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y}{z} \cdot z\right), z\right)\right)\right) \]
          23. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y \cdot z}{z}\right), z\right)\right)\right) \]
          24. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot \frac{z}{z}\right), z\right)\right)\right) \]
          25. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot 1\right), z\right)\right)\right) \]
          26. *-rgt-identity92.1%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right) \]
        3. Simplified92.1%

          \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y}{z}\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in y around inf

          \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y}{z}\right)}\right) \]
        6. Step-by-step derivation
          1. /-lowering-/.f6470.5%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right) \]
        7. Simplified70.5%

          \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
        8. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \frac{x \cdot y}{\color{blue}{z}} \]
          2. associate-*l/N/A

            \[\leadsto \frac{x}{z} \cdot \color{blue}{y} \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(\frac{x}{z}\right), \color{blue}{y}\right) \]
          4. /-lowering-/.f6476.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(x, z\right), y\right) \]
        9. Applied egg-rr76.2%

          \[\leadsto \color{blue}{\frac{x}{z} \cdot y} \]
      7. Recombined 2 regimes into one program.
      8. Final simplification76.9%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7 \cdot 10^{+20}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-63}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 70.5% accurate, 0.5× speedup?

      \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+21}:\\ \;\;\;\;x\_m\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-64}:\\ \;\;\;\;x\_m \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
      x\_m = (fabs.f64 x)
      x\_s = (copysign.f64 #s(literal 1 binary64) x)
      (FPCore (x_s x_m y z)
       :precision binary64
       (* x_s (if (<= z -1.8e+21) x_m (if (<= z 4.5e-64) (* x_m (/ y z)) x_m))))
      x\_m = fabs(x);
      x\_s = copysign(1.0, x);
      double code(double x_s, double x_m, double y, double z) {
      	double tmp;
      	if (z <= -1.8e+21) {
      		tmp = x_m;
      	} else if (z <= 4.5e-64) {
      		tmp = x_m * (y / z);
      	} else {
      		tmp = x_m;
      	}
      	return x_s * tmp;
      }
      
      x\_m = abs(x)
      x\_s = copysign(1.0d0, x)
      real(8) function code(x_s, x_m, y, z)
          real(8), intent (in) :: x_s
          real(8), intent (in) :: x_m
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: tmp
          if (z <= (-1.8d+21)) then
              tmp = x_m
          else if (z <= 4.5d-64) then
              tmp = x_m * (y / z)
          else
              tmp = x_m
          end if
          code = x_s * tmp
      end function
      
      x\_m = Math.abs(x);
      x\_s = Math.copySign(1.0, x);
      public static double code(double x_s, double x_m, double y, double z) {
      	double tmp;
      	if (z <= -1.8e+21) {
      		tmp = x_m;
      	} else if (z <= 4.5e-64) {
      		tmp = x_m * (y / z);
      	} else {
      		tmp = x_m;
      	}
      	return x_s * tmp;
      }
      
      x\_m = math.fabs(x)
      x\_s = math.copysign(1.0, x)
      def code(x_s, x_m, y, z):
      	tmp = 0
      	if z <= -1.8e+21:
      		tmp = x_m
      	elif z <= 4.5e-64:
      		tmp = x_m * (y / z)
      	else:
      		tmp = x_m
      	return x_s * tmp
      
      x\_m = abs(x)
      x\_s = copysign(1.0, x)
      function code(x_s, x_m, y, z)
      	tmp = 0.0
      	if (z <= -1.8e+21)
      		tmp = x_m;
      	elseif (z <= 4.5e-64)
      		tmp = Float64(x_m * Float64(y / z));
      	else
      		tmp = x_m;
      	end
      	return Float64(x_s * tmp)
      end
      
      x\_m = abs(x);
      x\_s = sign(x) * abs(1.0);
      function tmp_2 = code(x_s, x_m, y, z)
      	tmp = 0.0;
      	if (z <= -1.8e+21)
      		tmp = x_m;
      	elseif (z <= 4.5e-64)
      		tmp = x_m * (y / z);
      	else
      		tmp = x_m;
      	end
      	tmp_2 = x_s * tmp;
      end
      
      x\_m = N[Abs[x], $MachinePrecision]
      x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[LessEqual[z, -1.8e+21], x$95$m, If[LessEqual[z, 4.5e-64], N[(x$95$m * N[(y / z), $MachinePrecision]), $MachinePrecision], x$95$m]]), $MachinePrecision]
      
      \begin{array}{l}
      x\_m = \left|x\right|
      \\
      x\_s = \mathsf{copysign}\left(1, x\right)
      
      \\
      x\_s \cdot \begin{array}{l}
      \mathbf{if}\;z \leq -1.8 \cdot 10^{+21}:\\
      \;\;\;\;x\_m\\
      
      \mathbf{elif}\;z \leq 4.5 \cdot 10^{-64}:\\
      \;\;\;\;x\_m \cdot \frac{y}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;x\_m\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -1.8e21 or 4.5000000000000001e-64 < z

        1. Initial program 70.1%

          \[\frac{x \cdot \left(y + z\right)}{z} \]
        2. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{y + z}{z}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y + z}{z}\right)}\right) \]
          3. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot \left(y + z\right)}{z}\right)\right) \]
          4. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot \left(y + z\right)}{z}\right)\right) \]
          5. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot \color{blue}{\left(y + z\right)}\right)\right) \]
          6. distribute-lft-inN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot y + \color{blue}{\frac{\frac{z}{z}}{z} \cdot z}\right)\right) \]
          7. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot y}{z} + \color{blue}{\frac{\frac{z}{z}}{z}} \cdot z\right)\right) \]
          8. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot y}{z} + \frac{\frac{\color{blue}{z}}{z}}{z} \cdot z\right)\right) \]
          9. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{\color{blue}{\frac{z}{z}}}{z} \cdot z\right)\right) \]
          10. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{1}{z} \cdot z\right)\right) \]
          11. lft-mult-inverseN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + 1\right)\right) \]
          12. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{z}{\color{blue}{z}}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{z}{z} + \color{blue}{\frac{y}{z}}\right)\right) \]
          14. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{z}{z}\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
          15. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\color{blue}{y}}{z}\right)\right)\right) \]
          16. *-rgt-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot 1}{z}\right)\right)\right) \]
          17. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot \frac{z}{z}}{z}\right)\right)\right) \]
          18. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y \cdot z}{z}}{z}\right)\right)\right) \]
          19. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y}{z} \cdot z}{z}\right)\right)\right) \]
          20. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{z \cdot \frac{y}{z}}{z}\right)\right)\right) \]
          21. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(z \cdot \frac{y}{z}\right), \color{blue}{z}\right)\right)\right) \]
          22. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y}{z} \cdot z\right), z\right)\right)\right) \]
          23. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y \cdot z}{z}\right), z\right)\right)\right) \]
          24. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot \frac{z}{z}\right), z\right)\right)\right) \]
          25. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot 1\right), z\right)\right)\right) \]
          26. *-rgt-identity99.9%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right) \]
        3. Simplified99.9%

          \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y}{z}\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in y around 0

          \[\leadsto \color{blue}{x} \]
        6. Step-by-step derivation
          1. Simplified77.8%

            \[\leadsto \color{blue}{x} \]

          if -1.8e21 < z < 4.5000000000000001e-64

          1. Initial program 95.3%

            \[\frac{x \cdot \left(y + z\right)}{z} \]
          2. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto x \cdot \color{blue}{\frac{y + z}{z}} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y + z}{z}\right)}\right) \]
            3. *-lft-identityN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot \left(y + z\right)}{z}\right)\right) \]
            4. *-inversesN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot \left(y + z\right)}{z}\right)\right) \]
            5. associate-*l/N/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot \color{blue}{\left(y + z\right)}\right)\right) \]
            6. distribute-lft-inN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot y + \color{blue}{\frac{\frac{z}{z}}{z} \cdot z}\right)\right) \]
            7. associate-*l/N/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot y}{z} + \color{blue}{\frac{\frac{z}{z}}{z}} \cdot z\right)\right) \]
            8. *-inversesN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot y}{z} + \frac{\frac{\color{blue}{z}}{z}}{z} \cdot z\right)\right) \]
            9. *-lft-identityN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{\color{blue}{\frac{z}{z}}}{z} \cdot z\right)\right) \]
            10. *-inversesN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{1}{z} \cdot z\right)\right) \]
            11. lft-mult-inverseN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + 1\right)\right) \]
            12. *-inversesN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{z}{\color{blue}{z}}\right)\right) \]
            13. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{z}{z} + \color{blue}{\frac{y}{z}}\right)\right) \]
            14. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{z}{z}\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
            15. *-inversesN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\color{blue}{y}}{z}\right)\right)\right) \]
            16. *-rgt-identityN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot 1}{z}\right)\right)\right) \]
            17. *-inversesN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot \frac{z}{z}}{z}\right)\right)\right) \]
            18. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y \cdot z}{z}}{z}\right)\right)\right) \]
            19. associate-*l/N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y}{z} \cdot z}{z}\right)\right)\right) \]
            20. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{z \cdot \frac{y}{z}}{z}\right)\right)\right) \]
            21. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(z \cdot \frac{y}{z}\right), \color{blue}{z}\right)\right)\right) \]
            22. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y}{z} \cdot z\right), z\right)\right)\right) \]
            23. associate-*l/N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y \cdot z}{z}\right), z\right)\right)\right) \]
            24. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot \frac{z}{z}\right), z\right)\right)\right) \]
            25. *-inversesN/A

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot 1\right), z\right)\right)\right) \]
            26. *-rgt-identity92.1%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right) \]
          3. Simplified92.1%

            \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y}{z}\right)} \]
          4. Add Preprocessing
          5. Taylor expanded in y around inf

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y}{z}\right)}\right) \]
          6. Step-by-step derivation
            1. /-lowering-/.f6470.5%

              \[\leadsto \mathsf{*.f64}\left(x, \mathsf{/.f64}\left(y, \color{blue}{z}\right)\right) \]
          7. Simplified70.5%

            \[\leadsto x \cdot \color{blue}{\frac{y}{z}} \]
        7. Recombined 2 regimes into one program.
        8. Add Preprocessing

        Alternative 5: 95.7% accurate, 1.0× speedup?

        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot \left(x\_m \cdot \left(1 + \frac{y}{z}\right)\right) \end{array} \]
        x\_m = (fabs.f64 x)
        x\_s = (copysign.f64 #s(literal 1 binary64) x)
        (FPCore (x_s x_m y z) :precision binary64 (* x_s (* x_m (+ 1.0 (/ y z)))))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        double code(double x_s, double x_m, double y, double z) {
        	return x_s * (x_m * (1.0 + (y / z)));
        }
        
        x\_m = abs(x)
        x\_s = copysign(1.0d0, x)
        real(8) function code(x_s, x_m, y, z)
            real(8), intent (in) :: x_s
            real(8), intent (in) :: x_m
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            code = x_s * (x_m * (1.0d0 + (y / z)))
        end function
        
        x\_m = Math.abs(x);
        x\_s = Math.copySign(1.0, x);
        public static double code(double x_s, double x_m, double y, double z) {
        	return x_s * (x_m * (1.0 + (y / z)));
        }
        
        x\_m = math.fabs(x)
        x\_s = math.copysign(1.0, x)
        def code(x_s, x_m, y, z):
        	return x_s * (x_m * (1.0 + (y / z)))
        
        x\_m = abs(x)
        x\_s = copysign(1.0, x)
        function code(x_s, x_m, y, z)
        	return Float64(x_s * Float64(x_m * Float64(1.0 + Float64(y / z))))
        end
        
        x\_m = abs(x);
        x\_s = sign(x) * abs(1.0);
        function tmp = code(x_s, x_m, y, z)
        	tmp = x_s * (x_m * (1.0 + (y / z)));
        end
        
        x\_m = N[Abs[x], $MachinePrecision]
        x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * N[(x$95$m * N[(1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        
        \\
        x\_s \cdot \left(x\_m \cdot \left(1 + \frac{y}{z}\right)\right)
        \end{array}
        
        Derivation
        1. Initial program 83.3%

          \[\frac{x \cdot \left(y + z\right)}{z} \]
        2. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{y + z}{z}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y + z}{z}\right)}\right) \]
          3. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot \left(y + z\right)}{z}\right)\right) \]
          4. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot \left(y + z\right)}{z}\right)\right) \]
          5. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot \color{blue}{\left(y + z\right)}\right)\right) \]
          6. distribute-lft-inN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot y + \color{blue}{\frac{\frac{z}{z}}{z} \cdot z}\right)\right) \]
          7. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot y}{z} + \color{blue}{\frac{\frac{z}{z}}{z}} \cdot z\right)\right) \]
          8. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot y}{z} + \frac{\frac{\color{blue}{z}}{z}}{z} \cdot z\right)\right) \]
          9. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{\color{blue}{\frac{z}{z}}}{z} \cdot z\right)\right) \]
          10. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{1}{z} \cdot z\right)\right) \]
          11. lft-mult-inverseN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + 1\right)\right) \]
          12. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{z}{\color{blue}{z}}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{z}{z} + \color{blue}{\frac{y}{z}}\right)\right) \]
          14. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{z}{z}\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
          15. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\color{blue}{y}}{z}\right)\right)\right) \]
          16. *-rgt-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot 1}{z}\right)\right)\right) \]
          17. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot \frac{z}{z}}{z}\right)\right)\right) \]
          18. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y \cdot z}{z}}{z}\right)\right)\right) \]
          19. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y}{z} \cdot z}{z}\right)\right)\right) \]
          20. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{z \cdot \frac{y}{z}}{z}\right)\right)\right) \]
          21. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(z \cdot \frac{y}{z}\right), \color{blue}{z}\right)\right)\right) \]
          22. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y}{z} \cdot z\right), z\right)\right)\right) \]
          23. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y \cdot z}{z}\right), z\right)\right)\right) \]
          24. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot \frac{z}{z}\right), z\right)\right)\right) \]
          25. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot 1\right), z\right)\right)\right) \]
          26. *-rgt-identity95.8%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right) \]
        3. Simplified95.8%

          \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y}{z}\right)} \]
        4. Add Preprocessing
        5. Add Preprocessing

        Alternative 6: 51.4% accurate, 7.0× speedup?

        \[\begin{array}{l} x\_m = \left|x\right| \\ x\_s = \mathsf{copysign}\left(1, x\right) \\ x\_s \cdot x\_m \end{array} \]
        x\_m = (fabs.f64 x)
        x\_s = (copysign.f64 #s(literal 1 binary64) x)
        (FPCore (x_s x_m y z) :precision binary64 (* x_s x_m))
        x\_m = fabs(x);
        x\_s = copysign(1.0, x);
        double code(double x_s, double x_m, double y, double z) {
        	return x_s * x_m;
        }
        
        x\_m = abs(x)
        x\_s = copysign(1.0d0, x)
        real(8) function code(x_s, x_m, y, z)
            real(8), intent (in) :: x_s
            real(8), intent (in) :: x_m
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            code = x_s * x_m
        end function
        
        x\_m = Math.abs(x);
        x\_s = Math.copySign(1.0, x);
        public static double code(double x_s, double x_m, double y, double z) {
        	return x_s * x_m;
        }
        
        x\_m = math.fabs(x)
        x\_s = math.copysign(1.0, x)
        def code(x_s, x_m, y, z):
        	return x_s * x_m
        
        x\_m = abs(x)
        x\_s = copysign(1.0, x)
        function code(x_s, x_m, y, z)
        	return Float64(x_s * x_m)
        end
        
        x\_m = abs(x);
        x\_s = sign(x) * abs(1.0);
        function tmp = code(x_s, x_m, y, z)
        	tmp = x_s * x_m;
        end
        
        x\_m = N[Abs[x], $MachinePrecision]
        x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * x$95$m), $MachinePrecision]
        
        \begin{array}{l}
        x\_m = \left|x\right|
        \\
        x\_s = \mathsf{copysign}\left(1, x\right)
        
        \\
        x\_s \cdot x\_m
        \end{array}
        
        Derivation
        1. Initial program 83.3%

          \[\frac{x \cdot \left(y + z\right)}{z} \]
        2. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x \cdot \color{blue}{\frac{y + z}{z}} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{y + z}{z}\right)}\right) \]
          3. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot \left(y + z\right)}{z}\right)\right) \]
          4. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot \left(y + z\right)}{z}\right)\right) \]
          5. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot \color{blue}{\left(y + z\right)}\right)\right) \]
          6. distribute-lft-inN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z}}{z} \cdot y + \color{blue}{\frac{\frac{z}{z}}{z} \cdot z}\right)\right) \]
          7. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{\frac{z}{z} \cdot y}{z} + \color{blue}{\frac{\frac{z}{z}}{z}} \cdot z\right)\right) \]
          8. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{1 \cdot y}{z} + \frac{\frac{\color{blue}{z}}{z}}{z} \cdot z\right)\right) \]
          9. *-lft-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{\color{blue}{\frac{z}{z}}}{z} \cdot z\right)\right) \]
          10. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{1}{z} \cdot z\right)\right) \]
          11. lft-mult-inverseN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + 1\right)\right) \]
          12. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{y}{z} + \frac{z}{\color{blue}{z}}\right)\right) \]
          13. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \left(\frac{z}{z} + \color{blue}{\frac{y}{z}}\right)\right) \]
          14. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\frac{z}{z}\right), \color{blue}{\left(\frac{y}{z}\right)}\right)\right) \]
          15. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\color{blue}{y}}{z}\right)\right)\right) \]
          16. *-rgt-identityN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot 1}{z}\right)\right)\right) \]
          17. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{y \cdot \frac{z}{z}}{z}\right)\right)\right) \]
          18. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y \cdot z}{z}}{z}\right)\right)\right) \]
          19. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\frac{y}{z} \cdot z}{z}\right)\right)\right) \]
          20. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{z \cdot \frac{y}{z}}{z}\right)\right)\right) \]
          21. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(z \cdot \frac{y}{z}\right), \color{blue}{z}\right)\right)\right) \]
          22. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y}{z} \cdot z\right), z\right)\right)\right) \]
          23. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{y \cdot z}{z}\right), z\right)\right)\right) \]
          24. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot \frac{z}{z}\right), z\right)\right)\right) \]
          25. *-inversesN/A

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(y \cdot 1\right), z\right)\right)\right) \]
          26. *-rgt-identity95.8%

            \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(y, z\right)\right)\right) \]
        3. Simplified95.8%

          \[\leadsto \color{blue}{x \cdot \left(1 + \frac{y}{z}\right)} \]
        4. Add Preprocessing
        5. Taylor expanded in y around 0

          \[\leadsto \color{blue}{x} \]
        6. Step-by-step derivation
          1. Simplified49.4%

            \[\leadsto \color{blue}{x} \]
          2. Add Preprocessing

          Developer Target 1: 96.0% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \frac{x}{\frac{z}{y + z}} \end{array} \]
          (FPCore (x y z) :precision binary64 (/ x (/ z (+ y z))))
          double code(double x, double y, double z) {
          	return x / (z / (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 = x / (z / (y + z))
          end function
          
          public static double code(double x, double y, double z) {
          	return x / (z / (y + z));
          }
          
          def code(x, y, z):
          	return x / (z / (y + z))
          
          function code(x, y, z)
          	return Float64(x / Float64(z / Float64(y + z)))
          end
          
          function tmp = code(x, y, z)
          	tmp = x / (z / (y + z));
          end
          
          code[x_, y_, z_] := N[(x / N[(z / N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \frac{x}{\frac{z}{y + z}}
          \end{array}
          

          Reproduce

          ?
          herbie shell --seed 2024161 
          (FPCore (x y z)
            :name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"
            :precision binary64
          
            :alt
            (! :herbie-platform default (/ x (/ z (+ y z))))
          
            (/ (* x (+ y z)) z))