Graphics.Rasterific.Shading:$sgradientColorAt from Rasterific-0.6.1

Percentage Accurate: 100.0% → 100.0%
Time: 10.9s
Alternatives: 7
Speedup: 1.0×

Specification

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

\\
\frac{x - y}{z - y}
\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 7 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: 100.0% accurate, 1.0× speedup?

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

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

Alternative 1: 100.0% accurate, 1.0× speedup?

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

\\
\frac{x - y}{z - y}
\end{array}
Derivation
  1. Initial program 100.0%

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

Alternative 2: 75.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+15}:\\ \;\;\;\;\frac{y - x}{y}\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-45}:\\ \;\;\;\;\frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{y - z}\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y -4.8e+15)
   (/ (- y x) y)
   (if (<= y 3e-45) (/ (- x y) z) (/ y (- y z)))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= -4.8e+15) {
		tmp = (y - x) / y;
	} else if (y <= 3e-45) {
		tmp = (x - y) / z;
	} else {
		tmp = y / (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) :: tmp
    if (y <= (-4.8d+15)) then
        tmp = (y - x) / y
    else if (y <= 3d-45) then
        tmp = (x - y) / z
    else
        tmp = y / (y - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= -4.8e+15) {
		tmp = (y - x) / y;
	} else if (y <= 3e-45) {
		tmp = (x - y) / z;
	} else {
		tmp = y / (y - z);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= -4.8e+15:
		tmp = (y - x) / y
	elif y <= 3e-45:
		tmp = (x - y) / z
	else:
		tmp = y / (y - z)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= -4.8e+15)
		tmp = Float64(Float64(y - x) / y);
	elseif (y <= 3e-45)
		tmp = Float64(Float64(x - y) / z);
	else
		tmp = Float64(y / Float64(y - z));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= -4.8e+15)
		tmp = (y - x) / y;
	elseif (y <= 3e-45)
		tmp = (x - y) / z;
	else
		tmp = y / (y - z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, -4.8e+15], N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 3e-45], N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision], N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{y - x}{y}\\

