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

Percentage Accurate: 98.1% → 98.7%
Time: 3.6s
Alternatives: 14
Speedup: 0.6×

Specification

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

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

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 14 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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 98.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{a - t}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- z t) (- a t))))
   (if (<= t_1 (- INFINITY)) (* z (/ y (- a t))) (+ x (* y t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) / (a - t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = z * (y / (a - t));
	} else {
		tmp = x + (y * t_1);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) / (a - t);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = z * (y / (a - t));
	} else {
		tmp = x + (y * t_1);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z - t) / (a - t)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = z * (y / (a - t))
	else:
		tmp = x + (y * t_1)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z - t) / Float64(a - t))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(z * Float64(y / Float64(a - t)));
	else
		tmp = Float64(x + Float64(y * t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z - t) / (a - t);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = z * (y / (a - t));
	else
		tmp = x + (y * t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\

\mathbf{else}:\\
\;\;\;\;x + y \cdot t\_1\\


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

    1. Initial program 59.9%

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

        \[\leadsto \frac{\left(z - t\right) \cdot y}{a - t} \]
      5. lift--.f6491.1

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

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

      \[\leadsto \frac{\left(-1 \cdot t\right) \cdot y}{a - t} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(t\right)\right) \cdot y}{a - t} \]
      2. lower-neg.f641.8

        \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
    7. Applied rewrites1.8%

      \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
    8. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto \frac{\left(-t\right) \cdot y}{\color{blue}{a - t}} \]
      3. lift-*.f64N/A

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

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

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

        \[\leadsto \left(-t\right) \cdot \frac{y}{\color{blue}{a - t}} \]
      7. lift--.f6411.5

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

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

      \[\leadsto z \cdot \frac{\color{blue}{y}}{a - t} \]
    11. Step-by-step derivation
      1. Applied rewrites91.1%

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

      if -inf.0 < (/.f64 (-.f64 z t) (-.f64 a t))

      1. Initial program 98.8%

        \[x + y \cdot \frac{z - t}{a - t} \]
    12. Recombined 2 regimes into one program.
    13. Add Preprocessing

    Alternative 2: 96.8% accurate, 0.2× speedup?

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

      1. Initial program 59.9%

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

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

          \[\leadsto \frac{\left(z - t\right) \cdot y}{a - t} \]
        5. lift--.f6491.1

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

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

        \[\leadsto \frac{\left(-1 \cdot t\right) \cdot y}{a - t} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \frac{\left(\mathsf{neg}\left(t\right)\right) \cdot y}{a - t} \]
        2. lower-neg.f641.8

          \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
      7. Applied rewrites1.8%

        \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
      8. Step-by-step derivation
        1. lift--.f64N/A

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

          \[\leadsto \frac{\left(-t\right) \cdot y}{\color{blue}{a - t}} \]
        3. lift-*.f64N/A

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

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

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

          \[\leadsto \left(-t\right) \cdot \frac{y}{\color{blue}{a - t}} \]
        7. lift--.f6411.5

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

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

        \[\leadsto z \cdot \frac{\color{blue}{y}}{a - t} \]
      11. Step-by-step derivation
        1. Applied rewrites91.1%

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

        if -inf.0 < (/.f64 (-.f64 z t) (-.f64 a t)) < -5e16 or 1 < (/.f64 (-.f64 z t) (-.f64 a t))

        1. Initial program 97.4%

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

          \[\leadsto x + y \cdot \frac{\color{blue}{z}}{a - t} \]
        3. Step-by-step derivation
          1. Applied rewrites95.1%

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

          if -5e16 < (/.f64 (-.f64 z t) (-.f64 a t)) < 3.99999999999999963e-21

          1. Initial program 99.1%

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

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

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

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

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

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

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

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

          if 3.99999999999999963e-21 < (/.f64 (-.f64 z t) (-.f64 a t)) < 1

          1. Initial program 100.0%

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

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

              \[\leadsto x + y \cdot \frac{\mathsf{neg}\left(t\right)}{a - t} \]
            2. lower-neg.f6498.5

              \[\leadsto x + y \cdot \frac{-t}{a - t} \]
          4. Applied rewrites98.5%

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

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

              \[\leadsto \color{blue}{y \cdot \frac{-t}{a - t} + x} \]
            3. lift-*.f64N/A

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

              \[\leadsto \color{blue}{\frac{-t}{a - t} \cdot y} + x \]
            5. lower-fma.f6498.5

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

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

        Alternative 3: 96.4% accurate, 0.2× speedup?

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

          1. Initial program 59.9%

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

            \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

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

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

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

              \[\leadsto \frac{\left(z - t\right) \cdot y}{a - t} \]
            5. lift--.f6491.1

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

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

            \[\leadsto \frac{\left(-1 \cdot t\right) \cdot y}{a - t} \]
          6. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \frac{\left(\mathsf{neg}\left(t\right)\right) \cdot y}{a - t} \]
            2. lower-neg.f641.8

              \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
          7. Applied rewrites1.8%

            \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
          8. Step-by-step derivation
            1. lift--.f64N/A

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

              \[\leadsto \frac{\left(-t\right) \cdot y}{\color{blue}{a - t}} \]
            3. lift-*.f64N/A

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

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

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

              \[\leadsto \left(-t\right) \cdot \frac{y}{\color{blue}{a - t}} \]
            7. lift--.f6411.5

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

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

            \[\leadsto z \cdot \frac{\color{blue}{y}}{a - t} \]
          11. Step-by-step derivation
            1. Applied rewrites91.1%

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

            if -inf.0 < (/.f64 (-.f64 z t) (-.f64 a t)) < -5e16 or 1 < (/.f64 (-.f64 z t) (-.f64 a t))

            1. Initial program 97.4%

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

              \[\leadsto x + y \cdot \frac{\color{blue}{z}}{a - t} \]
            3. Step-by-step derivation
              1. Applied rewrites95.1%

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

              if -5e16 < (/.f64 (-.f64 z t) (-.f64 a t)) < 3.9999999999999999e-19

              1. Initial program 99.1%

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

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

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

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

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

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

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

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

              if 3.9999999999999999e-19 < (/.f64 (-.f64 z t) (-.f64 a t)) < 1

              1. Initial program 100.0%

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

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

                  \[\leadsto x + \color{blue}{y} \]
              4. Recombined 4 regimes into one program.
              5. Add Preprocessing

              Alternative 4: 87.5% accurate, 0.3× speedup?

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

                1. Initial program 85.1%

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

                  \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

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

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

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

                    \[\leadsto \frac{\left(z - t\right) \cdot y}{a - t} \]
                  5. lift--.f6484.8

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

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

                  \[\leadsto \frac{\left(-1 \cdot t\right) \cdot y}{a - t} \]
                6. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \frac{\left(\mathsf{neg}\left(t\right)\right) \cdot y}{a - t} \]
                  2. lower-neg.f641.8

                    \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
                7. Applied rewrites1.8%

                  \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
                8. Step-by-step derivation
                  1. lift--.f64N/A

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

                    \[\leadsto \frac{\left(-t\right) \cdot y}{\color{blue}{a - t}} \]
                  3. lift-*.f64N/A

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

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

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

                    \[\leadsto \left(-t\right) \cdot \frac{y}{\color{blue}{a - t}} \]
                  7. lift--.f646.9

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

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

                  \[\leadsto z \cdot \frac{\color{blue}{y}}{a - t} \]
                11. Step-by-step derivation
                  1. Applied rewrites85.0%

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

                  if -5.00000000000000009e197 < (/.f64 (-.f64 z t) (-.f64 a t)) < 3.9999999999999999e-19

                  1. Initial program 99.2%

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(y, \frac{z - t}{\color{blue}{a}}, x\right) \]
                    5. lift--.f6489.7

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

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

                  if 3.9999999999999999e-19 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2.5e15

                  1. Initial program 100.0%

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

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

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

                    if 2.5e15 < (/.f64 (-.f64 z t) (-.f64 a t))

                    1. Initial program 95.0%

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

                      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
                    3. Step-by-step derivation
                      1. lower-/.f64N/A

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

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

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

                        \[\leadsto \frac{\left(z - t\right) \cdot y}{a - t} \]
                      5. lift--.f6462.5

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(z - t\right) \cdot \color{blue}{\frac{y}{a - t}} \]
                  4. Recombined 4 regimes into one program.
                  5. Add Preprocessing

                  Alternative 5: 87.5% accurate, 0.3× speedup?

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

                    1. Initial program 92.5%

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

                      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
                    3. Step-by-step derivation
                      1. lower-/.f64N/A

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

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

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

                        \[\leadsto \frac{\left(z - t\right) \cdot y}{a - t} \]
                      5. lift--.f6468.1

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

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

                      \[\leadsto \frac{\left(-1 \cdot t\right) \cdot y}{a - t} \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto \frac{\left(\mathsf{neg}\left(t\right)\right) \cdot y}{a - t} \]
                      2. lower-neg.f645.0

                        \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
                    7. Applied rewrites5.0%

                      \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
                    8. Step-by-step derivation
                      1. lift--.f64N/A

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

                        \[\leadsto \frac{\left(-t\right) \cdot y}{\color{blue}{a - t}} \]
                      3. lift-*.f64N/A

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

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

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

                        \[\leadsto \left(-t\right) \cdot \frac{y}{\color{blue}{a - t}} \]
                      7. lift--.f647.6

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

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

                      \[\leadsto z \cdot \frac{\color{blue}{y}}{a - t} \]
                    11. Step-by-step derivation
                      1. Applied rewrites70.6%

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

                      if -5.00000000000000009e197 < (/.f64 (-.f64 z t) (-.f64 a t)) < 3.9999999999999999e-19

                      1. Initial program 99.2%

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(y, \frac{z - t}{\color{blue}{a}}, x\right) \]
                        5. lift--.f6489.7

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

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

                      if 3.9999999999999999e-19 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2.5e15

                      1. Initial program 100.0%

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

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

                          \[\leadsto x + \color{blue}{y} \]
                      4. Recombined 3 regimes into one program.
                      5. Add Preprocessing

                      Alternative 6: 83.2% accurate, 0.3× speedup?

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

                        1. Initial program 92.5%

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

                          \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
                        3. Step-by-step derivation
                          1. lower-/.f64N/A

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

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

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

                            \[\leadsto \frac{\left(z - t\right) \cdot y}{a - t} \]
                          5. lift--.f6468.1

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

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

                          \[\leadsto \frac{\left(-1 \cdot t\right) \cdot y}{a - t} \]
                        6. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto \frac{\left(\mathsf{neg}\left(t\right)\right) \cdot y}{a - t} \]
                          2. lower-neg.f645.0

                            \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
                        7. Applied rewrites5.0%

                          \[\leadsto \frac{\left(-t\right) \cdot y}{a - t} \]
                        8. Step-by-step derivation
                          1. lift--.f64N/A

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

                            \[\leadsto \frac{\left(-t\right) \cdot y}{\color{blue}{a - t}} \]
                          3. lift-*.f64N/A

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

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

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

                            \[\leadsto \left(-t\right) \cdot \frac{y}{\color{blue}{a - t}} \]
                          7. lift--.f647.6

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

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

                          \[\leadsto z \cdot \frac{\color{blue}{y}}{a - t} \]
                        11. Step-by-step derivation
                          1. Applied rewrites70.6%

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

                          if -5.00000000000000009e197 < (/.f64 (-.f64 z t) (-.f64 a t)) < 3.99999999999999963e-21

                          1. Initial program 99.2%

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

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

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

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

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

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

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

                          if 3.99999999999999963e-21 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2.5e15

                          1. Initial program 100.0%

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

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

                              \[\leadsto x + \color{blue}{y} \]
                          4. Recombined 3 regimes into one program.
                          5. Add Preprocessing

                          Alternative 7: 82.5% accurate, 0.3× speedup?

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

                            1. Initial program 92.5%

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

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

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

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

                                \[\leadsto y \cdot \frac{z}{\color{blue}{a - t}} \]
                              4. lift--.f6467.6

                                \[\leadsto y \cdot \frac{z}{a - \color{blue}{t}} \]
                            4. Applied rewrites67.6%

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

                            if -5.00000000000000009e197 < (/.f64 (-.f64 z t) (-.f64 a t)) < 3.99999999999999963e-21

                            1. Initial program 99.2%

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

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

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

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

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

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

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

                            if 3.99999999999999963e-21 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2.5e15

                            1. Initial program 100.0%

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

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

                                \[\leadsto x + \color{blue}{y} \]
                            4. Recombined 3 regimes into one program.
                            5. Add Preprocessing

                            Alternative 8: 80.7% accurate, 0.3× speedup?

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

                              1. Initial program 81.9%

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

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

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

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

                                  \[\leadsto y \cdot \frac{z}{\color{blue}{a - t}} \]
                                4. lift--.f6473.2

                                  \[\leadsto y \cdot \frac{z}{a - \color{blue}{t}} \]
                              4. Applied rewrites73.2%

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

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

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

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

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

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

                                  \[\leadsto \frac{\left(\mathsf{neg}\left(y\right)\right) \cdot z}{t} \]
                                6. lower-neg.f6451.0

                                  \[\leadsto \frac{\left(-y\right) \cdot z}{t} \]
                              7. Applied rewrites51.0%

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

                              if -1.99999999999999994e224 < (/.f64 (-.f64 z t) (-.f64 a t)) < 3.99999999999999963e-21 or 5e21 < (/.f64 (-.f64 z t) (-.f64 a t))

                              1. Initial program 98.1%

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

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

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

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

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

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

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

                              if 3.99999999999999963e-21 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5e21

                              1. Initial program 100.0%

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

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

                                  \[\leadsto x + \color{blue}{y} \]
                              4. Recombined 3 regimes into one program.
                              5. Add Preprocessing

                              Alternative 9: 70.6% accurate, 0.3× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{a - t}\\ t_2 := \frac{\left(-y\right) \cdot z}{t}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+197}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-91}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 10^{+143}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                              (FPCore (x y z t a)
                               :precision binary64
                               (let* ((t_1 (/ (- z t) (- a t))) (t_2 (/ (* (- y) z) t)))
                                 (if (<= t_1 -5e+197)
                                   t_2
                                   (if (<= t_1 2e-91) x (if (<= t_1 1e+143) (+ x y) t_2)))))
                              double code(double x, double y, double z, double t, double a) {
                              	double t_1 = (z - t) / (a - t);
                              	double t_2 = (-y * z) / t;
                              	double tmp;
                              	if (t_1 <= -5e+197) {
                              		tmp = t_2;
                              	} else if (t_1 <= 2e-91) {
                              		tmp = x;
                              	} else if (t_1 <= 1e+143) {
                              		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) / (a - t)
                                  t_2 = (-y * z) / t
                                  if (t_1 <= (-5d+197)) then
                                      tmp = t_2
                                  else if (t_1 <= 2d-91) then
                                      tmp = x
                                  else if (t_1 <= 1d+143) 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) / (a - t);
                              	double t_2 = (-y * z) / t;
                              	double tmp;
                              	if (t_1 <= -5e+197) {
                              		tmp = t_2;
                              	} else if (t_1 <= 2e-91) {
                              		tmp = x;
                              	} else if (t_1 <= 1e+143) {
                              		tmp = x + y;
                              	} else {
                              		tmp = t_2;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a):
                              	t_1 = (z - t) / (a - t)
                              	t_2 = (-y * z) / t
                              	tmp = 0
                              	if t_1 <= -5e+197:
                              		tmp = t_2
                              	elif t_1 <= 2e-91:
                              		tmp = x
                              	elif t_1 <= 1e+143:
                              		tmp = x + y
                              	else:
                              		tmp = t_2
                              	return tmp
                              
                              function code(x, y, z, t, a)
                              	t_1 = Float64(Float64(z - t) / Float64(a - t))
                              	t_2 = Float64(Float64(Float64(-y) * z) / t)
                              	tmp = 0.0
                              	if (t_1 <= -5e+197)
                              		tmp = t_2;
                              	elseif (t_1 <= 2e-91)
                              		tmp = x;
                              	elseif (t_1 <= 1e+143)
                              		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) / (a - t);
                              	t_2 = (-y * z) / t;
                              	tmp = 0.0;
                              	if (t_1 <= -5e+197)
                              		tmp = t_2;
                              	elseif (t_1 <= 2e-91)
                              		tmp = x;
                              	elseif (t_1 <= 1e+143)
                              		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[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-y) * z), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+197], t$95$2, If[LessEqual[t$95$1, 2e-91], x, If[LessEqual[t$95$1, 1e+143], N[(x + y), $MachinePrecision], t$95$2]]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_1 := \frac{z - t}{a - t}\\
                              t_2 := \frac{\left(-y\right) \cdot z}{t}\\
                              \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+197}:\\
                              \;\;\;\;t\_2\\
                              
                              \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-91}:\\
                              \;\;\;\;x\\
                              
                              \mathbf{elif}\;t\_1 \leq 10^{+143}:\\
                              \;\;\;\;x + y\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_2\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if (/.f64 (-.f64 z t) (-.f64 a t)) < -5.00000000000000009e197 or 1e143 < (/.f64 (-.f64 z t) (-.f64 a t))

                                1. Initial program 88.2%

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

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

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

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

                                    \[\leadsto y \cdot \frac{z}{\color{blue}{a - t}} \]
                                  4. lift--.f6473.8

                                    \[\leadsto y \cdot \frac{z}{a - \color{blue}{t}} \]
                                4. Applied rewrites73.8%

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

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

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

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

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

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

                                    \[\leadsto \frac{\left(\mathsf{neg}\left(y\right)\right) \cdot z}{t} \]
                                  6. lower-neg.f6449.1

                                    \[\leadsto \frac{\left(-y\right) \cdot z}{t} \]
                                7. Applied rewrites49.1%

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

                                if -5.00000000000000009e197 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2.00000000000000004e-91

                                1. Initial program 99.1%

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

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

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

                                  if 2.00000000000000004e-91 < (/.f64 (-.f64 z t) (-.f64 a t)) < 1e143

                                  1. Initial program 99.9%

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

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

                                      \[\leadsto x + \color{blue}{y} \]
                                  4. Recombined 3 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 10: 70.5% accurate, 0.3× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{a - t}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+164}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-91}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+23}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a)
                                   :precision binary64
                                   (let* ((t_1 (/ (- z t) (- a t))))
                                     (if (<= t_1 -5e+164)
                                       (/ (* y z) a)
                                       (if (<= t_1 2e-91) x (if (<= t_1 5e+23) (+ x y) (* y (/ z a)))))))
                                  double code(double x, double y, double z, double t, double a) {
                                  	double t_1 = (z - t) / (a - t);
                                  	double tmp;
                                  	if (t_1 <= -5e+164) {
                                  		tmp = (y * z) / a;
                                  	} else if (t_1 <= 2e-91) {
                                  		tmp = x;
                                  	} else if (t_1 <= 5e+23) {
                                  		tmp = x + y;
                                  	} else {
                                  		tmp = y * (z / a);
                                  	}
                                  	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) :: tmp
                                      t_1 = (z - t) / (a - t)
                                      if (t_1 <= (-5d+164)) then
                                          tmp = (y * z) / a
                                      else if (t_1 <= 2d-91) then
                                          tmp = x
                                      else if (t_1 <= 5d+23) then
                                          tmp = x + y
                                      else
                                          tmp = y * (z / a)
                                      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) / (a - t);
                                  	double tmp;
                                  	if (t_1 <= -5e+164) {
                                  		tmp = (y * z) / a;
                                  	} else if (t_1 <= 2e-91) {
                                  		tmp = x;
                                  	} else if (t_1 <= 5e+23) {
                                  		tmp = x + y;
                                  	} else {
                                  		tmp = y * (z / a);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a):
                                  	t_1 = (z - t) / (a - t)
                                  	tmp = 0
                                  	if t_1 <= -5e+164:
                                  		tmp = (y * z) / a
                                  	elif t_1 <= 2e-91:
                                  		tmp = x
                                  	elif t_1 <= 5e+23:
                                  		tmp = x + y
                                  	else:
                                  		tmp = y * (z / a)
                                  	return tmp
                                  
                                  function code(x, y, z, t, a)
                                  	t_1 = Float64(Float64(z - t) / Float64(a - t))
                                  	tmp = 0.0
                                  	if (t_1 <= -5e+164)
                                  		tmp = Float64(Float64(y * z) / a);
                                  	elseif (t_1 <= 2e-91)
                                  		tmp = x;
                                  	elseif (t_1 <= 5e+23)
                                  		tmp = Float64(x + y);
                                  	else
                                  		tmp = Float64(y * Float64(z / a));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a)
                                  	t_1 = (z - t) / (a - t);
                                  	tmp = 0.0;
                                  	if (t_1 <= -5e+164)
                                  		tmp = (y * z) / a;
                                  	elseif (t_1 <= 2e-91)
                                  		tmp = x;
                                  	elseif (t_1 <= 5e+23)
                                  		tmp = x + y;
                                  	else
                                  		tmp = y * (z / a);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+164], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$1, 2e-91], x, If[LessEqual[t$95$1, 5e+23], N[(x + y), $MachinePrecision], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]]]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := \frac{z - t}{a - t}\\
                                  \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+164}:\\
                                  \;\;\;\;\frac{y \cdot z}{a}\\
                                  
                                  \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-91}:\\
                                  \;\;\;\;x\\
                                  
                                  \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+23}:\\
                                  \;\;\;\;x + y\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;y \cdot \frac{z}{a}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 4 regimes
                                  2. if (/.f64 (-.f64 z t) (-.f64 a t)) < -4.9999999999999995e164

                                    1. Initial program 87.9%

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

                                      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
                                    3. Step-by-step derivation
                                      1. lower-/.f64N/A

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

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

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

                                        \[\leadsto \frac{\left(z - t\right) \cdot y}{a - t} \]
                                      5. lift--.f6482.5

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

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

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

                                        \[\leadsto \frac{y \cdot z}{a} \]
                                      2. lower-*.f6453.6

                                        \[\leadsto \frac{y \cdot z}{a} \]
                                    7. Applied rewrites53.6%

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

                                    if -4.9999999999999995e164 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2.00000000000000004e-91

                                    1. Initial program 99.1%

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

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

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

                                      if 2.00000000000000004e-91 < (/.f64 (-.f64 z t) (-.f64 a t)) < 4.9999999999999999e23

                                      1. Initial program 99.9%

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

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

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

                                        if 4.9999999999999999e23 < (/.f64 (-.f64 z t) (-.f64 a t))

                                        1. Initial program 94.8%

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

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

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

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

                                            \[\leadsto y \cdot \frac{z}{\color{blue}{a - t}} \]
                                          4. lift--.f6465.8

                                            \[\leadsto y \cdot \frac{z}{a - \color{blue}{t}} \]
                                        4. Applied rewrites65.8%

                                          \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
                                        5. Taylor expanded in t around 0

                                          \[\leadsto y \cdot \frac{z}{\color{blue}{a}} \]
                                        6. Step-by-step derivation
                                          1. lower-/.f6441.1

                                            \[\leadsto y \cdot \frac{z}{a} \]
                                        7. Applied rewrites41.1%

                                          \[\leadsto y \cdot \frac{z}{\color{blue}{a}} \]
                                      4. Recombined 4 regimes into one program.
                                      5. Add Preprocessing

                                      Alternative 11: 70.2% accurate, 0.3× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - t}{a - t}\\ t_2 := \frac{y \cdot z}{a}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+164}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-91}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 10^{+245}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a)
                                       :precision binary64
                                       (let* ((t_1 (/ (- z t) (- a t))) (t_2 (/ (* y z) a)))
                                         (if (<= t_1 -5e+164)
                                           t_2
                                           (if (<= t_1 2e-91) x (if (<= t_1 1e+245) (+ x y) t_2)))))
                                      double code(double x, double y, double z, double t, double a) {
                                      	double t_1 = (z - t) / (a - t);
                                      	double t_2 = (y * z) / a;
                                      	double tmp;
                                      	if (t_1 <= -5e+164) {
                                      		tmp = t_2;
                                      	} else if (t_1 <= 2e-91) {
                                      		tmp = x;
                                      	} else if (t_1 <= 1e+245) {
                                      		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) / (a - t)
                                          t_2 = (y * z) / a
                                          if (t_1 <= (-5d+164)) then
                                              tmp = t_2
                                          else if (t_1 <= 2d-91) then
                                              tmp = x
                                          else if (t_1 <= 1d+245) 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) / (a - t);
                                      	double t_2 = (y * z) / a;
                                      	double tmp;
                                      	if (t_1 <= -5e+164) {
                                      		tmp = t_2;
                                      	} else if (t_1 <= 2e-91) {
                                      		tmp = x;
                                      	} else if (t_1 <= 1e+245) {
                                      		tmp = x + y;
                                      	} else {
                                      		tmp = t_2;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, y, z, t, a):
                                      	t_1 = (z - t) / (a - t)
                                      	t_2 = (y * z) / a
                                      	tmp = 0
                                      	if t_1 <= -5e+164:
                                      		tmp = t_2
                                      	elif t_1 <= 2e-91:
                                      		tmp = x
                                      	elif t_1 <= 1e+245:
                                      		tmp = x + y
                                      	else:
                                      		tmp = t_2
                                      	return tmp
                                      
                                      function code(x, y, z, t, a)
                                      	t_1 = Float64(Float64(z - t) / Float64(a - t))
                                      	t_2 = Float64(Float64(y * z) / a)
                                      	tmp = 0.0
                                      	if (t_1 <= -5e+164)
                                      		tmp = t_2;
                                      	elseif (t_1 <= 2e-91)
                                      		tmp = x;
                                      	elseif (t_1 <= 1e+245)
                                      		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) / (a - t);
                                      	t_2 = (y * z) / a;
                                      	tmp = 0.0;
                                      	if (t_1 <= -5e+164)
                                      		tmp = t_2;
                                      	elseif (t_1 <= 2e-91)
                                      		tmp = x;
                                      	elseif (t_1 <= 1e+245)
                                      		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[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+164], t$95$2, If[LessEqual[t$95$1, 2e-91], x, If[LessEqual[t$95$1, 1e+245], N[(x + y), $MachinePrecision], t$95$2]]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_1 := \frac{z - t}{a - t}\\
                                      t_2 := \frac{y \cdot z}{a}\\
                                      \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+164}:\\
                                      \;\;\;\;t\_2\\
                                      
                                      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-91}:\\
                                      \;\;\;\;x\\
                                      
                                      \mathbf{elif}\;t\_1 \leq 10^{+245}:\\
                                      \;\;\;\;x + y\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_2\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if (/.f64 (-.f64 z t) (-.f64 a t)) < -4.9999999999999995e164 or 1.00000000000000004e245 < (/.f64 (-.f64 z t) (-.f64 a t))

                                        1. Initial program 84.5%

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

                                          \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
                                        3. Step-by-step derivation
                                          1. lower-/.f64N/A

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

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

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

                                            \[\leadsto \frac{\left(z - t\right) \cdot y}{a - t} \]
                                          5. lift--.f6484.6

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

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

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

                                            \[\leadsto \frac{y \cdot z}{a} \]
                                          2. lower-*.f6456.0

                                            \[\leadsto \frac{y \cdot z}{a} \]
                                        7. Applied rewrites56.0%

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

                                        if -4.9999999999999995e164 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2.00000000000000004e-91

                                        1. Initial program 99.1%

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

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

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

                                          if 2.00000000000000004e-91 < (/.f64 (-.f64 z t) (-.f64 a t)) < 1.00000000000000004e245

                                          1. Initial program 99.9%

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

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

                                              \[\leadsto x + \color{blue}{y} \]
                                          4. Recombined 3 regimes into one program.
                                          5. Add Preprocessing

                                          Alternative 12: 66.6% accurate, 0.9× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{z - t}{a - t} \leq 7.5 \cdot 10^{-90}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a)
                                           :precision binary64
                                           (if (<= (/ (- z t) (- a t)) 7.5e-90) x (+ x y)))
                                          double code(double x, double y, double z, double t, double a) {
                                          	double tmp;
                                          	if (((z - t) / (a - t)) <= 7.5e-90) {
                                          		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) / (a - t)) <= 7.5d-90) 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) / (a - t)) <= 7.5e-90) {
                                          		tmp = x;
                                          	} else {
                                          		tmp = x + y;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x, y, z, t, a):
                                          	tmp = 0
                                          	if ((z - t) / (a - t)) <= 7.5e-90:
                                          		tmp = x
                                          	else:
                                          		tmp = x + y
                                          	return tmp
                                          
                                          function code(x, y, z, t, a)
                                          	tmp = 0.0
                                          	if (Float64(Float64(z - t) / Float64(a - t)) <= 7.5e-90)
                                          		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) / (a - t)) <= 7.5e-90)
                                          		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[(a - t), $MachinePrecision]), $MachinePrecision], 7.5e-90], x, N[(x + y), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;\frac{z - t}{a - t} \leq 7.5 \cdot 10^{-90}:\\
                                          \;\;\;\;x\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;x + y\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if (/.f64 (-.f64 z t) (-.f64 a t)) < 7.4999999999999999e-90

                                            1. Initial program 97.4%

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

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

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

                                              if 7.4999999999999999e-90 < (/.f64 (-.f64 z t) (-.f64 a t))

                                              1. Initial program 98.6%

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

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

                                                  \[\leadsto x + \color{blue}{y} \]
                                              4. Recombined 2 regimes into one program.
                                              5. Add Preprocessing

                                              Alternative 13: 54.8% accurate, 0.5× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+154}:\\ \;\;\;\;y\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+219}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                                              (FPCore (x y z t a)
                                               :precision binary64
                                               (let* ((t_1 (* y (/ (- z t) (- a t)))))
                                                 (if (<= t_1 -4e+154) y (if (<= t_1 4e+219) x y))))
                                              double code(double x, double y, double z, double t, double a) {
                                              	double t_1 = y * ((z - t) / (a - t));
                                              	double tmp;
                                              	if (t_1 <= -4e+154) {
                                              		tmp = y;
                                              	} else if (t_1 <= 4e+219) {
                                              		tmp = x;
                                              	} else {
                                              		tmp = 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) :: t_1
                                                  real(8) :: tmp
                                                  t_1 = y * ((z - t) / (a - t))
                                                  if (t_1 <= (-4d+154)) then
                                                      tmp = y
                                                  else if (t_1 <= 4d+219) then
                                                      tmp = x
                                                  else
                                                      tmp = y
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double x, double y, double z, double t, double a) {
                                              	double t_1 = y * ((z - t) / (a - t));
                                              	double tmp;
                                              	if (t_1 <= -4e+154) {
                                              		tmp = y;
                                              	} else if (t_1 <= 4e+219) {
                                              		tmp = x;
                                              	} else {
                                              		tmp = y;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(x, y, z, t, a):
                                              	t_1 = y * ((z - t) / (a - t))
                                              	tmp = 0
                                              	if t_1 <= -4e+154:
                                              		tmp = y
                                              	elif t_1 <= 4e+219:
                                              		tmp = x
                                              	else:
                                              		tmp = y
                                              	return tmp
                                              
                                              function code(x, y, z, t, a)
                                              	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
                                              	tmp = 0.0
                                              	if (t_1 <= -4e+154)
                                              		tmp = y;
                                              	elseif (t_1 <= 4e+219)
                                              		tmp = x;
                                              	else
                                              		tmp = y;
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(x, y, z, t, a)
                                              	t_1 = y * ((z - t) / (a - t));
                                              	tmp = 0.0;
                                              	if (t_1 <= -4e+154)
                                              		tmp = y;
                                              	elseif (t_1 <= 4e+219)
                                              		tmp = x;
                                              	else
                                              		tmp = y;
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+154], y, If[LessEqual[t$95$1, 4e+219], x, y]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              t_1 := y \cdot \frac{z - t}{a - t}\\
                                              \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+154}:\\
                                              \;\;\;\;y\\
                                              
                                              \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+219}:\\
                                              \;\;\;\;x\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;y\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))) < -4.00000000000000015e154 or 3.99999999999999986e219 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t)))

                                                1. Initial program 93.5%

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

                                                  \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
                                                3. Step-by-step derivation
                                                  1. lower-/.f64N/A

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

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

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

                                                    \[\leadsto \frac{\left(z - t\right) \cdot y}{a - t} \]
                                                  5. lift--.f6463.3

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

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

                                                  \[\leadsto y \]
                                                6. Step-by-step derivation
                                                  1. Applied rewrites26.2%

                                                    \[\leadsto y \]

                                                  if -4.00000000000000015e154 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))) < 3.99999999999999986e219

                                                  1. Initial program 99.5%

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

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

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

                                                  Alternative 14: 50.6% accurate, 15.3× 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}{a - t} \]
                                                  2. Taylor expanded in x around inf

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

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

                                                    Reproduce

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