Numeric.SpecFunctions:choose from math-functions-0.1.5.2

Percentage Accurate: 84.1% → 96.1%
Time: 5.9s
Alternatives: 5
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 5 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.1% accurate, 1.0× speedup?

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

\\
x \cdot \left(1 + \frac{y}{z}\right)
\end{array}
Derivation
  1. Initial program 81.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-identity96.6%

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

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

Alternative 2: 72.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+43}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -1.95e+43) (* y (/ x z)) (if (<= y 1.4e-28) x (/ y (/ z x)))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -1.95e+43) {
		tmp = y * (x / z);
	} else if (y <= 1.4e-28) {
		tmp = x;
	} else {
		tmp = y / (z / x);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (y <= (-1.95d+43)) then
        tmp = y * (x / z)
    else if (y <= 1.4d-28) then
        tmp = x
    else
        tmp = y / (z / x)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= -1.95e+43) {
		tmp = y * (x / z);
	} else if (y <= 1.4e-28) {
		tmp = x;
	} else {
		tmp = y / (z / x);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -1.95e+43:
		tmp = y * (x / z)
	elif y <= 1.4e-28:
		tmp = x
	else:
		tmp = y / (z / x)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -1.95e+43)
		tmp = Float64(y * Float64(x / z));
	elseif (y <= 1.4e-28)
		tmp = x;
	else
		tmp = Float64(y / Float64(z / x));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -1.95e+43)
		tmp = y * (x / z);
	elseif (y <= 1.4e-28)
		tmp = x;
	else
		tmp = y / (z / x);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -1.95e+43], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e-28], x, N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+43}:\\
\;\;\;\;y \cdot \frac{x}{z}\\

