Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, A

Percentage Accurate: 88.6% → 98.7%
Time: 8.0s
Alternatives: 10
Speedup: 0.3×

Specification

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

\\
\frac{x + y}{1 - \frac{y}{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 10 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: 88.6% accurate, 1.0× speedup?

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

\\
\frac{x + y}{1 - \frac{y}{z}}
\end{array}

Alternative 1: 98.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x + y}{1 - \frac{y}{z}}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-292} \lor \neg \left(t\_0 \leq 2 \cdot 10^{-214}\right):\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-z\right) \cdot x}{y} - z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (/ (+ x y) (- 1.0 (/ y z)))))
   (if (or (<= t_0 -5e-292) (not (<= t_0 2e-214)))
     t_0
     (- (/ (* (- z) x) y) z))))
double code(double x, double y, double z) {
	double t_0 = (x + y) / (1.0 - (y / z));
	double tmp;
	if ((t_0 <= -5e-292) || !(t_0 <= 2e-214)) {
		tmp = t_0;
	} else {
		tmp = ((-z * x) / y) - z;
	}
	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) / (1.0d0 - (y / z))
    if ((t_0 <= (-5d-292)) .or. (.not. (t_0 <= 2d-214))) then
        tmp = t_0
    else
        tmp = ((-z * x) / y) - z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x + y) / (1.0 - (y / z));
	double tmp;
	if ((t_0 <= -5e-292) || !(t_0 <= 2e-214)) {
		tmp = t_0;
	} else {
		tmp = ((-z * x) / y) - z;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + y) / (1.0 - (y / z))
	tmp = 0
	if (t_0 <= -5e-292) or not (t_0 <= 2e-214):
		tmp = t_0
	else:
		tmp = ((-z * x) / y) - z
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x + y) / Float64(1.0 - Float64(y / z)))
	tmp = 0.0
	if ((t_0 <= -5e-292) || !(t_0 <= 2e-214))
		tmp = t_0;
	else
		tmp = Float64(Float64(Float64(Float64(-z) * x) / y) - z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x + y) / (1.0 - (y / z));
	tmp = 0.0;
	if ((t_0 <= -5e-292) || ~((t_0 <= 2e-214)))
		tmp = t_0;
	else
		tmp = ((-z * x) / y) - z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + y), $MachinePrecision] / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -5e-292], N[Not[LessEqual[t$95$0, 2e-214]], $MachinePrecision]], t$95$0, N[(N[(N[((-z) * x), $MachinePrecision] / y), $MachinePrecision] - z), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{x + y}{1 - \frac{y}{z}}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-292} \lor \neg \left(t\_0 \leq 2 \cdot 10^{-214}\right):\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 x y) (-.f64 #s(literal 1 binary64) (/.f64 y z))) < -4.99999999999999981e-292 or 1.99999999999999983e-214 < (/.f64 (+.f64 x y) (-.f64 #s(literal 1 binary64) (/.f64 y z)))

    1. Initial program 99.9%

      \[\frac{x + y}{1 - \frac{y}{z}} \]
    2. Add Preprocessing

    if -4.99999999999999981e-292 < (/.f64 (+.f64 x y) (-.f64 #s(literal 1 binary64) (/.f64 y z))) < 1.99999999999999983e-214

    1. Initial program 23.4%

      \[\frac{x + y}{1 - \frac{y}{z}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + y}{1 - \frac{y}{z}}} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\color{blue}{x + y}}{1 - \frac{y}{z}} \]
      3. flip-+N/A

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

        \[\leadsto \color{blue}{\frac{x \cdot x - y \cdot y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
      5. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y + x\right) \cdot \frac{x - y}{\color{blue}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
      15. lower--.f6423.2

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

      \[\leadsto \color{blue}{\left(y + x\right) \cdot \frac{x - y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

        \[\leadsto \left(y + x\right) \cdot \frac{\color{blue}{1}}{1 - \frac{y}{z}} \]
      5. lift-/.f6423.3

        \[\leadsto \left(y + x\right) \cdot \color{blue}{\frac{1}{1 - \frac{y}{z}}} \]
    6. Applied rewrites23.3%

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

      \[\leadsto \color{blue}{\left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) - \frac{{z}^{2}}{y}} \]
    8. Step-by-step derivation
      1. fp-cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(-1 \cdot z - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{x \cdot z}{y}\right)} - \frac{{z}^{2}}{y} \]
      2. metadata-evalN/A

        \[\leadsto \left(-1 \cdot z - \color{blue}{1} \cdot \frac{x \cdot z}{y}\right) - \frac{{z}^{2}}{y} \]
      3. *-lft-identityN/A

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

        \[\leadsto \color{blue}{-1 \cdot z - \left(\frac{x \cdot z}{y} + \frac{{z}^{2}}{y}\right)} \]
      5. *-lft-identityN/A

        \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} + \frac{\color{blue}{1 \cdot {z}^{2}}}{y}\right) \]
      6. metadata-evalN/A

        \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} + \frac{\color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot {z}^{2}}{y}\right) \]
      7. div-addN/A

        \[\leadsto -1 \cdot z - \color{blue}{\frac{x \cdot z + \left(\mathsf{neg}\left(-1\right)\right) \cdot {z}^{2}}{y}} \]
      8. fp-cancel-sub-sign-invN/A

        \[\leadsto -1 \cdot z - \frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y} \]
      9. *-lft-identityN/A

        \[\leadsto -1 \cdot z - \color{blue}{1 \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y}} \]
      10. metadata-evalN/A

        \[\leadsto -1 \cdot z - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y} \]
      11. fp-cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{-1 \cdot z + -1 \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y}} \]
      12. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y} + -1 \cdot z} \]
      13. fp-cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y} - \left(\mathsf{neg}\left(-1\right)\right) \cdot z} \]
    9. Applied rewrites100.0%

      \[\leadsto \color{blue}{\frac{z \cdot \left(\left(-x\right) - z\right)}{y} - z} \]
    10. Taylor expanded in x around inf

      \[\leadsto \frac{-1 \cdot \left(x \cdot z\right)}{y} - z \]
    11. Step-by-step derivation
      1. Applied rewrites100.0%

        \[\leadsto \frac{\left(-z\right) \cdot x}{y} - z \]
    12. Recombined 2 regimes into one program.
    13. Final simplification99.9%

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

    Alternative 2: 74.7% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{-34} \lor \neg \left(y \leq 2.25 \cdot 10^{-5}\right):\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y + x, \frac{y}{z}, y\right) + x\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (or (<= y -1.4e-34) (not (<= y 2.25e-5)))
       (* z (- -1.0 (/ x y)))
       (+ (fma (+ y x) (/ y z) y) x)))
    double code(double x, double y, double z) {
    	double tmp;
    	if ((y <= -1.4e-34) || !(y <= 2.25e-5)) {
    		tmp = z * (-1.0 - (x / y));
    	} else {
    		tmp = fma((y + x), (y / z), y) + x;
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	tmp = 0.0
    	if ((y <= -1.4e-34) || !(y <= 2.25e-5))
    		tmp = Float64(z * Float64(-1.0 - Float64(x / y)));
    	else
    		tmp = Float64(fma(Float64(y + x), Float64(y / z), y) + x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := If[Or[LessEqual[y, -1.4e-34], N[Not[LessEqual[y, 2.25e-5]], $MachinePrecision]], N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y + x), $MachinePrecision] * N[(y / z), $MachinePrecision] + y), $MachinePrecision] + x), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -1.4 \cdot 10^{-34} \lor \neg \left(y \leq 2.25 \cdot 10^{-5}\right):\\
    \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(y + x, \frac{y}{z}, y\right) + x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -1.39999999999999998e-34 or 2.25000000000000014e-5 < y

      1. Initial program 81.8%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(x + y\right)}{y}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

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

          \[\leadsto \mathsf{neg}\left(\color{blue}{z \cdot \frac{x + y}{y}}\right) \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\frac{x + y}{y}\right)\right)} \]
        4. div-addN/A

          \[\leadsto z \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\frac{x}{y} + \frac{y}{y}\right)}\right)\right) \]
        5. distribute-neg-inN/A

          \[\leadsto z \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\frac{x}{y}\right)\right) + \left(\mathsf{neg}\left(\frac{y}{y}\right)\right)\right)} \]
        6. mul-1-negN/A

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

          \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right)\right) \]
        8. metadata-evalN/A

          \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y} + \color{blue}{-1}\right) \]
        9. distribute-lft-inN/A

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

          \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y}\right) + \color{blue}{-1 \cdot z} \]
        11. mul-1-negN/A

          \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y}\right)\right)} + -1 \cdot z \]
        12. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{x \cdot z}}{y}\right)\right) + -1 \cdot z \]
        15. mul-1-negN/A

          \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{y}} + -1 \cdot z \]
        16. +-commutativeN/A

          \[\leadsto \color{blue}{-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}} \]
        17. fp-cancel-sign-sub-invN/A

          \[\leadsto \color{blue}{-1 \cdot z - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{x \cdot z}{y}} \]
        18. metadata-evalN/A

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

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

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

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

          \[\leadsto z \cdot -1 - \color{blue}{z \cdot \frac{x}{y}} \]
      5. Applied rewrites74.0%

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

      if -1.39999999999999998e-34 < y < 2.25000000000000014e-5

      1. Initial program 99.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + \left(y + \frac{y \cdot \left(x + y\right)}{z}\right)} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\left(y + \frac{y \cdot \left(x + y\right)}{z}\right) + x} \]
        2. lower-+.f64N/A

          \[\leadsto \color{blue}{\left(y + \frac{y \cdot \left(x + y\right)}{z}\right) + x} \]
        3. +-commutativeN/A

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

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

          \[\leadsto \left(\color{blue}{\left(x + y\right) \cdot \frac{y}{z}} + y\right) + x \]
        6. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{y + x}, \frac{y}{z}, y\right) + x \]
        8. lower-+.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{y + x}, \frac{y}{z}, y\right) + x \]
        9. lower-/.f6479.0

          \[\leadsto \mathsf{fma}\left(y + x, \color{blue}{\frac{y}{z}}, y\right) + x \]
      5. Applied rewrites79.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y + x, \frac{y}{z}, y\right) + x} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification76.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{-34} \lor \neg \left(y \leq 2.25 \cdot 10^{-5}\right):\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y + x, \frac{y}{z}, y\right) + x\\ \end{array} \]
    5. Add Preprocessing

    Alternative 3: 74.7% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{-34} \lor \neg \left(y \leq 2.25 \cdot 10^{-5}\right):\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) \cdot \left(\frac{y}{z} + 1\right)\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (or (<= y -1.4e-34) (not (<= y 2.25e-5)))
       (* z (- -1.0 (/ x y)))
       (* (+ y x) (+ (/ y z) 1.0))))
    double code(double x, double y, double z) {
    	double tmp;
    	if ((y <= -1.4e-34) || !(y <= 2.25e-5)) {
    		tmp = z * (-1.0 - (x / y));
    	} else {
    		tmp = (y + x) * ((y / z) + 1.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) :: tmp
        if ((y <= (-1.4d-34)) .or. (.not. (y <= 2.25d-5))) then
            tmp = z * ((-1.0d0) - (x / y))
        else
            tmp = (y + x) * ((y / z) + 1.0d0)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double tmp;
    	if ((y <= -1.4e-34) || !(y <= 2.25e-5)) {
    		tmp = z * (-1.0 - (x / y));
    	} else {
    		tmp = (y + x) * ((y / z) + 1.0);
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	tmp = 0
    	if (y <= -1.4e-34) or not (y <= 2.25e-5):
    		tmp = z * (-1.0 - (x / y))
    	else:
    		tmp = (y + x) * ((y / z) + 1.0)
    	return tmp
    
    function code(x, y, z)
    	tmp = 0.0
    	if ((y <= -1.4e-34) || !(y <= 2.25e-5))
    		tmp = Float64(z * Float64(-1.0 - Float64(x / y)));
    	else
    		tmp = Float64(Float64(y + x) * Float64(Float64(y / z) + 1.0));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if ((y <= -1.4e-34) || ~((y <= 2.25e-5)))
    		tmp = z * (-1.0 - (x / y));
    	else
    		tmp = (y + x) * ((y / z) + 1.0);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := If[Or[LessEqual[y, -1.4e-34], N[Not[LessEqual[y, 2.25e-5]], $MachinePrecision]], N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] * N[(N[(y / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -1.4 \cdot 10^{-34} \lor \neg \left(y \leq 2.25 \cdot 10^{-5}\right):\\
    \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(y + x\right) \cdot \left(\frac{y}{z} + 1\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -1.39999999999999998e-34 or 2.25000000000000014e-5 < y

      1. Initial program 81.8%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(x + y\right)}{y}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

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

          \[\leadsto \mathsf{neg}\left(\color{blue}{z \cdot \frac{x + y}{y}}\right) \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\frac{x + y}{y}\right)\right)} \]
        4. div-addN/A

          \[\leadsto z \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\frac{x}{y} + \frac{y}{y}\right)}\right)\right) \]
        5. distribute-neg-inN/A

          \[\leadsto z \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\frac{x}{y}\right)\right) + \left(\mathsf{neg}\left(\frac{y}{y}\right)\right)\right)} \]
        6. mul-1-negN/A

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

          \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right)\right) \]
        8. metadata-evalN/A

          \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y} + \color{blue}{-1}\right) \]
        9. distribute-lft-inN/A

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

          \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y}\right) + \color{blue}{-1 \cdot z} \]
        11. mul-1-negN/A

          \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y}\right)\right)} + -1 \cdot z \]
        12. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{x \cdot z}}{y}\right)\right) + -1 \cdot z \]
        15. mul-1-negN/A

          \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{y}} + -1 \cdot z \]
        16. +-commutativeN/A

          \[\leadsto \color{blue}{-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}} \]
        17. fp-cancel-sign-sub-invN/A

          \[\leadsto \color{blue}{-1 \cdot z - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{x \cdot z}{y}} \]
        18. metadata-evalN/A

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

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

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

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

          \[\leadsto z \cdot -1 - \color{blue}{z \cdot \frac{x}{y}} \]
      5. Applied rewrites74.0%

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

      if -1.39999999999999998e-34 < y < 2.25000000000000014e-5

      1. Initial program 99.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{x + y}{1 - \frac{y}{z}}} \]
        2. lift-+.f64N/A

          \[\leadsto \frac{\color{blue}{x + y}}{1 - \frac{y}{z}} \]
        3. flip-+N/A

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

          \[\leadsto \color{blue}{\frac{x \cdot x - y \cdot y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
        5. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(y + x\right) \cdot \frac{x - y}{\color{blue}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
        15. lower--.f6497.3

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

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

        \[\leadsto \left(y + x\right) \cdot \color{blue}{\left(1 + \frac{y}{z}\right)} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

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

          \[\leadsto \left(y + x\right) \cdot \color{blue}{\left(\frac{y}{z} + 1\right)} \]
        3. lower-/.f6479.0

          \[\leadsto \left(y + x\right) \cdot \left(\color{blue}{\frac{y}{z}} + 1\right) \]
      7. Applied rewrites79.0%

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

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

    Alternative 4: 74.7% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{-34} \lor \neg \left(y \leq 2.25 \cdot 10^{-5}\right):\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{y}{z}, y + x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (or (<= y -1.4e-34) (not (<= y 2.25e-5)))
       (* z (- -1.0 (/ x y)))
       (fma x (/ y z) (+ y x))))
    double code(double x, double y, double z) {
    	double tmp;
    	if ((y <= -1.4e-34) || !(y <= 2.25e-5)) {
    		tmp = z * (-1.0 - (x / y));
    	} else {
    		tmp = fma(x, (y / z), (y + x));
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	tmp = 0.0
    	if ((y <= -1.4e-34) || !(y <= 2.25e-5))
    		tmp = Float64(z * Float64(-1.0 - Float64(x / y)));
    	else
    		tmp = fma(x, Float64(y / z), Float64(y + x));
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := If[Or[LessEqual[y, -1.4e-34], N[Not[LessEqual[y, 2.25e-5]], $MachinePrecision]], N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -1.4 \cdot 10^{-34} \lor \neg \left(y \leq 2.25 \cdot 10^{-5}\right):\\
    \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(x, \frac{y}{z}, y + x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -1.39999999999999998e-34 or 2.25000000000000014e-5 < y

      1. Initial program 81.8%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in z around 0

        \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(x + y\right)}{y}} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

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

          \[\leadsto \mathsf{neg}\left(\color{blue}{z \cdot \frac{x + y}{y}}\right) \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\frac{x + y}{y}\right)\right)} \]
        4. div-addN/A

          \[\leadsto z \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\frac{x}{y} + \frac{y}{y}\right)}\right)\right) \]
        5. distribute-neg-inN/A

          \[\leadsto z \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\frac{x}{y}\right)\right) + \left(\mathsf{neg}\left(\frac{y}{y}\right)\right)\right)} \]
        6. mul-1-negN/A

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

          \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right)\right) \]
        8. metadata-evalN/A

          \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y} + \color{blue}{-1}\right) \]
        9. distribute-lft-inN/A

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

          \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y}\right) + \color{blue}{-1 \cdot z} \]
        11. mul-1-negN/A

          \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y}\right)\right)} + -1 \cdot z \]
        12. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{x \cdot z}}{y}\right)\right) + -1 \cdot z \]
        15. mul-1-negN/A

          \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{y}} + -1 \cdot z \]
        16. +-commutativeN/A

          \[\leadsto \color{blue}{-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}} \]
        17. fp-cancel-sign-sub-invN/A

          \[\leadsto \color{blue}{-1 \cdot z - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{x \cdot z}{y}} \]
        18. metadata-evalN/A

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

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

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

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

          \[\leadsto z \cdot -1 - \color{blue}{z \cdot \frac{x}{y}} \]
      5. Applied rewrites74.0%

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

      if -1.39999999999999998e-34 < y < 2.25000000000000014e-5

      1. Initial program 99.9%

        \[\frac{x + y}{1 - \frac{y}{z}} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

        \[\leadsto \color{blue}{x + y \cdot \left(1 - -1 \cdot \frac{x}{z}\right)} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{y \cdot \left(1 - -1 \cdot \frac{x}{z}\right) + x} \]
        2. fp-cancel-sub-sign-invN/A

          \[\leadsto y \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{x}{z}\right)} + x \]
        3. distribute-rgt-inN/A

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

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

          \[\leadsto \color{blue}{y + \left(\left(\left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{x}{z}\right) \cdot y + x\right)} \]
        6. lower-+.f64N/A

          \[\leadsto \color{blue}{y + \left(\left(\left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{x}{z}\right) \cdot y + x\right)} \]
        7. lower-fma.f64N/A

          \[\leadsto y + \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{x}{z}, y, x\right)} \]
        8. metadata-evalN/A

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

          \[\leadsto y + \mathsf{fma}\left(\color{blue}{\frac{x}{z}}, y, x\right) \]
        10. lower-/.f6474.7

          \[\leadsto y + \mathsf{fma}\left(\color{blue}{\frac{x}{z}}, y, x\right) \]
      5. Applied rewrites74.7%

        \[\leadsto \color{blue}{y + \mathsf{fma}\left(\frac{x}{z}, y, x\right)} \]
      6. Step-by-step derivation
        1. Applied rewrites78.9%

          \[\leadsto \mathsf{fma}\left(x, \color{blue}{\frac{y}{z}}, y + x\right) \]
      7. Recombined 2 regimes into one program.
      8. Final simplification76.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{-34} \lor \neg \left(y \leq 2.25 \cdot 10^{-5}\right):\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{y}{z}, y + x\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 5: 74.6% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-34} \lor \neg \left(y \leq 230\right):\\ \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) \cdot 1\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (if (or (<= y -1.7e-34) (not (<= y 230.0)))
         (* z (- -1.0 (/ x y)))
         (* (+ y x) 1.0)))
      double code(double x, double y, double z) {
      	double tmp;
      	if ((y <= -1.7e-34) || !(y <= 230.0)) {
      		tmp = z * (-1.0 - (x / y));
      	} else {
      		tmp = (y + x) * 1.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) :: tmp
          if ((y <= (-1.7d-34)) .or. (.not. (y <= 230.0d0))) then
              tmp = z * ((-1.0d0) - (x / y))
          else
              tmp = (y + x) * 1.0d0
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double tmp;
      	if ((y <= -1.7e-34) || !(y <= 230.0)) {
      		tmp = z * (-1.0 - (x / y));
      	} else {
      		tmp = (y + x) * 1.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	tmp = 0
      	if (y <= -1.7e-34) or not (y <= 230.0):
      		tmp = z * (-1.0 - (x / y))
      	else:
      		tmp = (y + x) * 1.0
      	return tmp
      
      function code(x, y, z)
      	tmp = 0.0
      	if ((y <= -1.7e-34) || !(y <= 230.0))
      		tmp = Float64(z * Float64(-1.0 - Float64(x / y)));
      	else
      		tmp = Float64(Float64(y + x) * 1.0);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	tmp = 0.0;
      	if ((y <= -1.7e-34) || ~((y <= 230.0)))
      		tmp = z * (-1.0 - (x / y));
      	else
      		tmp = (y + x) * 1.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := If[Or[LessEqual[y, -1.7e-34], N[Not[LessEqual[y, 230.0]], $MachinePrecision]], N[(z * N[(-1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] * 1.0), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -1.7 \cdot 10^{-34} \lor \neg \left(y \leq 230\right):\\
      \;\;\;\;z \cdot \left(-1 - \frac{x}{y}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(y + x\right) \cdot 1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -1.7e-34 or 230 < y

        1. Initial program 81.5%

          \[\frac{x + y}{1 - \frac{y}{z}} \]
        2. Add Preprocessing
        3. Taylor expanded in z around 0

          \[\leadsto \color{blue}{-1 \cdot \frac{z \cdot \left(x + y\right)}{y}} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

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

            \[\leadsto \mathsf{neg}\left(\color{blue}{z \cdot \frac{x + y}{y}}\right) \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto \color{blue}{z \cdot \left(\mathsf{neg}\left(\frac{x + y}{y}\right)\right)} \]
          4. div-addN/A

            \[\leadsto z \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\frac{x}{y} + \frac{y}{y}\right)}\right)\right) \]
          5. distribute-neg-inN/A

            \[\leadsto z \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\frac{x}{y}\right)\right) + \left(\mathsf{neg}\left(\frac{y}{y}\right)\right)\right)} \]
          6. mul-1-negN/A

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

            \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y} + \left(\mathsf{neg}\left(\color{blue}{1}\right)\right)\right) \]
          8. metadata-evalN/A

            \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y} + \color{blue}{-1}\right) \]
          9. distribute-lft-inN/A

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

            \[\leadsto z \cdot \left(-1 \cdot \frac{x}{y}\right) + \color{blue}{-1 \cdot z} \]
          11. mul-1-negN/A

            \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{x}{y}\right)\right)} + -1 \cdot z \]
          12. distribute-rgt-neg-inN/A

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

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

            \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{x \cdot z}}{y}\right)\right) + -1 \cdot z \]
          15. mul-1-negN/A

            \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{y}} + -1 \cdot z \]
          16. +-commutativeN/A

            \[\leadsto \color{blue}{-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}} \]
          17. fp-cancel-sign-sub-invN/A

            \[\leadsto \color{blue}{-1 \cdot z - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{x \cdot z}{y}} \]
          18. metadata-evalN/A

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

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

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

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

            \[\leadsto z \cdot -1 - \color{blue}{z \cdot \frac{x}{y}} \]
        5. Applied rewrites74.4%

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

        if -1.7e-34 < y < 230

        1. Initial program 99.9%

          \[\frac{x + y}{1 - \frac{y}{z}} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\frac{x + y}{1 - \frac{y}{z}}} \]
          2. lift-+.f64N/A

            \[\leadsto \frac{\color{blue}{x + y}}{1 - \frac{y}{z}} \]
          3. flip-+N/A

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

            \[\leadsto \color{blue}{\frac{x \cdot x - y \cdot y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
          5. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(y + x\right) \cdot \frac{x - y}{\color{blue}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
          15. lower--.f6496.5

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

          \[\leadsto \color{blue}{\left(y + x\right) \cdot \frac{x - y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

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

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

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

            \[\leadsto \left(y + x\right) \cdot \frac{\color{blue}{1}}{1 - \frac{y}{z}} \]
          5. lift-/.f6499.9

            \[\leadsto \left(y + x\right) \cdot \color{blue}{\frac{1}{1 - \frac{y}{z}}} \]
        6. Applied rewrites99.9%

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

          \[\leadsto \left(y + x\right) \cdot \color{blue}{1} \]
        8. Step-by-step derivation
          1. Applied rewrites77.7%

            \[\leadsto \left(y + x\right) \cdot \color{blue}{1} \]
        9. Recombined 2 regimes into one program.
        10. Final simplification75.9%

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

        Alternative 6: 72.8% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-34} \lor \neg \left(y \leq 230\right):\\ \;\;\;\;-\mathsf{fma}\left(\frac{z}{y}, x, z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) \cdot 1\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (or (<= y -1.7e-34) (not (<= y 230.0)))
           (- (fma (/ z y) x z))
           (* (+ y x) 1.0)))
        double code(double x, double y, double z) {
        	double tmp;
        	if ((y <= -1.7e-34) || !(y <= 230.0)) {
        		tmp = -fma((z / y), x, z);
        	} else {
        		tmp = (y + x) * 1.0;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if ((y <= -1.7e-34) || !(y <= 230.0))
        		tmp = Float64(-fma(Float64(z / y), x, z));
        	else
        		tmp = Float64(Float64(y + x) * 1.0);
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[Or[LessEqual[y, -1.7e-34], N[Not[LessEqual[y, 230.0]], $MachinePrecision]], (-N[(N[(z / y), $MachinePrecision] * x + z), $MachinePrecision]), N[(N[(y + x), $MachinePrecision] * 1.0), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -1.7 \cdot 10^{-34} \lor \neg \left(y \leq 230\right):\\
        \;\;\;\;-\mathsf{fma}\left(\frac{z}{y}, x, z\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(y + x\right) \cdot 1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -1.7e-34 or 230 < y

          1. Initial program 81.5%

            \[\frac{x + y}{1 - \frac{y}{z}} \]
          2. Add Preprocessing
          3. Taylor expanded in x around -inf

            \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{y}{x \cdot \left(1 - \frac{y}{z}\right)} - \frac{1}{1 - \frac{y}{z}}\right)\right)} \]
          4. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(x \cdot \left(-1 \cdot \frac{y}{x \cdot \left(1 - \frac{y}{z}\right)} - \frac{1}{1 - \frac{y}{z}}\right)\right)} \]
            2. distribute-lft-neg-inN/A

              \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \left(-1 \cdot \frac{y}{x \cdot \left(1 - \frac{y}{z}\right)} - \frac{1}{1 - \frac{y}{z}}\right)} \]
            3. lower-*.f64N/A

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

              \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-1 \cdot \frac{y}{x \cdot \left(1 - \frac{y}{z}\right)} - \frac{1}{1 - \frac{y}{z}}\right) \]
            5. lower--.f64N/A

              \[\leadsto \left(-x\right) \cdot \color{blue}{\left(-1 \cdot \frac{y}{x \cdot \left(1 - \frac{y}{z}\right)} - \frac{1}{1 - \frac{y}{z}}\right)} \]
          5. Applied rewrites71.9%

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

            \[\leadsto \left(-x\right) \cdot -1 \]
          7. Step-by-step derivation
            1. Applied rewrites11.3%

              \[\leadsto \left(-x\right) \cdot -1 \]
            2. Taylor expanded in z around 0

              \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \left(z \cdot \left(\frac{1}{x} + \frac{1}{y}\right)\right)\right)} \]
            3. Step-by-step derivation
              1. Applied rewrites72.4%

                \[\leadsto -\mathsf{fma}\left(\frac{z}{y}, x, z\right) \]

              if -1.7e-34 < y < 230

              1. Initial program 99.9%

                \[\frac{x + y}{1 - \frac{y}{z}} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\frac{x + y}{1 - \frac{y}{z}}} \]
                2. lift-+.f64N/A

                  \[\leadsto \frac{\color{blue}{x + y}}{1 - \frac{y}{z}} \]
                3. flip-+N/A

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

                  \[\leadsto \color{blue}{\frac{x \cdot x - y \cdot y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                5. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(y + x\right) \cdot \frac{x - y}{\color{blue}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                15. lower--.f6496.5

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

                \[\leadsto \color{blue}{\left(y + x\right) \cdot \frac{x - y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
              5. Step-by-step derivation
                1. lift-/.f64N/A

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

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

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

                  \[\leadsto \left(y + x\right) \cdot \frac{\color{blue}{1}}{1 - \frac{y}{z}} \]
                5. lift-/.f6499.9

                  \[\leadsto \left(y + x\right) \cdot \color{blue}{\frac{1}{1 - \frac{y}{z}}} \]
              6. Applied rewrites99.9%

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

                \[\leadsto \left(y + x\right) \cdot \color{blue}{1} \]
              8. Step-by-step derivation
                1. Applied rewrites77.7%

                  \[\leadsto \left(y + x\right) \cdot \color{blue}{1} \]
              9. Recombined 2 regimes into one program.
              10. Final simplification74.9%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{-34} \lor \neg \left(y \leq 230\right):\\ \;\;\;\;-\mathsf{fma}\left(\frac{z}{y}, x, z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) \cdot 1\\ \end{array} \]
              11. Add Preprocessing

              Alternative 7: 67.5% accurate, 1.1× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{+24}:\\ \;\;\;\;-\mathsf{fma}\left(\frac{z}{y}, z, z\right)\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+108}:\\ \;\;\;\;\left(y + x\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \end{array} \]
              (FPCore (x y z)
               :precision binary64
               (if (<= y -6.6e+24)
                 (- (fma (/ z y) z z))
                 (if (<= y 3.2e+108) (* (+ y x) 1.0) (- z))))
              double code(double x, double y, double z) {
              	double tmp;
              	if (y <= -6.6e+24) {
              		tmp = -fma((z / y), z, z);
              	} else if (y <= 3.2e+108) {
              		tmp = (y + x) * 1.0;
              	} else {
              		tmp = -z;
              	}
              	return tmp;
              }
              
              function code(x, y, z)
              	tmp = 0.0
              	if (y <= -6.6e+24)
              		tmp = Float64(-fma(Float64(z / y), z, z));
              	elseif (y <= 3.2e+108)
              		tmp = Float64(Float64(y + x) * 1.0);
              	else
              		tmp = Float64(-z);
              	end
              	return tmp
              end
              
              code[x_, y_, z_] := If[LessEqual[y, -6.6e+24], (-N[(N[(z / y), $MachinePrecision] * z + z), $MachinePrecision]), If[LessEqual[y, 3.2e+108], N[(N[(y + x), $MachinePrecision] * 1.0), $MachinePrecision], (-z)]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;y \leq -6.6 \cdot 10^{+24}:\\
              \;\;\;\;-\mathsf{fma}\left(\frac{z}{y}, z, z\right)\\
              
              \mathbf{elif}\;y \leq 3.2 \cdot 10^{+108}:\\
              \;\;\;\;\left(y + x\right) \cdot 1\\
              
              \mathbf{else}:\\
              \;\;\;\;-z\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if y < -6.5999999999999998e24

                1. Initial program 79.6%

                  \[\frac{x + y}{1 - \frac{y}{z}} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \color{blue}{\frac{x + y}{1 - \frac{y}{z}}} \]
                  2. lift-+.f64N/A

                    \[\leadsto \frac{\color{blue}{x + y}}{1 - \frac{y}{z}} \]
                  3. flip-+N/A

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

                    \[\leadsto \color{blue}{\frac{x \cdot x - y \cdot y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                  5. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(y + x\right) \cdot \frac{x - y}{\color{blue}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                  15. lower--.f6456.8

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

                  \[\leadsto \color{blue}{\left(y + x\right) \cdot \frac{x - y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

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

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

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

                    \[\leadsto \left(y + x\right) \cdot \frac{\color{blue}{1}}{1 - \frac{y}{z}} \]
                  5. lift-/.f6479.5

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

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

                  \[\leadsto \color{blue}{\left(-1 \cdot z + -1 \cdot \frac{x \cdot z}{y}\right) - \frac{{z}^{2}}{y}} \]
                8. Step-by-step derivation
                  1. fp-cancel-sign-sub-invN/A

                    \[\leadsto \color{blue}{\left(-1 \cdot z - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{x \cdot z}{y}\right)} - \frac{{z}^{2}}{y} \]
                  2. metadata-evalN/A

                    \[\leadsto \left(-1 \cdot z - \color{blue}{1} \cdot \frac{x \cdot z}{y}\right) - \frac{{z}^{2}}{y} \]
                  3. *-lft-identityN/A

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

                    \[\leadsto \color{blue}{-1 \cdot z - \left(\frac{x \cdot z}{y} + \frac{{z}^{2}}{y}\right)} \]
                  5. *-lft-identityN/A

                    \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} + \frac{\color{blue}{1 \cdot {z}^{2}}}{y}\right) \]
                  6. metadata-evalN/A

                    \[\leadsto -1 \cdot z - \left(\frac{x \cdot z}{y} + \frac{\color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot {z}^{2}}{y}\right) \]
                  7. div-addN/A

                    \[\leadsto -1 \cdot z - \color{blue}{\frac{x \cdot z + \left(\mathsf{neg}\left(-1\right)\right) \cdot {z}^{2}}{y}} \]
                  8. fp-cancel-sub-sign-invN/A

                    \[\leadsto -1 \cdot z - \frac{\color{blue}{x \cdot z - -1 \cdot {z}^{2}}}{y} \]
                  9. *-lft-identityN/A

                    \[\leadsto -1 \cdot z - \color{blue}{1 \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y}} \]
                  10. metadata-evalN/A

                    \[\leadsto -1 \cdot z - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y} \]
                  11. fp-cancel-sign-sub-invN/A

                    \[\leadsto \color{blue}{-1 \cdot z + -1 \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y}} \]
                  12. +-commutativeN/A

                    \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y} + -1 \cdot z} \]
                  13. fp-cancel-sign-sub-invN/A

                    \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z - -1 \cdot {z}^{2}}{y} - \left(\mathsf{neg}\left(-1\right)\right) \cdot z} \]
                9. Applied rewrites72.8%

                  \[\leadsto \color{blue}{\frac{z \cdot \left(\left(-x\right) - z\right)}{y} - z} \]
                10. Taylor expanded in x around 0

                  \[\leadsto -1 \cdot \frac{{z}^{2}}{y} - \color{blue}{z} \]
                11. Applied rewrites65.0%

                  \[\leadsto -\mathsf{fma}\left(\frac{z}{y}, z, z\right) \]

                if -6.5999999999999998e24 < y < 3.1999999999999999e108

                1. Initial program 98.7%

                  \[\frac{x + y}{1 - \frac{y}{z}} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \color{blue}{\frac{x + y}{1 - \frac{y}{z}}} \]
                  2. lift-+.f64N/A

                    \[\leadsto \frac{\color{blue}{x + y}}{1 - \frac{y}{z}} \]
                  3. flip-+N/A

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

                    \[\leadsto \color{blue}{\frac{x \cdot x - y \cdot y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                  5. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(y + x\right) \cdot \frac{x - y}{\color{blue}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                  15. lower--.f6494.9

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

                  \[\leadsto \color{blue}{\left(y + x\right) \cdot \frac{x - y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

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

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

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

                    \[\leadsto \left(y + x\right) \cdot \frac{\color{blue}{1}}{1 - \frac{y}{z}} \]
                  5. lift-/.f6498.6

                    \[\leadsto \left(y + x\right) \cdot \color{blue}{\frac{1}{1 - \frac{y}{z}}} \]
                6. Applied rewrites98.6%

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

                  \[\leadsto \left(y + x\right) \cdot \color{blue}{1} \]
                8. Step-by-step derivation
                  1. Applied rewrites69.6%

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

                  if 3.1999999999999999e108 < y

                  1. Initial program 72.0%

                    \[\frac{x + y}{1 - \frac{y}{z}} \]
                  2. Add Preprocessing
                  3. Taylor expanded in y around inf

                    \[\leadsto \color{blue}{-1 \cdot z} \]
                  4. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
                    2. lower-neg.f6463.0

                      \[\leadsto \color{blue}{-z} \]
                  5. Applied rewrites63.0%

                    \[\leadsto \color{blue}{-z} \]
                9. Recombined 3 regimes into one program.
                10. Final simplification67.5%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{+24}:\\ \;\;\;\;-\mathsf{fma}\left(\frac{z}{y}, z, z\right)\\ \mathbf{elif}\;y \leq 3.2 \cdot 10^{+108}:\\ \;\;\;\;\left(y + x\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;-z\\ \end{array} \]
                11. Add Preprocessing

                Alternative 8: 67.5% accurate, 1.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{+24} \lor \neg \left(y \leq 3.2 \cdot 10^{+108}\right):\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) \cdot 1\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (or (<= y -6.6e+24) (not (<= y 3.2e+108))) (- z) (* (+ y x) 1.0)))
                double code(double x, double y, double z) {
                	double tmp;
                	if ((y <= -6.6e+24) || !(y <= 3.2e+108)) {
                		tmp = -z;
                	} else {
                		tmp = (y + x) * 1.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) :: tmp
                    if ((y <= (-6.6d+24)) .or. (.not. (y <= 3.2d+108))) then
                        tmp = -z
                    else
                        tmp = (y + x) * 1.0d0
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double tmp;
                	if ((y <= -6.6e+24) || !(y <= 3.2e+108)) {
                		tmp = -z;
                	} else {
                		tmp = (y + x) * 1.0;
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	tmp = 0
                	if (y <= -6.6e+24) or not (y <= 3.2e+108):
                		tmp = -z
                	else:
                		tmp = (y + x) * 1.0
                	return tmp
                
                function code(x, y, z)
                	tmp = 0.0
                	if ((y <= -6.6e+24) || !(y <= 3.2e+108))
                		tmp = Float64(-z);
                	else
                		tmp = Float64(Float64(y + x) * 1.0);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z)
                	tmp = 0.0;
                	if ((y <= -6.6e+24) || ~((y <= 3.2e+108)))
                		tmp = -z;
                	else
                		tmp = (y + x) * 1.0;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := If[Or[LessEqual[y, -6.6e+24], N[Not[LessEqual[y, 3.2e+108]], $MachinePrecision]], (-z), N[(N[(y + x), $MachinePrecision] * 1.0), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y \leq -6.6 \cdot 10^{+24} \lor \neg \left(y \leq 3.2 \cdot 10^{+108}\right):\\
                \;\;\;\;-z\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(y + x\right) \cdot 1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -6.5999999999999998e24 or 3.1999999999999999e108 < y

                  1. Initial program 76.0%

                    \[\frac{x + y}{1 - \frac{y}{z}} \]
                  2. Add Preprocessing
                  3. Taylor expanded in y around inf

                    \[\leadsto \color{blue}{-1 \cdot z} \]
                  4. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
                    2. lower-neg.f6463.9

                      \[\leadsto \color{blue}{-z} \]
                  5. Applied rewrites63.9%

                    \[\leadsto \color{blue}{-z} \]

                  if -6.5999999999999998e24 < y < 3.1999999999999999e108

                  1. Initial program 98.7%

                    \[\frac{x + y}{1 - \frac{y}{z}} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \color{blue}{\frac{x + y}{1 - \frac{y}{z}}} \]
                    2. lift-+.f64N/A

                      \[\leadsto \frac{\color{blue}{x + y}}{1 - \frac{y}{z}} \]
                    3. flip-+N/A

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

                      \[\leadsto \color{blue}{\frac{x \cdot x - y \cdot y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                    5. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(y + x\right) \cdot \frac{x - y}{\color{blue}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                    15. lower--.f6494.9

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

                    \[\leadsto \color{blue}{\left(y + x\right) \cdot \frac{x - y}{\left(x - y\right) \cdot \left(1 - \frac{y}{z}\right)}} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

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

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

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

                      \[\leadsto \left(y + x\right) \cdot \frac{\color{blue}{1}}{1 - \frac{y}{z}} \]
                    5. lift-/.f6498.6

                      \[\leadsto \left(y + x\right) \cdot \color{blue}{\frac{1}{1 - \frac{y}{z}}} \]
                  6. Applied rewrites98.6%

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

                    \[\leadsto \left(y + x\right) \cdot \color{blue}{1} \]
                  8. Step-by-step derivation
                    1. Applied rewrites69.6%

                      \[\leadsto \left(y + x\right) \cdot \color{blue}{1} \]
                  9. Recombined 2 regimes into one program.
                  10. Final simplification67.5%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{+24} \lor \neg \left(y \leq 3.2 \cdot 10^{+108}\right):\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) \cdot 1\\ \end{array} \]
                  11. Add Preprocessing

                  Alternative 9: 57.5% accurate, 1.4× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.9 \cdot 10^{-36} \lor \neg \left(y \leq 7.5 \cdot 10^{-53}\right):\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot -1\\ \end{array} \end{array} \]
                  (FPCore (x y z)
                   :precision binary64
                   (if (or (<= y -4.9e-36) (not (<= y 7.5e-53))) (- z) (* (- x) -1.0)))
                  double code(double x, double y, double z) {
                  	double tmp;
                  	if ((y <= -4.9e-36) || !(y <= 7.5e-53)) {
                  		tmp = -z;
                  	} else {
                  		tmp = -x * -1.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) :: tmp
                      if ((y <= (-4.9d-36)) .or. (.not. (y <= 7.5d-53))) then
                          tmp = -z
                      else
                          tmp = -x * (-1.0d0)
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z) {
                  	double tmp;
                  	if ((y <= -4.9e-36) || !(y <= 7.5e-53)) {
                  		tmp = -z;
                  	} else {
                  		tmp = -x * -1.0;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	tmp = 0
                  	if (y <= -4.9e-36) or not (y <= 7.5e-53):
                  		tmp = -z
                  	else:
                  		tmp = -x * -1.0
                  	return tmp
                  
                  function code(x, y, z)
                  	tmp = 0.0
                  	if ((y <= -4.9e-36) || !(y <= 7.5e-53))
                  		tmp = Float64(-z);
                  	else
                  		tmp = Float64(Float64(-x) * -1.0);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z)
                  	tmp = 0.0;
                  	if ((y <= -4.9e-36) || ~((y <= 7.5e-53)))
                  		tmp = -z;
                  	else
                  		tmp = -x * -1.0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_] := If[Or[LessEqual[y, -4.9e-36], N[Not[LessEqual[y, 7.5e-53]], $MachinePrecision]], (-z), N[((-x) * -1.0), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;y \leq -4.9 \cdot 10^{-36} \lor \neg \left(y \leq 7.5 \cdot 10^{-53}\right):\\
                  \;\;\;\;-z\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(-x\right) \cdot -1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if y < -4.8999999999999997e-36 or 7.5000000000000001e-53 < y

                    1. Initial program 83.2%

                      \[\frac{x + y}{1 - \frac{y}{z}} \]
                    2. Add Preprocessing
                    3. Taylor expanded in y around inf

                      \[\leadsto \color{blue}{-1 \cdot z} \]
                    4. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
                      2. lower-neg.f6451.7

                        \[\leadsto \color{blue}{-z} \]
                    5. Applied rewrites51.7%

                      \[\leadsto \color{blue}{-z} \]

                    if -4.8999999999999997e-36 < y < 7.5000000000000001e-53

                    1. Initial program 99.9%

                      \[\frac{x + y}{1 - \frac{y}{z}} \]
                    2. Add Preprocessing
                    3. Taylor expanded in x around -inf

                      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{y}{x \cdot \left(1 - \frac{y}{z}\right)} - \frac{1}{1 - \frac{y}{z}}\right)\right)} \]
                    4. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \color{blue}{\mathsf{neg}\left(x \cdot \left(-1 \cdot \frac{y}{x \cdot \left(1 - \frac{y}{z}\right)} - \frac{1}{1 - \frac{y}{z}}\right)\right)} \]
                      2. distribute-lft-neg-inN/A

                        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(x\right)\right) \cdot \left(-1 \cdot \frac{y}{x \cdot \left(1 - \frac{y}{z}\right)} - \frac{1}{1 - \frac{y}{z}}\right)} \]
                      3. lower-*.f64N/A

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

                        \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-1 \cdot \frac{y}{x \cdot \left(1 - \frac{y}{z}\right)} - \frac{1}{1 - \frac{y}{z}}\right) \]
                      5. lower--.f64N/A

                        \[\leadsto \left(-x\right) \cdot \color{blue}{\left(-1 \cdot \frac{y}{x \cdot \left(1 - \frac{y}{z}\right)} - \frac{1}{1 - \frac{y}{z}}\right)} \]
                    5. Applied rewrites99.8%

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

                      \[\leadsto \left(-x\right) \cdot -1 \]
                    7. Step-by-step derivation
                      1. Applied rewrites70.0%

                        \[\leadsto \left(-x\right) \cdot -1 \]
                    8. Recombined 2 regimes into one program.
                    9. Final simplification59.1%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.9 \cdot 10^{-36} \lor \neg \left(y \leq 7.5 \cdot 10^{-53}\right):\\ \;\;\;\;-z\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot -1\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 10: 34.1% accurate, 9.7× speedup?

                    \[\begin{array}{l} \\ -z \end{array} \]
                    (FPCore (x y z) :precision binary64 (- z))
                    double code(double x, double y, double z) {
                    	return -z;
                    }
                    
                    real(8) function code(x, y, z)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        code = -z
                    end function
                    
                    public static double code(double x, double y, double z) {
                    	return -z;
                    }
                    
                    def code(x, y, z):
                    	return -z
                    
                    function code(x, y, z)
                    	return Float64(-z)
                    end
                    
                    function tmp = code(x, y, z)
                    	tmp = -z;
                    end
                    
                    code[x_, y_, z_] := (-z)
                    
                    \begin{array}{l}
                    
                    \\
                    -z
                    \end{array}
                    
                    Derivation
                    1. Initial program 90.0%

                      \[\frac{x + y}{1 - \frac{y}{z}} \]
                    2. Add Preprocessing
                    3. Taylor expanded in y around inf

                      \[\leadsto \color{blue}{-1 \cdot z} \]
                    4. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \color{blue}{\mathsf{neg}\left(z\right)} \]
                      2. lower-neg.f6434.4

                        \[\leadsto \color{blue}{-z} \]
                    5. Applied rewrites34.4%

                      \[\leadsto \color{blue}{-z} \]
                    6. Add Preprocessing

                    Developer Target 1: 93.7% accurate, 0.7× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y + x}{-y} \cdot z\\ \mathbf{if}\;y < -3.7429310762689856 \cdot 10^{+171}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y < 3.5534662456086734 \cdot 10^{+168}:\\ \;\;\;\;\frac{x + y}{1 - \frac{y}{z}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                    (FPCore (x y z)
                     :precision binary64
                     (let* ((t_0 (* (/ (+ y x) (- y)) z)))
                       (if (< y -3.7429310762689856e+171)
                         t_0
                         (if (< y 3.5534662456086734e+168) (/ (+ x y) (- 1.0 (/ y z))) t_0))))
                    double code(double x, double y, double z) {
                    	double t_0 = ((y + x) / -y) * z;
                    	double tmp;
                    	if (y < -3.7429310762689856e+171) {
                    		tmp = t_0;
                    	} else if (y < 3.5534662456086734e+168) {
                    		tmp = (x + y) / (1.0 - (y / z));
                    	} 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) / -y) * z
                        if (y < (-3.7429310762689856d+171)) then
                            tmp = t_0
                        else if (y < 3.5534662456086734d+168) then
                            tmp = (x + y) / (1.0d0 - (y / z))
                        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) / -y) * z;
                    	double tmp;
                    	if (y < -3.7429310762689856e+171) {
                    		tmp = t_0;
                    	} else if (y < 3.5534662456086734e+168) {
                    		tmp = (x + y) / (1.0 - (y / z));
                    	} else {
                    		tmp = t_0;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z):
                    	t_0 = ((y + x) / -y) * z
                    	tmp = 0
                    	if y < -3.7429310762689856e+171:
                    		tmp = t_0
                    	elif y < 3.5534662456086734e+168:
                    		tmp = (x + y) / (1.0 - (y / z))
                    	else:
                    		tmp = t_0
                    	return tmp
                    
                    function code(x, y, z)
                    	t_0 = Float64(Float64(Float64(y + x) / Float64(-y)) * z)
                    	tmp = 0.0
                    	if (y < -3.7429310762689856e+171)
                    		tmp = t_0;
                    	elseif (y < 3.5534662456086734e+168)
                    		tmp = Float64(Float64(x + y) / Float64(1.0 - Float64(y / z)));
                    	else
                    		tmp = t_0;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z)
                    	t_0 = ((y + x) / -y) * z;
                    	tmp = 0.0;
                    	if (y < -3.7429310762689856e+171)
                    		tmp = t_0;
                    	elseif (y < 3.5534662456086734e+168)
                    		tmp = (x + y) / (1.0 - (y / z));
                    	else
                    		tmp = t_0;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y + x), $MachinePrecision] / (-y)), $MachinePrecision] * z), $MachinePrecision]}, If[Less[y, -3.7429310762689856e+171], t$95$0, If[Less[y, 3.5534662456086734e+168], N[(N[(x + y), $MachinePrecision] / N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := \frac{y + x}{-y} \cdot z\\
                    \mathbf{if}\;y < -3.7429310762689856 \cdot 10^{+171}:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;y < 3.5534662456086734 \cdot 10^{+168}:\\
                    \;\;\;\;\frac{x + y}{1 - \frac{y}{z}}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_0\\
                    
                    
                    \end{array}
                    \end{array}
                    

                    Reproduce

                    ?
                    herbie shell --seed 2024337 
                    (FPCore (x y z)
                      :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, A"
                      :precision binary64
                    
                      :alt
                      (! :herbie-platform default (if (< y -3742931076268985600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* (/ (+ y x) (- y)) z) (if (< y 3553466245608673400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ x y) (- 1 (/ y z))) (* (/ (+ y x) (- y)) z))))
                    
                      (/ (+ x y) (- 1.0 (/ y z))))