Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A

Percentage Accurate: 98.3% → 98.3%
Time: 5.9s
Alternatives: 13
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{z - a} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (z - a)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (y * ((z - t) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a):
	return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y * ((z - t) / (z - a)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot \frac{z - t}{z - a}
\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 13 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: 98.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{z - a} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (z - a)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (y * ((z - t) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a):
	return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y * ((z - t) / (z - a)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}

Alternative 1: 98.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{z - a} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (z - a)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + (y * ((z - t) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a):
	return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y * ((z - t) / (z - a)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Derivation
  1. Initial program 98.1%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 80.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{z - a}\\ \mathbf{if}\;t\_1 \leq -2000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-11} \lor \neg \left(t\_1 \leq 10^{+40}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- z t) (- z a))))
   (if (<= t_1 -2000000.0)
     (fma (/ (- t) z) y x)
     (if (or (<= t_1 4e-11) (not (<= t_1 1e+40))) (fma (/ y a) t x) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) / (z - a);
	double tmp;
	if (t_1 <= -2000000.0) {
		tmp = fma((-t / z), y, x);
	} else if ((t_1 <= 4e-11) || !(t_1 <= 1e+40)) {
		tmp = fma((y / a), t, x);
	} else {
		tmp = x + y;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z - t) / Float64(z - a))
	tmp = 0.0
	if (t_1 <= -2000000.0)
		tmp = fma(Float64(Float64(-t) / z), y, x);
	elseif ((t_1 <= 4e-11) || !(t_1 <= 1e+40))
		tmp = fma(Float64(y / a), t, x);
	else
		tmp = Float64(x + y);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2000000.0], N[(N[((-t) / z), $MachinePrecision] * y + x), $MachinePrecision], If[Or[LessEqual[t$95$1, 4e-11], N[Not[LessEqual[t$95$1, 1e+40]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * t + x), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq -2000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-11} \lor \neg \left(t\_1 \leq 10^{+40}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -2e6

    1. Initial program 94.3%

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

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

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

        \[\leadsto y \cdot \frac{z - t}{z} + x \]
      3. *-commutativeN/A

        \[\leadsto \frac{z - t}{z} \cdot y + x \]
      4. div-subN/A

        \[\leadsto \left(\frac{z}{z} - \frac{t}{z}\right) \cdot y + x \]
      5. *-inversesN/A

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

        \[\leadsto \left(1 - 1 \cdot \frac{t}{z}\right) \cdot y + x \]
      7. metadata-evalN/A

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

        \[\leadsto \left(1 + -1 \cdot \frac{t}{z}\right) \cdot y + x \]
      9. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t}{z}, y, x\right) \]
      11. *-inversesN/A

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

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

        \[\leadsto \mathsf{fma}\left(\frac{z}{z} - \frac{t}{z}, y, x\right) \]
      14. div-subN/A

        \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
      15. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
      16. lower--.f6463.9

        \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
    5. Applied rewrites63.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{z}, y, x\right)} \]
    6. Taylor expanded in z around 0

      \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot t}{z}, y, x\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(t\right)}{z}, y, x\right) \]
      2. lower-neg.f6462.5

        \[\leadsto \mathsf{fma}\left(\frac{-t}{z}, y, x\right) \]
    8. Applied rewrites62.5%

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

    if -2e6 < (/.f64 (-.f64 z t) (-.f64 z a)) < 3.99999999999999976e-11 or 1.00000000000000003e40 < (/.f64 (-.f64 z t) (-.f64 z a))

    1. Initial program 97.4%

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto t \cdot \frac{y}{a} + x \]
      3. *-commutativeN/A

        \[\leadsto \frac{y}{a} \cdot t + x \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{t}, x\right) \]
      5. lower-/.f6478.0

        \[\leadsto \mathsf{fma}\left(\frac{y}{a}, t, x\right) \]
    5. Applied rewrites78.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, t, x\right)} \]

    if 3.99999999999999976e-11 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1.00000000000000003e40

    1. Initial program 100.0%

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

      \[\leadsto x + \color{blue}{y} \]
    4. Step-by-step derivation
      1. Applied rewrites93.8%

        \[\leadsto x + \color{blue}{y} \]
    5. Recombined 3 regimes into one program.
    6. Final simplification82.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z - t}{z - a} \leq -2000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 4 \cdot 10^{-11} \lor \neg \left(\frac{z - t}{z - a} \leq 10^{+40}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
    7. Add Preprocessing

    Alternative 3: 80.6% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{z - a}\\ \mathbf{if}\;t\_1 \leq -2000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-19}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{-a}, x\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+40}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (/ (- z t) (- z a))))
       (if (<= t_1 -2000000.0)
         (fma (/ (- t) z) y x)
         (if (<= t_1 5e-19)
           (fma y (/ z (- a)) x)
           (if (<= t_1 1e+40) (+ x y) (fma (/ y a) t x))))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (z - t) / (z - a);
    	double tmp;
    	if (t_1 <= -2000000.0) {
    		tmp = fma((-t / z), y, x);
    	} else if (t_1 <= 5e-19) {
    		tmp = fma(y, (z / -a), x);
    	} else if (t_1 <= 1e+40) {
    		tmp = x + y;
    	} else {
    		tmp = fma((y / a), t, x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(z - t) / Float64(z - a))
    	tmp = 0.0
    	if (t_1 <= -2000000.0)
    		tmp = fma(Float64(Float64(-t) / z), y, x);
    	elseif (t_1 <= 5e-19)
    		tmp = fma(y, Float64(z / Float64(-a)), x);
    	elseif (t_1 <= 1e+40)
    		tmp = Float64(x + y);
    	else
    		tmp = fma(Float64(y / a), t, x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2000000.0], N[(N[((-t) / z), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t$95$1, 5e-19], N[(y * N[(z / (-a)), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 1e+40], N[(x + y), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * t + x), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{z - t}{z - a}\\
    \mathbf{if}\;t\_1 \leq -2000000:\\
    \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-19}:\\
    \;\;\;\;\mathsf{fma}\left(y, \frac{z}{-a}, x\right)\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+40}:\\
    \;\;\;\;x + y\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -2e6

      1. Initial program 94.3%

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

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

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

          \[\leadsto y \cdot \frac{z - t}{z} + x \]
        3. *-commutativeN/A

          \[\leadsto \frac{z - t}{z} \cdot y + x \]
        4. div-subN/A

          \[\leadsto \left(\frac{z}{z} - \frac{t}{z}\right) \cdot y + x \]
        5. *-inversesN/A

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

          \[\leadsto \left(1 - 1 \cdot \frac{t}{z}\right) \cdot y + x \]
        7. metadata-evalN/A

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

          \[\leadsto \left(1 + -1 \cdot \frac{t}{z}\right) \cdot y + x \]
        9. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t}{z}, y, x\right) \]
        11. *-inversesN/A

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

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

          \[\leadsto \mathsf{fma}\left(\frac{z}{z} - \frac{t}{z}, y, x\right) \]
        14. div-subN/A

          \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
        15. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
        16. lower--.f6463.9

          \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
      5. Applied rewrites63.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{z}, y, x\right)} \]
      6. Taylor expanded in z around 0

        \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot t}{z}, y, x\right) \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(t\right)}{z}, y, x\right) \]
        2. lower-neg.f6462.5

          \[\leadsto \mathsf{fma}\left(\frac{-t}{z}, y, x\right) \]
      8. Applied rewrites62.5%

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

      if -2e6 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000004e-19

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{y \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} - 1\right)\right)} \]
      4. Step-by-step derivation
        1. associate-*r*N/A

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

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

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

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

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

          \[\leadsto \left(-x\right) \cdot \left(-1 \cdot \frac{y \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} - \left(\mathsf{neg}\left(1\right)\right) \cdot -1\right) \]
        7. fp-cancel-sign-subN/A

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

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

          \[\leadsto \left(-x\right) \cdot \left(\frac{\left(-1 \cdot y\right) \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} + 1 \cdot -1\right) \]
        10. times-fracN/A

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

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

          \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-1 \cdot y}{x}, \color{blue}{\frac{z - t}{z - a}}, -1\right) \]
        13. mul-1-negN/A

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

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

          \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{\color{blue}{z} - t}{z - a}, -1\right) \]
        16. lower-/.f64N/A

          \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{\color{blue}{z - a}}, -1\right) \]
        17. lower--.f64N/A

          \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{\color{blue}{z} - a}, -1\right) \]
        18. lower--.f6490.2

          \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{z - \color{blue}{a}}, -1\right) \]
      5. Applied rewrites90.2%

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

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

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

          \[\leadsto x + \frac{y \cdot z}{z - a} \]
        3. +-commutativeN/A

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

          \[\leadsto y \cdot \frac{z}{z - a} + x \]
        5. lower-fma.f64N/A

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

          \[\leadsto \mathsf{fma}\left(y, \frac{z}{\color{blue}{z - a}}, x\right) \]
        7. lower--.f6487.4

          \[\leadsto \mathsf{fma}\left(y, \frac{z}{z - \color{blue}{a}}, x\right) \]
      8. Applied rewrites87.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z}{z - a}, x\right)} \]
      9. Taylor expanded in z around 0

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

          \[\leadsto \mathsf{fma}\left(y, \frac{z}{\mathsf{neg}\left(a\right)}, x\right) \]
        2. lower-neg.f6486.2

          \[\leadsto \mathsf{fma}\left(y, \frac{z}{-a}, x\right) \]
      11. Applied rewrites86.2%

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

      if 5.0000000000000004e-19 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1.00000000000000003e40

      1. Initial program 100.0%

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

        \[\leadsto x + \color{blue}{y} \]
      4. Step-by-step derivation
        1. Applied rewrites92.3%

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

        if 1.00000000000000003e40 < (/.f64 (-.f64 z t) (-.f64 z a))

        1. Initial program 89.8%

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

          \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

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

            \[\leadsto t \cdot \frac{y}{a} + x \]
          3. *-commutativeN/A

            \[\leadsto \frac{y}{a} \cdot t + x \]
          4. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{t}, x\right) \]
          5. lower-/.f6467.4

            \[\leadsto \mathsf{fma}\left(\frac{y}{a}, t, x\right) \]
        5. Applied rewrites67.4%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, t, x\right)} \]
      5. Recombined 4 regimes into one program.
      6. Final simplification83.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z - t}{z - a} \leq -2000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 5 \cdot 10^{-19}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{-a}, x\right)\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 10^{+40}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 4: 80.3% accurate, 0.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{z - a}\\ \mathbf{if}\;t\_1 \leq -2000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-19}:\\ \;\;\;\;x - \frac{y}{a} \cdot z\\ \mathbf{elif}\;t\_1 \leq 10^{+40}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (/ (- z t) (- z a))))
         (if (<= t_1 -2000000.0)
           (fma (/ (- t) z) y x)
           (if (<= t_1 5e-19)
             (- x (* (/ y a) z))
             (if (<= t_1 1e+40) (+ x y) (fma (/ y a) t x))))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = (z - t) / (z - a);
      	double tmp;
      	if (t_1 <= -2000000.0) {
      		tmp = fma((-t / z), y, x);
      	} else if (t_1 <= 5e-19) {
      		tmp = x - ((y / a) * z);
      	} else if (t_1 <= 1e+40) {
      		tmp = x + y;
      	} else {
      		tmp = fma((y / a), t, x);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	t_1 = Float64(Float64(z - t) / Float64(z - a))
      	tmp = 0.0
      	if (t_1 <= -2000000.0)
      		tmp = fma(Float64(Float64(-t) / z), y, x);
      	elseif (t_1 <= 5e-19)
      		tmp = Float64(x - Float64(Float64(y / a) * z));
      	elseif (t_1 <= 1e+40)
      		tmp = Float64(x + y);
      	else
      		tmp = fma(Float64(y / a), t, x);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2000000.0], N[(N[((-t) / z), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t$95$1, 5e-19], N[(x - N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+40], N[(x + y), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * t + x), $MachinePrecision]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \frac{z - t}{z - a}\\
      \mathbf{if}\;t\_1 \leq -2000000:\\
      \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\
      
      \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-19}:\\
      \;\;\;\;x - \frac{y}{a} \cdot z\\
      
      \mathbf{elif}\;t\_1 \leq 10^{+40}:\\
      \;\;\;\;x + y\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -2e6

        1. Initial program 94.3%

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

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

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

            \[\leadsto y \cdot \frac{z - t}{z} + x \]
          3. *-commutativeN/A

            \[\leadsto \frac{z - t}{z} \cdot y + x \]
          4. div-subN/A

            \[\leadsto \left(\frac{z}{z} - \frac{t}{z}\right) \cdot y + x \]
          5. *-inversesN/A

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

            \[\leadsto \left(1 - 1 \cdot \frac{t}{z}\right) \cdot y + x \]
          7. metadata-evalN/A

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

            \[\leadsto \left(1 + -1 \cdot \frac{t}{z}\right) \cdot y + x \]
          9. lower-fma.f64N/A

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

            \[\leadsto \mathsf{fma}\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t}{z}, y, x\right) \]
          11. *-inversesN/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{z}{z} - \frac{t}{z}, y, x\right) \]
          14. div-subN/A

            \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
          15. lower-/.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
          16. lower--.f6463.9

            \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
        5. Applied rewrites63.9%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{z}, y, x\right)} \]
        6. Taylor expanded in z around 0

          \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot t}{z}, y, x\right) \]
        7. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(t\right)}{z}, y, x\right) \]
          2. lower-neg.f6462.5

            \[\leadsto \mathsf{fma}\left(\frac{-t}{z}, y, x\right) \]
        8. Applied rewrites62.5%

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

        if -2e6 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000004e-19

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{y \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} - 1\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

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

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

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

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

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

            \[\leadsto \left(-x\right) \cdot \left(-1 \cdot \frac{y \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} - \left(\mathsf{neg}\left(1\right)\right) \cdot -1\right) \]
          7. fp-cancel-sign-subN/A

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

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

            \[\leadsto \left(-x\right) \cdot \left(\frac{\left(-1 \cdot y\right) \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} + 1 \cdot -1\right) \]
          10. times-fracN/A

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

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

            \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-1 \cdot y}{x}, \color{blue}{\frac{z - t}{z - a}}, -1\right) \]
          13. mul-1-negN/A

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

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

            \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{\color{blue}{z} - t}{z - a}, -1\right) \]
          16. lower-/.f64N/A

            \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{\color{blue}{z - a}}, -1\right) \]
          17. lower--.f64N/A

            \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{\color{blue}{z} - a}, -1\right) \]
          18. lower--.f6490.2

            \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{z - \color{blue}{a}}, -1\right) \]
        5. Applied rewrites90.2%

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

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

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

            \[\leadsto x + \frac{y \cdot z}{z - a} \]
          3. +-commutativeN/A

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

            \[\leadsto y \cdot \frac{z}{z - a} + x \]
          5. lower-fma.f64N/A

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

            \[\leadsto \mathsf{fma}\left(y, \frac{z}{\color{blue}{z - a}}, x\right) \]
          7. lower--.f6487.4

            \[\leadsto \mathsf{fma}\left(y, \frac{z}{z - \color{blue}{a}}, x\right) \]
        8. Applied rewrites87.4%

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z}{z - a}, x\right)} \]
        9. Taylor expanded in z around 0

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

            \[\leadsto \mathsf{fma}\left(y, \frac{z}{\mathsf{neg}\left(a\right)}, x\right) \]
          2. lower-neg.f6486.2

            \[\leadsto \mathsf{fma}\left(y, \frac{z}{-a}, x\right) \]
        11. Applied rewrites86.2%

          \[\leadsto \mathsf{fma}\left(y, \frac{z}{-a}, x\right) \]
        12. Taylor expanded in z around 0

          \[\leadsto x + \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
        13. Step-by-step derivation
          1. fp-cancel-sign-sub-invN/A

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

            \[\leadsto x - 1 \cdot \frac{y \cdot z}{a} \]
          3. *-lft-identityN/A

            \[\leadsto x - \frac{y \cdot z}{a} \]
          4. lower--.f64N/A

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{y \cdot z}{a} \]
          7. distribute-lft-neg-outN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \frac{y}{a} \cdot \left(\mathsf{neg}\left(-1 \cdot z\right)\right) \]
          17. distribute-lft-neg-outN/A

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

            \[\leadsto x - \frac{y}{a} \cdot \left(1 \cdot z\right) \]
          19. *-lft-identityN/A

            \[\leadsto x - \frac{y}{a} \cdot z \]
          20. lower-*.f64N/A

            \[\leadsto x - \frac{y}{a} \cdot z \]
          21. lower-/.f6485.8

            \[\leadsto x - \frac{y}{a} \cdot z \]
        14. Applied rewrites85.8%

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

        if 5.0000000000000004e-19 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1.00000000000000003e40

        1. Initial program 100.0%

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

          \[\leadsto x + \color{blue}{y} \]
        4. Step-by-step derivation
          1. Applied rewrites92.3%

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

          if 1.00000000000000003e40 < (/.f64 (-.f64 z t) (-.f64 z a))

          1. Initial program 89.8%

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

            \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

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

              \[\leadsto t \cdot \frac{y}{a} + x \]
            3. *-commutativeN/A

              \[\leadsto \frac{y}{a} \cdot t + x \]
            4. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{t}, x\right) \]
            5. lower-/.f6467.4

              \[\leadsto \mathsf{fma}\left(\frac{y}{a}, t, x\right) \]
          5. Applied rewrites67.4%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, t, x\right)} \]
        5. Recombined 4 regimes into one program.
        6. Final simplification83.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z - t}{z - a} \leq -2000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 5 \cdot 10^{-19}:\\ \;\;\;\;x - \frac{y}{a} \cdot z\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 10^{+40}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\ \end{array} \]
        7. Add Preprocessing

        Alternative 5: 70.8% accurate, 0.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{z - a}\\ t_2 := \frac{y \cdot t}{a}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+37}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{-105}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+116}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (let* ((t_1 (/ (- z t) (- z a))) (t_2 (/ (* y t) a)))
           (if (<= t_1 -2e+37)
             t_2
             (if (<= t_1 1e-105) x (if (<= t_1 2e+116) (+ x y) t_2)))))
        double code(double x, double y, double z, double t, double a) {
        	double t_1 = (z - t) / (z - a);
        	double t_2 = (y * t) / a;
        	double tmp;
        	if (t_1 <= -2e+37) {
        		tmp = t_2;
        	} else if (t_1 <= 1e-105) {
        		tmp = x;
        	} else if (t_1 <= 2e+116) {
        		tmp = x + y;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z, t, a)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8) :: t_1
            real(8) :: t_2
            real(8) :: tmp
            t_1 = (z - t) / (z - a)
            t_2 = (y * t) / a
            if (t_1 <= (-2d+37)) then
                tmp = t_2
            else if (t_1 <= 1d-105) then
                tmp = x
            else if (t_1 <= 2d+116) then
                tmp = x + y
            else
                tmp = t_2
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a) {
        	double t_1 = (z - t) / (z - a);
        	double t_2 = (y * t) / a;
        	double tmp;
        	if (t_1 <= -2e+37) {
        		tmp = t_2;
        	} else if (t_1 <= 1e-105) {
        		tmp = x;
        	} else if (t_1 <= 2e+116) {
        		tmp = x + y;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a):
        	t_1 = (z - t) / (z - a)
        	t_2 = (y * t) / a
        	tmp = 0
        	if t_1 <= -2e+37:
        		tmp = t_2
        	elif t_1 <= 1e-105:
        		tmp = x
        	elif t_1 <= 2e+116:
        		tmp = x + y
        	else:
        		tmp = t_2
        	return tmp
        
        function code(x, y, z, t, a)
        	t_1 = Float64(Float64(z - t) / Float64(z - a))
        	t_2 = Float64(Float64(y * t) / a)
        	tmp = 0.0
        	if (t_1 <= -2e+37)
        		tmp = t_2;
        	elseif (t_1 <= 1e-105)
        		tmp = x;
        	elseif (t_1 <= 2e+116)
        		tmp = Float64(x + y);
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a)
        	t_1 = (z - t) / (z - a);
        	t_2 = (y * t) / a;
        	tmp = 0.0;
        	if (t_1 <= -2e+37)
        		tmp = t_2;
        	elseif (t_1 <= 1e-105)
        		tmp = x;
        	elseif (t_1 <= 2e+116)
        		tmp = x + y;
        	else
        		tmp = t_2;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+37], t$95$2, If[LessEqual[t$95$1, 1e-105], x, If[LessEqual[t$95$1, 2e+116], N[(x + y), $MachinePrecision], t$95$2]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{z - t}{z - a}\\
        t_2 := \frac{y \cdot t}{a}\\
        \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+37}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;t\_1 \leq 10^{-105}:\\
        \;\;\;\;x\\
        
        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+116}:\\
        \;\;\;\;x + y\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -1.99999999999999991e37 or 2.00000000000000003e116 < (/.f64 (-.f64 z t) (-.f64 z a))

          1. Initial program 90.2%

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

            \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{y \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} - 1\right)\right)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

              \[\leadsto \left(-x\right) \cdot \left(-1 \cdot \frac{y \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} - \left(\mathsf{neg}\left(1\right)\right) \cdot -1\right) \]
            7. fp-cancel-sign-subN/A

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

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

              \[\leadsto \left(-x\right) \cdot \left(\frac{\left(-1 \cdot y\right) \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} + 1 \cdot -1\right) \]
            10. times-fracN/A

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

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

              \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-1 \cdot y}{x}, \color{blue}{\frac{z - t}{z - a}}, -1\right) \]
            13. mul-1-negN/A

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

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

              \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{\color{blue}{z} - t}{z - a}, -1\right) \]
            16. lower-/.f64N/A

              \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{\color{blue}{z - a}}, -1\right) \]
            17. lower--.f64N/A

              \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{\color{blue}{z} - a}, -1\right) \]
            18. lower--.f6478.6

              \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{z - \color{blue}{a}}, -1\right) \]
          5. Applied rewrites78.6%

            \[\leadsto \color{blue}{\left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{z - a}, -1\right)} \]
          6. Taylor expanded in t around inf

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

              \[\leadsto -1 \cdot \frac{t \cdot y}{z - a} \]
            2. *-commutativeN/A

              \[\leadsto -1 \cdot \frac{t \cdot y}{z - a} \]
            3. associate-/l*N/A

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

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

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

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

              \[\leadsto \left(-t\right) \cdot \frac{\color{blue}{y}}{z - a} \]
            8. lower-/.f64N/A

              \[\leadsto \left(-t\right) \cdot \frac{y}{\color{blue}{z - a}} \]
            9. lower--.f6484.3

              \[\leadsto \left(-t\right) \cdot \frac{y}{z - \color{blue}{a}} \]
          8. Applied rewrites84.3%

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
          10. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{t \cdot y}{a} \]
            2. *-commutativeN/A

              \[\leadsto \frac{y \cdot t}{a} \]
            3. lower-*.f6446.3

              \[\leadsto \frac{y \cdot t}{a} \]
          11. Applied rewrites46.3%

            \[\leadsto \frac{y \cdot t}{\color{blue}{a}} \]

          if -1.99999999999999991e37 < (/.f64 (-.f64 z t) (-.f64 z a)) < 9.99999999999999965e-106

          1. Initial program 100.0%

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

            \[\leadsto \color{blue}{x} \]
          4. Step-by-step derivation
            1. Applied rewrites73.3%

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

            if 9.99999999999999965e-106 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2.00000000000000003e116

            1. Initial program 100.0%

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

              \[\leadsto x + \color{blue}{y} \]
            4. Step-by-step derivation
              1. Applied rewrites86.5%

                \[\leadsto x + \color{blue}{y} \]
            5. Recombined 3 regimes into one program.
            6. Final simplification75.2%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z - t}{z - a} \leq -2 \cdot 10^{+37}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 10^{-105}:\\ \;\;\;\;x\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 2 \cdot 10^{+116}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot t}{a}\\ \end{array} \]
            7. Add Preprocessing

            Alternative 6: 83.6% accurate, 0.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{z - a}\\ \mathbf{if}\;t\_1 \leq -2000000 \lor \neg \left(t\_1 \leq 10^{+17}\right):\\ \;\;\;\;\left(-y\right) \cdot \frac{t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, y, x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (let* ((t_1 (/ (- z t) (- z a))))
               (if (or (<= t_1 -2000000.0) (not (<= t_1 1e+17)))
                 (* (- y) (/ t (- z a)))
                 (fma (/ z (- z a)) y x))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = (z - t) / (z - a);
            	double tmp;
            	if ((t_1 <= -2000000.0) || !(t_1 <= 1e+17)) {
            		tmp = -y * (t / (z - a));
            	} else {
            		tmp = fma((z / (z - a)), y, x);
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a)
            	t_1 = Float64(Float64(z - t) / Float64(z - a))
            	tmp = 0.0
            	if ((t_1 <= -2000000.0) || !(t_1 <= 1e+17))
            		tmp = Float64(Float64(-y) * Float64(t / Float64(z - a)));
            	else
            		tmp = fma(Float64(z / Float64(z - a)), y, x);
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2000000.0], N[Not[LessEqual[t$95$1, 1e+17]], $MachinePrecision]], N[((-y) * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{z - t}{z - a}\\
            \mathbf{if}\;t\_1 \leq -2000000 \lor \neg \left(t\_1 \leq 10^{+17}\right):\\
            \;\;\;\;\left(-y\right) \cdot \frac{t}{z - a}\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, y, x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -2e6 or 1e17 < (/.f64 (-.f64 z t) (-.f64 z a))

              1. Initial program 92.9%

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

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

                  \[\leadsto \mathsf{neg}\left(\frac{t \cdot y}{z - a}\right) \]
                2. *-commutativeN/A

                  \[\leadsto \mathsf{neg}\left(\frac{y \cdot t}{z - a}\right) \]
                3. associate-/l*N/A

                  \[\leadsto \mathsf{neg}\left(y \cdot \frac{t}{z - a}\right) \]
                4. distribute-lft-neg-inN/A

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

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

                  \[\leadsto \left(-y\right) \cdot \frac{\color{blue}{t}}{z - a} \]
                7. lower-/.f64N/A

                  \[\leadsto \left(-y\right) \cdot \frac{t}{\color{blue}{z - a}} \]
                8. lower--.f6471.0

                  \[\leadsto \left(-y\right) \cdot \frac{t}{z - \color{blue}{a}} \]
              5. Applied rewrites71.0%

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

              if -2e6 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1e17

              1. Initial program 100.0%

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

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

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

                  \[\leadsto y \cdot \frac{z}{z - a} + x \]
                3. *-commutativeN/A

                  \[\leadsto \frac{z}{z - a} \cdot y + x \]
                4. lower-fma.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(\frac{z}{z - a}, y, x\right) \]
                6. lower--.f6493.1

                  \[\leadsto \mathsf{fma}\left(\frac{z}{z - a}, y, x\right) \]
              5. Applied rewrites93.1%

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

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

            Alternative 7: 83.1% accurate, 0.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{z - a}\\ \mathbf{if}\;t\_1 \leq -2000000:\\ \;\;\;\;\left(-y\right) \cdot \frac{t}{z - a}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+116}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) \cdot \frac{y}{z - a}\\ \end{array} \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (let* ((t_1 (/ (- z t) (- z a))))
               (if (<= t_1 -2000000.0)
                 (* (- y) (/ t (- z a)))
                 (if (<= t_1 2e+116) (fma (/ z (- z a)) y x) (* (- t) (/ y (- z a)))))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = (z - t) / (z - a);
            	double tmp;
            	if (t_1 <= -2000000.0) {
            		tmp = -y * (t / (z - a));
            	} else if (t_1 <= 2e+116) {
            		tmp = fma((z / (z - a)), y, x);
            	} else {
            		tmp = -t * (y / (z - a));
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a)
            	t_1 = Float64(Float64(z - t) / Float64(z - a))
            	tmp = 0.0
            	if (t_1 <= -2000000.0)
            		tmp = Float64(Float64(-y) * Float64(t / Float64(z - a)));
            	elseif (t_1 <= 2e+116)
            		tmp = fma(Float64(z / Float64(z - a)), y, x);
            	else
            		tmp = Float64(Float64(-t) * Float64(y / Float64(z - a)));
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2000000.0], N[((-y) * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+116], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[((-t) * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{z - t}{z - a}\\
            \mathbf{if}\;t\_1 \leq -2000000:\\
            \;\;\;\;\left(-y\right) \cdot \frac{t}{z - a}\\
            
            \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+116}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, y, x\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(-t\right) \cdot \frac{y}{z - a}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -2e6

              1. Initial program 94.3%

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

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

                  \[\leadsto \mathsf{neg}\left(\frac{t \cdot y}{z - a}\right) \]
                2. *-commutativeN/A

                  \[\leadsto \mathsf{neg}\left(\frac{y \cdot t}{z - a}\right) \]
                3. associate-/l*N/A

                  \[\leadsto \mathsf{neg}\left(y \cdot \frac{t}{z - a}\right) \]
                4. distribute-lft-neg-inN/A

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

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

                  \[\leadsto \left(-y\right) \cdot \frac{\color{blue}{t}}{z - a} \]
                7. lower-/.f64N/A

                  \[\leadsto \left(-y\right) \cdot \frac{t}{\color{blue}{z - a}} \]
                8. lower--.f6478.9

                  \[\leadsto \left(-y\right) \cdot \frac{t}{z - \color{blue}{a}} \]
              5. Applied rewrites78.9%

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

              if -2e6 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2.00000000000000003e116

              1. Initial program 100.0%

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

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

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

                  \[\leadsto y \cdot \frac{z}{z - a} + x \]
                3. *-commutativeN/A

                  \[\leadsto \frac{z}{z - a} \cdot y + x \]
                4. lower-fma.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(\frac{z}{z - a}, y, x\right) \]
                6. lower--.f6489.7

                  \[\leadsto \mathsf{fma}\left(\frac{z}{z - a}, y, x\right) \]
              5. Applied rewrites89.7%

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

              if 2.00000000000000003e116 < (/.f64 (-.f64 z t) (-.f64 z a))

              1. Initial program 83.3%

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

                \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{y \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} - 1\right)\right)} \]
              4. Step-by-step derivation
                1. associate-*r*N/A

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

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

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

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

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

                  \[\leadsto \left(-x\right) \cdot \left(-1 \cdot \frac{y \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} - \left(\mathsf{neg}\left(1\right)\right) \cdot -1\right) \]
                7. fp-cancel-sign-subN/A

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

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

                  \[\leadsto \left(-x\right) \cdot \left(\frac{\left(-1 \cdot y\right) \cdot \left(z - t\right)}{x \cdot \left(z - a\right)} + 1 \cdot -1\right) \]
                10. times-fracN/A

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

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

                  \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-1 \cdot y}{x}, \color{blue}{\frac{z - t}{z - a}}, -1\right) \]
                13. mul-1-negN/A

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

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

                  \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{\color{blue}{z} - t}{z - a}, -1\right) \]
                16. lower-/.f64N/A

                  \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{\color{blue}{z - a}}, -1\right) \]
                17. lower--.f64N/A

                  \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{\color{blue}{z} - a}, -1\right) \]
                18. lower--.f6472.7

                  \[\leadsto \left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{z - \color{blue}{a}}, -1\right) \]
              5. Applied rewrites72.7%

                \[\leadsto \color{blue}{\left(-x\right) \cdot \mathsf{fma}\left(\frac{-y}{x}, \frac{z - t}{z - a}, -1\right)} \]
              6. Taylor expanded in t around inf

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

                  \[\leadsto -1 \cdot \frac{t \cdot y}{z - a} \]
                2. *-commutativeN/A

                  \[\leadsto -1 \cdot \frac{t \cdot y}{z - a} \]
                3. associate-/l*N/A

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

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

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

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

                  \[\leadsto \left(-t\right) \cdot \frac{\color{blue}{y}}{z - a} \]
                8. lower-/.f64N/A

                  \[\leadsto \left(-t\right) \cdot \frac{y}{\color{blue}{z - a}} \]
                9. lower--.f6489.1

                  \[\leadsto \left(-t\right) \cdot \frac{y}{z - \color{blue}{a}} \]
              8. Applied rewrites89.1%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z - t}{z - a} \leq -2000000:\\ \;\;\;\;\left(-y\right) \cdot \frac{t}{z - a}\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 2 \cdot 10^{+116}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-t\right) \cdot \frac{y}{z - a}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 8: 81.2% accurate, 0.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{z - a}\\ \mathbf{if}\;t\_1 \leq -2000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (let* ((t_1 (/ (- z t) (- z a))))
               (if (<= t_1 -2000000.0)
                 (fma (/ (- t) z) y x)
                 (if (<= t_1 1e+40) (fma (/ z (- z a)) y x) (fma (/ y a) t x)))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = (z - t) / (z - a);
            	double tmp;
            	if (t_1 <= -2000000.0) {
            		tmp = fma((-t / z), y, x);
            	} else if (t_1 <= 1e+40) {
            		tmp = fma((z / (z - a)), y, x);
            	} else {
            		tmp = fma((y / a), t, x);
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a)
            	t_1 = Float64(Float64(z - t) / Float64(z - a))
            	tmp = 0.0
            	if (t_1 <= -2000000.0)
            		tmp = fma(Float64(Float64(-t) / z), y, x);
            	elseif (t_1 <= 1e+40)
            		tmp = fma(Float64(z / Float64(z - a)), y, x);
            	else
            		tmp = fma(Float64(y / a), t, x);
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2000000.0], N[(N[((-t) / z), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t$95$1, 1e+40], N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * t + x), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{z - t}{z - a}\\
            \mathbf{if}\;t\_1 \leq -2000000:\\
            \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\
            
            \mathbf{elif}\;t\_1 \leq 10^{+40}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, y, x\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -2e6

              1. Initial program 94.3%

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

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

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

                  \[\leadsto y \cdot \frac{z - t}{z} + x \]
                3. *-commutativeN/A

                  \[\leadsto \frac{z - t}{z} \cdot y + x \]
                4. div-subN/A

                  \[\leadsto \left(\frac{z}{z} - \frac{t}{z}\right) \cdot y + x \]
                5. *-inversesN/A

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

                  \[\leadsto \left(1 - 1 \cdot \frac{t}{z}\right) \cdot y + x \]
                7. metadata-evalN/A

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

                  \[\leadsto \left(1 + -1 \cdot \frac{t}{z}\right) \cdot y + x \]
                9. lower-fma.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t}{z}, y, x\right) \]
                11. *-inversesN/A

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{z}{z} - \frac{t}{z}, y, x\right) \]
                14. div-subN/A

                  \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
                15. lower-/.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
                16. lower--.f6463.9

                  \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
              5. Applied rewrites63.9%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{z}, y, x\right)} \]
              6. Taylor expanded in z around 0

                \[\leadsto \mathsf{fma}\left(\frac{-1 \cdot t}{z}, y, x\right) \]
              7. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \mathsf{fma}\left(\frac{\mathsf{neg}\left(t\right)}{z}, y, x\right) \]
                2. lower-neg.f6462.5

                  \[\leadsto \mathsf{fma}\left(\frac{-t}{z}, y, x\right) \]
              8. Applied rewrites62.5%

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

              if -2e6 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1.00000000000000003e40

              1. Initial program 100.0%

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

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

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

                  \[\leadsto y \cdot \frac{z}{z - a} + x \]
                3. *-commutativeN/A

                  \[\leadsto \frac{z}{z - a} \cdot y + x \]
                4. lower-fma.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(\frac{z}{z - a}, y, x\right) \]
                6. lower--.f6491.3

                  \[\leadsto \mathsf{fma}\left(\frac{z}{z - a}, y, x\right) \]
              5. Applied rewrites91.3%

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

              if 1.00000000000000003e40 < (/.f64 (-.f64 z t) (-.f64 z a))

              1. Initial program 89.8%

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

                \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
              4. Step-by-step derivation
                1. +-commutativeN/A

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

                  \[\leadsto t \cdot \frac{y}{a} + x \]
                3. *-commutativeN/A

                  \[\leadsto \frac{y}{a} \cdot t + x \]
                4. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{t}, x\right) \]
                5. lower-/.f6467.4

                  \[\leadsto \mathsf{fma}\left(\frac{y}{a}, t, x\right) \]
              5. Applied rewrites67.4%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, t, x\right)} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification84.8%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z - t}{z - a} \leq -2000000:\\ \;\;\;\;\mathsf{fma}\left(\frac{-t}{z}, y, x\right)\\ \mathbf{elif}\;\frac{z - t}{z - a} \leq 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 9: 80.7% accurate, 0.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{z - a}\\ \mathbf{if}\;t\_1 \leq 4 \cdot 10^{-11} \lor \neg \left(t\_1 \leq 10^{+40}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (let* ((t_1 (/ (- z t) (- z a))))
               (if (or (<= t_1 4e-11) (not (<= t_1 1e+40))) (fma (/ y a) t x) (+ x y))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = (z - t) / (z - a);
            	double tmp;
            	if ((t_1 <= 4e-11) || !(t_1 <= 1e+40)) {
            		tmp = fma((y / a), t, x);
            	} else {
            		tmp = x + y;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a)
            	t_1 = Float64(Float64(z - t) / Float64(z - a))
            	tmp = 0.0
            	if ((t_1 <= 4e-11) || !(t_1 <= 1e+40))
            		tmp = fma(Float64(y / a), t, x);
            	else
            		tmp = Float64(x + y);
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, 4e-11], N[Not[LessEqual[t$95$1, 1e+40]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * t + x), $MachinePrecision], N[(x + y), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{z - t}{z - a}\\
            \mathbf{if}\;t\_1 \leq 4 \cdot 10^{-11} \lor \neg \left(t\_1 \leq 10^{+40}\right):\\
            \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t, x\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;x + y\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 (-.f64 z t) (-.f64 z a)) < 3.99999999999999976e-11 or 1.00000000000000003e40 < (/.f64 (-.f64 z t) (-.f64 z a))

              1. Initial program 96.6%

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

                \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
              4. Step-by-step derivation
                1. +-commutativeN/A

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

                  \[\leadsto t \cdot \frac{y}{a} + x \]
                3. *-commutativeN/A

                  \[\leadsto \frac{y}{a} \cdot t + x \]
                4. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(\frac{y}{a}, \color{blue}{t}, x\right) \]
                5. lower-/.f6470.2

                  \[\leadsto \mathsf{fma}\left(\frac{y}{a}, t, x\right) \]
              5. Applied rewrites70.2%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{a}, t, x\right)} \]

              if 3.99999999999999976e-11 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1.00000000000000003e40

              1. Initial program 100.0%

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

                \[\leadsto x + \color{blue}{y} \]
              4. Step-by-step derivation
                1. Applied rewrites93.8%

                  \[\leadsto x + \color{blue}{y} \]
              5. Recombined 2 regimes into one program.
              6. Final simplification80.5%

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

              Alternative 10: 82.0% accurate, 0.8× speedup?

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

                1. Initial program 99.9%

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

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

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

                    \[\leadsto y \cdot \frac{z}{z - a} + x \]
                  3. *-commutativeN/A

                    \[\leadsto \frac{z}{z - a} \cdot y + x \]
                  4. lower-fma.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(\frac{z}{z - a}, y, x\right) \]
                  6. lower--.f6490.5

                    \[\leadsto \mathsf{fma}\left(\frac{z}{z - a}, y, x\right) \]
                5. Applied rewrites90.5%

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

                if -1.02000000000000002e-53 < z < 310

                1. Initial program 95.5%

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

                  \[\leadsto x + y \cdot \color{blue}{\frac{t}{a}} \]
                4. Step-by-step derivation
                  1. lower-/.f6478.0

                    \[\leadsto x + y \cdot \frac{t}{\color{blue}{a}} \]
                5. Applied rewrites78.0%

                  \[\leadsto x + y \cdot \color{blue}{\frac{t}{a}} \]

                if 310 < z

                1. Initial program 100.0%

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

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

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

                    \[\leadsto y \cdot \frac{z - t}{z} + x \]
                  3. *-commutativeN/A

                    \[\leadsto \frac{z - t}{z} \cdot y + x \]
                  4. div-subN/A

                    \[\leadsto \left(\frac{z}{z} - \frac{t}{z}\right) \cdot y + x \]
                  5. *-inversesN/A

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

                    \[\leadsto \left(1 - 1 \cdot \frac{t}{z}\right) \cdot y + x \]
                  7. metadata-evalN/A

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

                    \[\leadsto \left(1 + -1 \cdot \frac{t}{z}\right) \cdot y + x \]
                  9. lower-fma.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t}{z}, y, x\right) \]
                  11. *-inversesN/A

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{z}{z} - \frac{t}{z}, y, x\right) \]
                  14. div-subN/A

                    \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
                  15. lower-/.f64N/A

                    \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
                  16. lower--.f6489.6

                    \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
                5. Applied rewrites89.6%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.02 \cdot 10^{-53}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{z - a}, y, x\right)\\ \mathbf{elif}\;z \leq 310:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{z}, y, x\right)\\ \end{array} \]
              5. Add Preprocessing

              Alternative 11: 66.7% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{z - t}{z - a} \leq 3.6 \cdot 10^{-75}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (if (<= (/ (- z t) (- z a)) 3.6e-75) x (+ x y)))
              double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (((z - t) / (z - a)) <= 3.6e-75) {
              		tmp = x;
              	} else {
              		tmp = x + y;
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t, a)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8) :: tmp
                  if (((z - t) / (z - a)) <= 3.6d-75) then
                      tmp = x
                  else
                      tmp = x + y
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (((z - t) / (z - a)) <= 3.6e-75) {
              		tmp = x;
              	} else {
              		tmp = x + y;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	tmp = 0
              	if ((z - t) / (z - a)) <= 3.6e-75:
              		tmp = x
              	else:
              		tmp = x + y
              	return tmp
              
              function code(x, y, z, t, a)
              	tmp = 0.0
              	if (Float64(Float64(z - t) / Float64(z - a)) <= 3.6e-75)
              		tmp = x;
              	else
              		tmp = Float64(x + y);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	tmp = 0.0;
              	if (((z - t) / (z - a)) <= 3.6e-75)
              		tmp = x;
              	else
              		tmp = x + y;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], 3.6e-75], x, N[(x + y), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;\frac{z - t}{z - a} \leq 3.6 \cdot 10^{-75}:\\
              \;\;\;\;x\\
              
              \mathbf{else}:\\
              \;\;\;\;x + y\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (/.f64 (-.f64 z t) (-.f64 z a)) < 3.6e-75

                1. Initial program 98.0%

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

                  \[\leadsto \color{blue}{x} \]
                4. Step-by-step derivation
                  1. Applied rewrites56.3%

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

                  if 3.6e-75 < (/.f64 (-.f64 z t) (-.f64 z a))

                  1. Initial program 98.1%

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

                    \[\leadsto x + \color{blue}{y} \]
                  4. Step-by-step derivation
                    1. Applied rewrites78.2%

                      \[\leadsto x + \color{blue}{y} \]
                  5. Recombined 2 regimes into one program.
                  6. Final simplification69.4%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{z - t}{z - a} \leq 3.6 \cdot 10^{-75}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 12: 53.5% accurate, 2.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+125} \lor \neg \left(y \leq 7.2 \cdot 10^{+201}\right):\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (if (or (<= y -3.2e+125) (not (<= y 7.2e+201))) y x))
                  double code(double x, double y, double z, double t, double a) {
                  	double tmp;
                  	if ((y <= -3.2e+125) || !(y <= 7.2e+201)) {
                  		tmp = y;
                  	} else {
                  		tmp = x;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8) :: tmp
                      if ((y <= (-3.2d+125)) .or. (.not. (y <= 7.2d+201))) then
                          tmp = y
                      else
                          tmp = x
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a) {
                  	double tmp;
                  	if ((y <= -3.2e+125) || !(y <= 7.2e+201)) {
                  		tmp = y;
                  	} else {
                  		tmp = x;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a):
                  	tmp = 0
                  	if (y <= -3.2e+125) or not (y <= 7.2e+201):
                  		tmp = y
                  	else:
                  		tmp = x
                  	return tmp
                  
                  function code(x, y, z, t, a)
                  	tmp = 0.0
                  	if ((y <= -3.2e+125) || !(y <= 7.2e+201))
                  		tmp = y;
                  	else
                  		tmp = x;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a)
                  	tmp = 0.0;
                  	if ((y <= -3.2e+125) || ~((y <= 7.2e+201)))
                  		tmp = y;
                  	else
                  		tmp = x;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.2e+125], N[Not[LessEqual[y, 7.2e+201]], $MachinePrecision]], y, x]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;y \leq -3.2 \cdot 10^{+125} \lor \neg \left(y \leq 7.2 \cdot 10^{+201}\right):\\
                  \;\;\;\;y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if y < -3.19999999999999983e125 or 7.19999999999999951e201 < y

                    1. Initial program 100.0%

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

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

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

                        \[\leadsto y \cdot \frac{z - t}{z} + x \]
                      3. *-commutativeN/A

                        \[\leadsto \frac{z - t}{z} \cdot y + x \]
                      4. div-subN/A

                        \[\leadsto \left(\frac{z}{z} - \frac{t}{z}\right) \cdot y + x \]
                      5. *-inversesN/A

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

                        \[\leadsto \left(1 - 1 \cdot \frac{t}{z}\right) \cdot y + x \]
                      7. metadata-evalN/A

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

                        \[\leadsto \left(1 + -1 \cdot \frac{t}{z}\right) \cdot y + x \]
                      9. lower-fma.f64N/A

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

                        \[\leadsto \mathsf{fma}\left(1 - \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{t}{z}, y, x\right) \]
                      11. *-inversesN/A

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{z}{z} - \frac{t}{z}, y, x\right) \]
                      14. div-subN/A

                        \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
                      15. lower-/.f64N/A

                        \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
                      16. lower--.f6470.8

                        \[\leadsto \mathsf{fma}\left(\frac{z - t}{z}, y, x\right) \]
                    5. Applied rewrites70.8%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{z}, y, x\right)} \]
                    6. Taylor expanded in x around 0

                      \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{z}} \]
                    7. Step-by-step derivation
                      1. associate-/l*N/A

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

                        \[\leadsto \frac{z - t}{z} \cdot y \]
                      3. lower-*.f64N/A

                        \[\leadsto \frac{z - t}{z} \cdot y \]
                      4. lower-/.f64N/A

                        \[\leadsto \frac{z - t}{z} \cdot y \]
                      5. lower--.f6466.1

                        \[\leadsto \frac{z - t}{z} \cdot y \]
                    8. Applied rewrites66.1%

                      \[\leadsto \frac{z - t}{z} \cdot \color{blue}{y} \]
                    9. Taylor expanded in z around inf

                      \[\leadsto y \]
                    10. Step-by-step derivation
                      1. Applied rewrites43.2%

                        \[\leadsto y \]

                      if -3.19999999999999983e125 < y < 7.19999999999999951e201

                      1. Initial program 97.5%

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

                        \[\leadsto \color{blue}{x} \]
                      4. Step-by-step derivation
                        1. Applied rewrites64.5%

                          \[\leadsto \color{blue}{x} \]
                      5. Recombined 2 regimes into one program.
                      6. Final simplification59.5%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+125} \lor \neg \left(y \leq 7.2 \cdot 10^{+201}\right):\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                      7. Add Preprocessing

                      Alternative 13: 50.7% accurate, 26.0× speedup?

                      \[\begin{array}{l} \\ x \end{array} \]
                      (FPCore (x y z t a) :precision binary64 x)
                      double code(double x, double y, double z, double t, double a) {
                      	return x;
                      }
                      
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z, t, a)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          code = x
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a) {
                      	return x;
                      }
                      
                      def code(x, y, z, t, a):
                      	return x
                      
                      function code(x, y, z, t, a)
                      	return x
                      end
                      
                      function tmp = code(x, y, z, t, a)
                      	tmp = x;
                      end
                      
                      code[x_, y_, z_, t_, a_] := x
                      
                      \begin{array}{l}
                      
                      \\
                      x
                      \end{array}
                      
                      Derivation
                      1. Initial program 98.1%

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

                        \[\leadsto \color{blue}{x} \]
                      4. Step-by-step derivation
                        1. Applied rewrites52.0%

                          \[\leadsto \color{blue}{x} \]
                        2. Final simplification52.0%

                          \[\leadsto x \]
                        3. Add Preprocessing

                        Developer Target 1: 98.4% accurate, 0.8× speedup?

                        \[\begin{array}{l} \\ x + \frac{y}{\frac{z - a}{z - t}} \end{array} \]
                        (FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
                        double code(double x, double y, double z, double t, double a) {
                        	return x + (y / ((z - a) / (z - t)));
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(x, y, z, t, a)
                        use fmin_fmax_functions
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8), intent (in) :: a
                            code = x + (y / ((z - a) / (z - t)))
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a) {
                        	return x + (y / ((z - a) / (z - t)));
                        }
                        
                        def code(x, y, z, t, a):
                        	return x + (y / ((z - a) / (z - t)))
                        
                        function code(x, y, z, t, a)
                        	return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t))))
                        end
                        
                        function tmp = code(x, y, z, t, a)
                        	tmp = x + (y / ((z - a) / (z - t)));
                        end
                        
                        code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        x + \frac{y}{\frac{z - a}{z - t}}
                        \end{array}
                        

                        Reproduce

                        ?
                        herbie shell --seed 2025026 
                        (FPCore (x y z t a)
                          :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
                          :precision binary64
                        
                          :alt
                          (! :herbie-platform default (+ x (/ y (/ (- z a) (- z t)))))
                        
                          (+ x (* y (/ (- z t) (- z a)))))