\mathbf{elif}\;y \leq 1.4 \cdot 10^{-28}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.95e43

    1. Initial program 92.2%

      \[\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-identity91.9%

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    6. Step-by-step derivation
      1. *-rgt-identityN/A

        \[\leadsto \frac{x \cdot y}{z \cdot \color{blue}{1}} \]
      2. rgt-mult-inverseN/A

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

        \[\leadsto \frac{x \cdot y}{z \cdot \frac{y \cdot 1}{\color{blue}{y}}} \]
      4. *-rgt-identityN/A

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

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

        \[\leadsto \frac{x \cdot y}{\frac{z}{y} \cdot \color{blue}{y}} \]
      7. *-commutativeN/A

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

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

        \[\leadsto \frac{x \cdot \frac{y}{y}}{\frac{\color{blue}{z}}{y}} \]
      10. *-rgt-identityN/A

        \[\leadsto \frac{x \cdot \frac{y \cdot 1}{y}}{\frac{z}{y}} \]
      11. associate-*r/N/A

        \[\leadsto \frac{x \cdot \left(y \cdot \frac{1}{y}\right)}{\frac{z}{y}} \]
      12. rgt-mult-inverseN/A

        \[\leadsto \frac{x \cdot 1}{\frac{z}{y}} \]
      13. *-rgt-identityN/A

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

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

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

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

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

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

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

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

    if -1.95e43 < y < 1.3999999999999999e-28

    1. Initial program 74.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-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. Simplified79.9%

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

      if 1.3999999999999999e-28 < y

      1. Initial program 85.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-identity94.7%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
      6. Step-by-step derivation
        1. *-rgt-identityN/A

          \[\leadsto \frac{x \cdot y}{z \cdot \color{blue}{1}} \]
        2. rgt-mult-inverseN/A

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

          \[\leadsto \frac{x \cdot y}{z \cdot \frac{y \cdot 1}{\color{blue}{y}}} \]
        4. *-rgt-identityN/A

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

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

          \[\leadsto \frac{x \cdot y}{\frac{z}{y} \cdot \color{blue}{y}} \]
        7. *-commutativeN/A

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

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

          \[\leadsto \frac{x \cdot \frac{y}{y}}{\frac{\color{blue}{z}}{y}} \]
        10. *-rgt-identityN/A

          \[\leadsto \frac{x \cdot \frac{y \cdot 1}{y}}{\frac{z}{y}} \]
        11. associate-*r/N/A

          \[\leadsto \frac{x \cdot \left(y \cdot \frac{1}{y}\right)}{\frac{z}{y}} \]
        12. rgt-mult-inverseN/A

          \[\leadsto \frac{x \cdot 1}{\frac{z}{y}} \]
        13. *-rgt-identityN/A

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

          \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(\frac{z}{y}\right)}\right) \]
        15. /-lowering-/.f6471.6%

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

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

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

          \[\leadsto y \cdot \color{blue}{\frac{x}{z}} \]
        3. clear-numN/A

          \[\leadsto y \cdot \frac{1}{\color{blue}{\frac{z}{x}}} \]
        4. un-div-invN/A

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

          \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(\frac{z}{x}\right)}\right) \]
        6. /-lowering-/.f6474.0%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{x}}} \]
    7. Recombined 3 regimes into one program.
    8. Final simplification78.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+43}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{z}{x}}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 72.7% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := y \cdot \frac{x}{z}\\ \mathbf{if}\;y \leq -3.6 \cdot 10^{+43}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (* y (/ x z)))) (if (<= y -3.6e+43) t_0 (if (<= y 4e-26) x t_0))))
    double code(double x, double y, double z) {
    	double t_0 = y * (x / z);
    	double tmp;
    	if (y <= -3.6e+43) {
    		tmp = t_0;
    	} else if (y <= 4e-26) {
    		tmp = x;
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: t_0
        real(8) :: tmp
        t_0 = y * (x / z)
        if (y <= (-3.6d+43)) then
            tmp = t_0
        else if (y <= 4d-26) then
            tmp = x
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = y * (x / z);
    	double tmp;
    	if (y <= -3.6e+43) {
    		tmp = t_0;
    	} else if (y <= 4e-26) {
    		tmp = x;
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = y * (x / z)
    	tmp = 0
    	if y <= -3.6e+43:
    		tmp = t_0
    	elif y <= 4e-26:
    		tmp = x
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(y * Float64(x / z))
    	tmp = 0.0
    	if (y <= -3.6e+43)
    		tmp = t_0;
    	elseif (y <= 4e-26)
    		tmp = x;
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = y * (x / z);
    	tmp = 0.0;
    	if (y <= -3.6e+43)
    		tmp = t_0;
    	elseif (y <= 4e-26)
    		tmp = x;
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.6e+43], t$95$0, If[LessEqual[y, 4e-26], x, t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := y \cdot \frac{x}{z}\\
    \mathbf{if}\;y \leq -3.6 \cdot 10^{+43}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;y \leq 4 \cdot 10^{-26}:\\
    \;\;\;\;x\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -3.6000000000000001e43 or 4.0000000000000002e-26 < y

      1. Initial program 88.4%

        \[\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-identity93.4%

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

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

        \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
      6. Step-by-step derivation
        1. *-rgt-identityN/A

          \[\leadsto \frac{x \cdot y}{z \cdot \color{blue}{1}} \]
        2. rgt-mult-inverseN/A

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

          \[\leadsto \frac{x \cdot y}{z \cdot \frac{y \cdot 1}{\color{blue}{y}}} \]
        4. *-rgt-identityN/A

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

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

          \[\leadsto \frac{x \cdot y}{\frac{z}{y} \cdot \color{blue}{y}} \]
        7. *-commutativeN/A

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

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

          \[\leadsto \frac{x \cdot \frac{y}{y}}{\frac{\color{blue}{z}}{y}} \]
        10. *-rgt-identityN/A

          \[\leadsto \frac{x \cdot \frac{y \cdot 1}{y}}{\frac{z}{y}} \]
        11. associate-*r/N/A

          \[\leadsto \frac{x \cdot \left(y \cdot \frac{1}{y}\right)}{\frac{z}{y}} \]
        12. rgt-mult-inverseN/A

          \[\leadsto \frac{x \cdot 1}{\frac{z}{y}} \]
        13. *-rgt-identityN/A

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

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

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

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

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

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

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

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

      if -3.6000000000000001e43 < y < 4.0000000000000002e-26

      1. Initial program 74.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-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. Simplified79.9%

          \[\leadsto \color{blue}{x} \]
      7. Recombined 2 regimes into one program.
      8. Final simplification78.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+43}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;y \leq 4 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 71.0% accurate, 0.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \frac{y}{z}\\ \mathbf{if}\;y \leq -3.5 \cdot 10^{-33}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (* x (/ y z))))
         (if (<= y -3.5e-33) t_0 (if (<= y 1.05e-26) x t_0))))
      double code(double x, double y, double z) {
      	double t_0 = x * (y / z);
      	double tmp;
      	if (y <= -3.5e-33) {
      		tmp = t_0;
      	} else if (y <= 1.05e-26) {
      		tmp = x;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: t_0
          real(8) :: tmp
          t_0 = x * (y / z)
          if (y <= (-3.5d-33)) then
              tmp = t_0
          else if (y <= 1.05d-26) then
              tmp = x
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double t_0 = x * (y / z);
      	double tmp;
      	if (y <= -3.5e-33) {
      		tmp = t_0;
      	} else if (y <= 1.05e-26) {
      		tmp = x;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = x * (y / z)
      	tmp = 0
      	if y <= -3.5e-33:
      		tmp = t_0
      	elif y <= 1.05e-26:
      		tmp = x
      	else:
      		tmp = t_0
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(x * Float64(y / z))
      	tmp = 0.0
      	if (y <= -3.5e-33)
      		tmp = t_0;
      	elseif (y <= 1.05e-26)
      		tmp = x;
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = x * (y / z);
      	tmp = 0.0;
      	if (y <= -3.5e-33)
      		tmp = t_0;
      	elseif (y <= 1.05e-26)
      		tmp = x;
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e-33], t$95$0, If[LessEqual[y, 1.05e-26], x, t$95$0]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := x \cdot \frac{y}{z}\\
      \mathbf{if}\;y \leq -3.5 \cdot 10^{-33}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;y \leq 1.05 \cdot 10^{-26}:\\
      \;\;\;\;x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -3.4999999999999999e-33 or 1.05000000000000004e-26 < y

        1. Initial program 88.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-identity93.9%

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

          \[\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-/.f6471.4%

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

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

        if -3.4999999999999999e-33 < y < 1.05000000000000004e-26

        1. Initial program 73.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-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. Simplified82.8%

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

        Alternative 5: 51.5% accurate, 7.0× speedup?

        \[\begin{array}{l} \\ x \end{array} \]
        (FPCore (x y z) :precision binary64 x)
        double code(double x, double y, double z) {
        	return x;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            code = x
        end function
        
        public static double code(double x, double y, double z) {
        	return x;
        }
        
        def code(x, y, z):
        	return x
        
        function code(x, y, z)
        	return x
        end
        
        function tmp = code(x, y, z)
        	tmp = x;
        end
        
        code[x_, y_, z_] := x
        
        \begin{array}{l}
        
        \\
        x
        \end{array}
        
        Derivation
        1. Initial program 81.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-identity96.6%

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

          \[\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. Simplified50.2%

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

          Developer Target 1: 96.4% 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 2024138 
          (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))