\mathbf{elif}\;y \leq 3 \cdot 10^{-45}:\\
\;\;\;\;\frac{x - y}{z}\\

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


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

    1. Initial program 100.0%

      \[\frac{x - y}{z - y} \]
    2. Step-by-step derivation
      1. sub-negN/A

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

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

        \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
      4. associate-+l-N/A

        \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
      5. sub0-negN/A

        \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
      6. distribute-frac-neg2N/A

        \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
      7. distribute-neg-fracN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
      8. sub-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
      9. +-commutativeN/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
      10. distribute-neg-outN/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
      11. remove-double-negN/A

        \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
      12. sub-negN/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \color{blue}{y}\right) \]
    6. Step-by-step derivation
      1. Simplified85.3%

        \[\leadsto \frac{y - x}{\color{blue}{y}} \]

      if -4.8e15 < y < 3.00000000000000011e-45

      1. Initial program 100.0%

        \[\frac{x - y}{z - y} \]
      2. Step-by-step derivation
        1. sub-negN/A

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

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

          \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
        4. associate-+l-N/A

          \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
        5. sub0-negN/A

          \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
        6. distribute-frac-neg2N/A

          \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
        7. distribute-neg-fracN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
        8. sub-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
        10. distribute-neg-outN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
        11. remove-double-negN/A

          \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
        12. sub-negN/A

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
      4. Add Preprocessing
      5. Taylor expanded in z around inf

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

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

          \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(y - x\right)\right), \color{blue}{z}\right) \]
        3. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(y - x\right)\right)\right), z\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right)\right), z\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(x\right)\right) + y\right)\right)\right), z\right) \]
        6. distribute-neg-inN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), z\right) \]
        7. unsub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - y\right), z\right) \]
        8. remove-double-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(x - y\right), z\right) \]
        9. --lowering--.f6483.6%

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

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

      if 3.00000000000000011e-45 < y

      1. Initial program 99.9%

        \[\frac{x - y}{z - y} \]
      2. Step-by-step derivation
        1. sub-negN/A

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

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

          \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
        4. associate-+l-N/A

          \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
        5. sub0-negN/A

          \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
        6. distribute-frac-neg2N/A

          \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
        7. distribute-neg-fracN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
        8. sub-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
        10. distribute-neg-outN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
        11. remove-double-negN/A

          \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
        12. sub-negN/A

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      3. Simplified99.9%

        \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
      4. Add Preprocessing
      5. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{y}{y - z}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(y - z\right)}\right) \]
        2. --lowering--.f6472.5%

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

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

    Alternative 3: 75.6% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{y}{y - z}\\ \mathbf{if}\;y \leq -440000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-43}:\\ \;\;\;\;\frac{x - y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (/ y (- y z))))
       (if (<= y -440000.0) t_0 (if (<= y 5e-43) (/ (- x y) z) t_0))))
    double code(double x, double y, double z) {
    	double t_0 = y / (y - z);
    	double tmp;
    	if (y <= -440000.0) {
    		tmp = t_0;
    	} else if (y <= 5e-43) {
    		tmp = (x - 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 / (y - z)
        if (y <= (-440000.0d0)) then
            tmp = t_0
        else if (y <= 5d-43) then
            tmp = (x - 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 / (y - z);
    	double tmp;
    	if (y <= -440000.0) {
    		tmp = t_0;
    	} else if (y <= 5e-43) {
    		tmp = (x - y) / z;
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = y / (y - z)
    	tmp = 0
    	if y <= -440000.0:
    		tmp = t_0
    	elif y <= 5e-43:
    		tmp = (x - y) / z
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(y / Float64(y - z))
    	tmp = 0.0
    	if (y <= -440000.0)
    		tmp = t_0;
    	elseif (y <= 5e-43)
    		tmp = Float64(Float64(x - y) / z);
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = y / (y - z);
    	tmp = 0.0;
    	if (y <= -440000.0)
    		tmp = t_0;
    	elseif (y <= 5e-43)
    		tmp = (x - y) / z;
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -440000.0], t$95$0, If[LessEqual[y, 5e-43], N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision], t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{y}{y - z}\\
    \mathbf{if}\;y \leq -440000:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;y \leq 5 \cdot 10^{-43}:\\
    \;\;\;\;\frac{x - y}{z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -4.4e5 or 5.00000000000000019e-43 < y

      1. Initial program 100.0%

        \[\frac{x - y}{z - y} \]
      2. Step-by-step derivation
        1. sub-negN/A

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

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

          \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
        4. associate-+l-N/A

          \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
        5. sub0-negN/A

          \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
        6. distribute-frac-neg2N/A

          \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
        7. distribute-neg-fracN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
        8. sub-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
        10. distribute-neg-outN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
        11. remove-double-negN/A

          \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
        12. sub-negN/A

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
      4. Add Preprocessing
      5. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{y}{y - z}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(y - z\right)}\right) \]
        2. --lowering--.f6477.1%

          \[\leadsto \mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      7. Simplified77.1%

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

      if -4.4e5 < y < 5.00000000000000019e-43

      1. Initial program 100.0%

        \[\frac{x - y}{z - y} \]
      2. Step-by-step derivation
        1. sub-negN/A

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

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

          \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
        4. associate-+l-N/A

          \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
        5. sub0-negN/A

          \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
        6. distribute-frac-neg2N/A

          \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
        7. distribute-neg-fracN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
        8. sub-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
        10. distribute-neg-outN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
        11. remove-double-negN/A

          \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
        12. sub-negN/A

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
      4. Add Preprocessing
      5. Taylor expanded in z around inf

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

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

          \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(y - x\right)\right), \color{blue}{z}\right) \]
        3. mul-1-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(y - x\right)\right)\right), z\right) \]
        4. sub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(y + \left(\mathsf{neg}\left(x\right)\right)\right)\right)\right), z\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(x\right)\right) + y\right)\right)\right), z\right) \]
        6. distribute-neg-inN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)\right), z\right) \]
        7. unsub-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - y\right), z\right) \]
        8. remove-double-negN/A

          \[\leadsto \mathsf{/.f64}\left(\left(x - y\right), z\right) \]
        9. --lowering--.f6483.6%

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

        \[\leadsto \color{blue}{\frac{x - y}{z}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 4: 76.8% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{x}{z - y}\\ \mathbf{if}\;x \leq -1.12 \cdot 10^{+39}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 3 \cdot 10^{+43}:\\ \;\;\;\;\frac{y}{y - z}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (/ x (- z y))))
       (if (<= x -1.12e+39) t_0 (if (<= x 3e+43) (/ y (- y z)) t_0))))
    double code(double x, double y, double z) {
    	double t_0 = x / (z - y);
    	double tmp;
    	if (x <= -1.12e+39) {
    		tmp = t_0;
    	} else if (x <= 3e+43) {
    		tmp = y / (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 = x / (z - y)
        if (x <= (-1.12d+39)) then
            tmp = t_0
        else if (x <= 3d+43) then
            tmp = y / (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 = x / (z - y);
    	double tmp;
    	if (x <= -1.12e+39) {
    		tmp = t_0;
    	} else if (x <= 3e+43) {
    		tmp = y / (y - z);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = x / (z - y)
    	tmp = 0
    	if x <= -1.12e+39:
    		tmp = t_0
    	elif x <= 3e+43:
    		tmp = y / (y - z)
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(x / Float64(z - y))
    	tmp = 0.0
    	if (x <= -1.12e+39)
    		tmp = t_0;
    	elseif (x <= 3e+43)
    		tmp = Float64(y / Float64(y - z));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = x / (z - y);
    	tmp = 0.0;
    	if (x <= -1.12e+39)
    		tmp = t_0;
    	elseif (x <= 3e+43)
    		tmp = y / (y - z);
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.12e+39], t$95$0, If[LessEqual[x, 3e+43], N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$0]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \frac{x}{z - y}\\
    \mathbf{if}\;x \leq -1.12 \cdot 10^{+39}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;x \leq 3 \cdot 10^{+43}:\\
    \;\;\;\;\frac{y}{y - z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -1.12e39 or 3.00000000000000017e43 < x

      1. Initial program 100.0%

        \[\frac{x - y}{z - y} \]
      2. Step-by-step derivation
        1. sub-negN/A

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

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

          \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
        4. associate-+l-N/A

          \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
        5. sub0-negN/A

          \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
        6. distribute-frac-neg2N/A

          \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
        7. distribute-neg-fracN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
        8. sub-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
        10. distribute-neg-outN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
        11. remove-double-negN/A

          \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
        12. sub-negN/A

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
      4. Add Preprocessing
      5. Step-by-step derivation
        1. clear-numN/A

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right), \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right)}\right)\right)\right) \]
        6. neg-sub0N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(0 - \left(y - z\right)\right)\right), \left(\mathsf{neg}\left(\left(y - \color{blue}{x}\right)\right)\right)\right) \]
        7. sub-negN/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + y\right)\right)\right), \left(\mathsf{neg}\left(\left(y - x\right)\right)\right)\right) \]
        9. associate--r+N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - y\right)\right), \left(\mathsf{neg}\left(\left(y - \color{blue}{x}\right)\right)\right)\right) \]
        10. neg-sub0N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y\right)\right), \left(\mathsf{neg}\left(\left(y - x\right)\right)\right)\right) \]
        11. remove-double-negN/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(\mathsf{neg}\left(\left(y - \color{blue}{x}\right)\right)\right)\right) \]
        13. neg-sub0N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(0 - \color{blue}{\left(y - x\right)}\right)\right) \]
        14. sub-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(0 - \left(y + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right)\right)\right) \]
        15. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(0 - \left(\left(\mathsf{neg}\left(x\right)\right) + \color{blue}{y}\right)\right)\right) \]
        16. associate--r+N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(\left(0 - \left(\mathsf{neg}\left(x\right)\right)\right) - \color{blue}{y}\right)\right) \]
        17. neg-sub0N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - y\right)\right) \]
        18. remove-double-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(x - y\right)\right) \]
        19. --lowering--.f6499.8%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{\_.f64}\left(x, \color{blue}{y}\right)\right) \]
      6. Applied egg-rr99.8%

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

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

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

          \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(z, \color{blue}{y}\right)\right) \]
      9. Simplified81.0%

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

      if -1.12e39 < x < 3.00000000000000017e43

      1. Initial program 100.0%

        \[\frac{x - y}{z - y} \]
      2. Step-by-step derivation
        1. sub-negN/A

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

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

          \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
        4. associate-+l-N/A

          \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
        5. sub0-negN/A

          \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
        6. distribute-frac-neg2N/A

          \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
        7. distribute-neg-fracN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
        8. sub-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
        10. distribute-neg-outN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
        11. remove-double-negN/A

          \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
        12. sub-negN/A

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
      4. Add Preprocessing
      5. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\frac{y}{y - z}} \]
      6. Step-by-step derivation
        1. /-lowering-/.f64N/A

          \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{\left(y - z\right)}\right) \]
        2. --lowering--.f6478.5%

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

        \[\leadsto \color{blue}{\frac{y}{y - z}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 5: 69.3% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+19}:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+96}:\\ \;\;\;\;\frac{x}{z - y}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= y -4.5e+19) 1.0 (if (<= y 5.5e+96) (/ x (- z y)) 1.0)))
    double code(double x, double y, double z) {
    	double tmp;
    	if (y <= -4.5e+19) {
    		tmp = 1.0;
    	} else if (y <= 5.5e+96) {
    		tmp = x / (z - y);
    	} else {
    		tmp = 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.5d+19)) then
            tmp = 1.0d0
        else if (y <= 5.5d+96) then
            tmp = x / (z - y)
        else
            tmp = 1.0d0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double tmp;
    	if (y <= -4.5e+19) {
    		tmp = 1.0;
    	} else if (y <= 5.5e+96) {
    		tmp = x / (z - y);
    	} else {
    		tmp = 1.0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	tmp = 0
    	if y <= -4.5e+19:
    		tmp = 1.0
    	elif y <= 5.5e+96:
    		tmp = x / (z - y)
    	else:
    		tmp = 1.0
    	return tmp
    
    function code(x, y, z)
    	tmp = 0.0
    	if (y <= -4.5e+19)
    		tmp = 1.0;
    	elseif (y <= 5.5e+96)
    		tmp = Float64(x / Float64(z - y));
    	else
    		tmp = 1.0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if (y <= -4.5e+19)
    		tmp = 1.0;
    	elseif (y <= 5.5e+96)
    		tmp = x / (z - y);
    	else
    		tmp = 1.0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := If[LessEqual[y, -4.5e+19], 1.0, If[LessEqual[y, 5.5e+96], N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision], 1.0]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq -4.5 \cdot 10^{+19}:\\
    \;\;\;\;1\\
    
    \mathbf{elif}\;y \leq 5.5 \cdot 10^{+96}:\\
    \;\;\;\;\frac{x}{z - y}\\
    
    \mathbf{else}:\\
    \;\;\;\;1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -4.5e19 or 5.5000000000000002e96 < y

      1. Initial program 100.0%

        \[\frac{x - y}{z - y} \]
      2. Step-by-step derivation
        1. sub-negN/A

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

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

          \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
        4. associate-+l-N/A

          \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
        5. sub0-negN/A

          \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
        6. distribute-frac-neg2N/A

          \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
        7. distribute-neg-fracN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
        8. sub-negN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
        9. +-commutativeN/A

          \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
        10. distribute-neg-outN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
        11. remove-double-negN/A

          \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
        12. sub-negN/A

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
      3. Simplified100.0%

        \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
      4. Add Preprocessing
      5. Taylor expanded in y around inf

        \[\leadsto \color{blue}{1} \]
      6. Step-by-step derivation
        1. Simplified72.7%

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

        if -4.5e19 < y < 5.5000000000000002e96

        1. Initial program 100.0%

          \[\frac{x - y}{z - y} \]
        2. Step-by-step derivation
          1. sub-negN/A

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

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

            \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
          4. associate-+l-N/A

            \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
          5. sub0-negN/A

            \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
          6. distribute-frac-neg2N/A

            \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
          7. distribute-neg-fracN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
          8. sub-negN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
          10. distribute-neg-outN/A

            \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
          11. remove-double-negN/A

            \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
          12. sub-negN/A

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
        3. Simplified100.0%

          \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
        4. Add Preprocessing
        5. Step-by-step derivation
          1. clear-numN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(\mathsf{neg}\left(\left(y - z\right)\right)\right)\right), \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right)}\right)\right)\right) \]
          6. neg-sub0N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(0 - \left(y - z\right)\right)\right), \left(\mathsf{neg}\left(\left(y - \color{blue}{x}\right)\right)\right)\right) \]
          7. sub-negN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(0 - \left(\left(\mathsf{neg}\left(z\right)\right) + y\right)\right)\right), \left(\mathsf{neg}\left(\left(y - x\right)\right)\right)\right) \]
          9. associate--r+N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(\left(0 - \left(\mathsf{neg}\left(z\right)\right)\right) - y\right)\right), \left(\mathsf{neg}\left(\left(y - \color{blue}{x}\right)\right)\right)\right) \]
          10. neg-sub0N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y\right)\right), \left(\mathsf{neg}\left(\left(y - x\right)\right)\right)\right) \]
          11. remove-double-negN/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(\mathsf{neg}\left(\left(y - \color{blue}{x}\right)\right)\right)\right) \]
          13. neg-sub0N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(0 - \color{blue}{\left(y - x\right)}\right)\right) \]
          14. sub-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(0 - \left(y + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right)\right)\right) \]
          15. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(0 - \left(\left(\mathsf{neg}\left(x\right)\right) + \color{blue}{y}\right)\right)\right) \]
          16. associate--r+N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(\left(0 - \left(\mathsf{neg}\left(x\right)\right)\right) - \color{blue}{y}\right)\right) \]
          17. neg-sub0N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right)\right)\right) - y\right)\right) \]
          18. remove-double-negN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \left(x - y\right)\right) \]
          19. --lowering--.f6499.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(z, y\right)\right), \mathsf{\_.f64}\left(x, \color{blue}{y}\right)\right) \]
        6. Applied egg-rr99.7%

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

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

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

            \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(z, \color{blue}{y}\right)\right) \]
        9. Simplified70.8%

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

      Alternative 6: 60.9% accurate, 0.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -480000000:\\ \;\;\;\;1\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-7}:\\ \;\;\;\;\frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (if (<= y -480000000.0) 1.0 (if (<= y 2.1e-7) (/ x z) 1.0)))
      double code(double x, double y, double z) {
      	double tmp;
      	if (y <= -480000000.0) {
      		tmp = 1.0;
      	} else if (y <= 2.1e-7) {
      		tmp = x / z;
      	} else {
      		tmp = 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 <= (-480000000.0d0)) then
              tmp = 1.0d0
          else if (y <= 2.1d-7) then
              tmp = x / z
          else
              tmp = 1.0d0
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double tmp;
      	if (y <= -480000000.0) {
      		tmp = 1.0;
      	} else if (y <= 2.1e-7) {
      		tmp = x / z;
      	} else {
      		tmp = 1.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	tmp = 0
      	if y <= -480000000.0:
      		tmp = 1.0
      	elif y <= 2.1e-7:
      		tmp = x / z
      	else:
      		tmp = 1.0
      	return tmp
      
      function code(x, y, z)
      	tmp = 0.0
      	if (y <= -480000000.0)
      		tmp = 1.0;
      	elseif (y <= 2.1e-7)
      		tmp = Float64(x / z);
      	else
      		tmp = 1.0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	tmp = 0.0;
      	if (y <= -480000000.0)
      		tmp = 1.0;
      	elseif (y <= 2.1e-7)
      		tmp = x / z;
      	else
      		tmp = 1.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := If[LessEqual[y, -480000000.0], 1.0, If[LessEqual[y, 2.1e-7], N[(x / z), $MachinePrecision], 1.0]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;y \leq -480000000:\\
      \;\;\;\;1\\
      
      \mathbf{elif}\;y \leq 2.1 \cdot 10^{-7}:\\
      \;\;\;\;\frac{x}{z}\\
      
      \mathbf{else}:\\
      \;\;\;\;1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -4.8e8 or 2.1e-7 < y

        1. Initial program 100.0%

          \[\frac{x - y}{z - y} \]
        2. Step-by-step derivation
          1. sub-negN/A

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

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

            \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
          4. associate-+l-N/A

            \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
          5. sub0-negN/A

            \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
          6. distribute-frac-neg2N/A

            \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
          7. distribute-neg-fracN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
          8. sub-negN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
          10. distribute-neg-outN/A

            \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
          11. remove-double-negN/A

            \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
          12. sub-negN/A

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
        3. Simplified100.0%

          \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
        4. Add Preprocessing
        5. Taylor expanded in y around inf

          \[\leadsto \color{blue}{1} \]
        6. Step-by-step derivation
          1. Simplified63.5%

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

          if -4.8e8 < y < 2.1e-7

          1. Initial program 100.0%

            \[\frac{x - y}{z - y} \]
          2. Step-by-step derivation
            1. sub-negN/A

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

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

              \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
            4. associate-+l-N/A

              \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
            5. sub0-negN/A

              \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
            6. distribute-frac-neg2N/A

              \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
            7. distribute-neg-fracN/A

              \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
            8. sub-negN/A

              \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
            9. +-commutativeN/A

              \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
            10. distribute-neg-outN/A

              \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
            11. remove-double-negN/A

              \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
            12. sub-negN/A

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
          3. Simplified100.0%

            \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
          4. Add Preprocessing
          5. Taylor expanded in y around 0

            \[\leadsto \color{blue}{\frac{x}{z}} \]
          6. Step-by-step derivation
            1. /-lowering-/.f6463.2%

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

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

        Alternative 7: 34.7% accurate, 7.0× speedup?

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

          \[\frac{x - y}{z - y} \]
        2. Step-by-step derivation
          1. sub-negN/A

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

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

            \[\leadsto \frac{x - y}{\left(0 - y\right) + z} \]
          4. associate-+l-N/A

            \[\leadsto \frac{x - y}{0 - \color{blue}{\left(y - z\right)}} \]
          5. sub0-negN/A

            \[\leadsto \frac{x - y}{\mathsf{neg}\left(\left(y - z\right)\right)} \]
          6. distribute-frac-neg2N/A

            \[\leadsto \mathsf{neg}\left(\frac{x - y}{y - z}\right) \]
          7. distribute-neg-fracN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(x - y\right)\right)}{\color{blue}{y - z}} \]
          8. sub-negN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(x + \left(\mathsf{neg}\left(y\right)\right)\right)\right)}{y - z} \]
          9. +-commutativeN/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(\left(\mathsf{neg}\left(y\right)\right) + x\right)\right)}{y - z} \]
          10. distribute-neg-outN/A

            \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \left(\mathsf{neg}\left(x\right)\right)}{\color{blue}{y} - z} \]
          11. remove-double-negN/A

            \[\leadsto \frac{y + \left(\mathsf{neg}\left(x\right)\right)}{y - z} \]
          12. sub-negN/A

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{\_.f64}\left(y, \color{blue}{z}\right)\right) \]
        3. Simplified100.0%

          \[\leadsto \color{blue}{\frac{y - x}{y - z}} \]
        4. Add Preprocessing
        5. Taylor expanded in y around inf

          \[\leadsto \color{blue}{1} \]
        6. Step-by-step derivation
          1. Simplified34.7%

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

          Developer Target 1: 100.0% accurate, 0.6× speedup?

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

          Reproduce

          ?
          herbie shell --seed 2024158 
          (FPCore (x y z)
            :name "Graphics.Rasterific.Shading:$sgradientColorAt from Rasterific-0.6.1"
            :precision binary64
          
            :alt
            (! :herbie-platform default (- (/ x (- z y)) (/ y (- z y))))
          
            (/ (- x y) (- z y)))