Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.0% → 94.7%
Time: 7.8s
Alternatives: 13
Speedup: 0.3×

Specification

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

\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 80.0% accurate, 1.0× speedup?

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

\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}

Alternative 1: 94.7% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := \frac{t - x}{z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-277} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(-y, t\_2, \left(\frac{y - a}{z} \cdot \left(-\left(t - x\right)\right)\right) \cdot \frac{a}{z}\right) + t\right) + a \cdot t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999969e-278 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 88.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999969e-278 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0

    1. Initial program 3.2%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
      3. Step-by-step derivation
        1. Applied rewrites99.8%

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

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

      Alternative 2: 79.8% accurate, 0.2× speedup?

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

        1. Initial program 87.8%

          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

          if -9.99999999999999969e-278 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0

          1. Initial program 3.2%

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

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

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

              \[\leadsto \mathsf{fma}\left(x, \frac{\color{blue}{y - a}}{z}, t\right) \]
            3. Step-by-step derivation
              1. Applied rewrites97.0%

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

              if 2.00000000000000003e306 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

              1. Initial program 90.1%

                \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
              6. Step-by-step derivation
                1. Applied rewrites95.5%

                  \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot y}{a - z}} \]
              7. Recombined 3 regimes into one program.
              8. Final simplification82.9%

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

              Alternative 3: 94.4% accurate, 0.3× speedup?

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

                1. Initial program 88.0%

                  \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                if -9.99999999999999969e-278 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0

                1. Initial program 3.2%

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

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

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

                    \[\leadsto \mathsf{fma}\left(x, \frac{\color{blue}{y - a}}{z}, t\right) \]
                  3. Step-by-step derivation
                    1. Applied rewrites97.0%

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

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

                  Alternative 4: 77.0% accurate, 0.7× speedup?

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

                    1. Initial program 33.3%

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

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

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

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

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

                        if -3.2000000000000001e263 < z < -5.50000000000000025e-158

                        1. Initial program 81.4%

                          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                          if -5.50000000000000025e-158 < z < 1.22e37

                          1. Initial program 93.7%

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

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

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

                            if 1.22e37 < z

                            1. Initial program 55.1%

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

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+263}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{y - a}{z}, t\right)\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-158}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{y - z}{a - z}, x\right)\\ \mathbf{elif}\;z \leq 1.22 \cdot 10^{+37}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-\left(t - x\right), \frac{y - a}{z}, t\right)\\ \end{array} \]
                            7. Add Preprocessing

                            Alternative 5: 64.8% accurate, 0.7× speedup?

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

                              1. Initial program 87.7%

                                \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                              2. Add Preprocessing
                              3. Step-by-step derivation
                                1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(t, \color{blue}{\frac{y}{a}}, x\right) \]
                                3. Step-by-step derivation
                                  1. Applied rewrites64.5%

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

                                  if -3.49999999999999987e69 < a < 1.70000000000000003e-60

                                  1. Initial program 67.5%

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

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

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

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

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

                                      if 1.70000000000000003e-60 < a < 7.79999999999999962e174

                                      1. Initial program 80.2%

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

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

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

                                          \[\leadsto \mathsf{fma}\left(x, \frac{\color{blue}{y - a}}{z}, t\right) \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites52.8%

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

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+69}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{y}{a}, x\right)\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{-60}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y, t\right)\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{+174}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{y - a}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{y}{a}, x\right)\\ \end{array} \]
                                        6. Add Preprocessing

                                        Alternative 6: 77.2% accurate, 0.8× speedup?

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

                                          1. Initial program 85.9%

                                            \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                          2. Add Preprocessing
                                          3. Step-by-step derivation
                                            1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                            if -8.2000000000000002e77 < a < 1.04999999999999994e-46

                                            1. Initial program 67.0%

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

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

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

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

                                            Alternative 7: 72.2% accurate, 0.8× speedup?

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

                                              1. Initial program 59.0%

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(x, \frac{\color{blue}{y - a}}{z}, t\right) \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites76.8%

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

                                                  if -4.20000000000000002e68 < z < 1.4199999999999999e37

                                                  1. Initial program 91.7%

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

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

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

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

                                                  Alternative 8: 69.4% accurate, 0.9× speedup?

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

                                                    1. Initial program 62.0%

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(x, \frac{\color{blue}{y - a}}{z}, t\right) \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites73.3%

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

                                                        if -4.20000000000000002e68 < z < 5.19999999999999998e-7

                                                        1. Initial program 92.1%

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

                                                          \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                                        4. Step-by-step derivation
                                                          1. Applied rewrites69.9%

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

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

                                                        Alternative 9: 64.1% accurate, 0.9× speedup?

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

                                                          1. Initial program 87.7%

                                                            \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                          2. Add Preprocessing
                                                          3. Step-by-step derivation
                                                            1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \mathsf{fma}\left(t, \color{blue}{\frac{y}{a}}, x\right) \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites64.5%

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

                                                              if -3.49999999999999987e69 < a < 7.79999999999999962e174

                                                              1. Initial program 71.5%

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

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

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

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

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

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

                                                                Alternative 10: 53.1% accurate, 1.0× speedup?

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

                                                                  1. Initial program 61.5%

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

                                                                    \[\leadsto \color{blue}{t} \]
                                                                  4. Step-by-step derivation
                                                                    1. Applied rewrites57.6%

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

                                                                    if -1.15000000000000001e76 < z < 1.5e9

                                                                    1. Initial program 90.7%

                                                                      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                    2. Add Preprocessing
                                                                    3. Step-by-step derivation
                                                                      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\frac{y}{a}}, x\right) \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites54.2%

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

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

                                                                      Alternative 11: 40.0% accurate, 1.2× speedup?

                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-8}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+179}:\\ \;\;\;\;\mathsf{fma}\left(t, 1, x\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                                                                      (FPCore (x y z t a)
                                                                       :precision binary64
                                                                       (if (<= a -1.8e+79)
                                                                         x
                                                                         (if (<= a 1.35e-8) t (if (<= a 9.5e+179) (fma t 1.0 x) x))))
                                                                      double code(double x, double y, double z, double t, double a) {
                                                                      	double tmp;
                                                                      	if (a <= -1.8e+79) {
                                                                      		tmp = x;
                                                                      	} else if (a <= 1.35e-8) {
                                                                      		tmp = t;
                                                                      	} else if (a <= 9.5e+179) {
                                                                      		tmp = fma(t, 1.0, x);
                                                                      	} else {
                                                                      		tmp = x;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      function code(x, y, z, t, a)
                                                                      	tmp = 0.0
                                                                      	if (a <= -1.8e+79)
                                                                      		tmp = x;
                                                                      	elseif (a <= 1.35e-8)
                                                                      		tmp = t;
                                                                      	elseif (a <= 9.5e+179)
                                                                      		tmp = fma(t, 1.0, x);
                                                                      	else
                                                                      		tmp = x;
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.8e+79], x, If[LessEqual[a, 1.35e-8], t, If[LessEqual[a, 9.5e+179], N[(t * 1.0 + x), $MachinePrecision], x]]]
                                                                      
                                                                      \begin{array}{l}
                                                                      
                                                                      \\
                                                                      \begin{array}{l}
                                                                      \mathbf{if}\;a \leq -1.8 \cdot 10^{+79}:\\
                                                                      \;\;\;\;x\\
                                                                      
                                                                      \mathbf{elif}\;a \leq 1.35 \cdot 10^{-8}:\\
                                                                      \;\;\;\;t\\
                                                                      
                                                                      \mathbf{elif}\;a \leq 9.5 \cdot 10^{+179}:\\
                                                                      \;\;\;\;\mathsf{fma}\left(t, 1, x\right)\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;x\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 3 regimes
                                                                      2. if a < -1.8e79 or 9.5e179 < a

                                                                        1. Initial program 88.5%

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

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

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

                                                                          if -1.8e79 < a < 1.35000000000000001e-8

                                                                          1. Initial program 68.5%

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

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

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

                                                                            if 1.35000000000000001e-8 < a < 9.5e179

                                                                            1. Initial program 80.2%

                                                                              \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                            2. Add Preprocessing
                                                                            3. Step-by-step derivation
                                                                              1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto \mathsf{fma}\left(t, \color{blue}{1}, x\right) \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites49.0%

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

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{-8}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 9.5 \cdot 10^{+179}:\\ \;\;\;\;\mathsf{fma}\left(t, 1, x\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                                                              6. Add Preprocessing

                                                                              Alternative 12: 38.2% accurate, 2.2× speedup?

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

                                                                                1. Initial program 88.5%

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

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

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

                                                                                  if -1.8e79 < a < 1.70000000000000014e175

                                                                                  1. Initial program 71.4%

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

                                                                                    \[\leadsto \color{blue}{t} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. Applied rewrites43.1%

                                                                                      \[\leadsto \color{blue}{t} \]
                                                                                  5. Recombined 2 regimes into one program.
                                                                                  6. Final simplification46.3%

                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{+79}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.7 \cdot 10^{+175}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                                                                  7. Add Preprocessing

                                                                                  Alternative 13: 25.5% accurate, 29.0× speedup?

                                                                                  \[\begin{array}{l} \\ t \end{array} \]
                                                                                  (FPCore (x y z t a) :precision binary64 t)
                                                                                  double code(double x, double y, double z, double t, double a) {
                                                                                  	return 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 = t
                                                                                  end function
                                                                                  
                                                                                  public static double code(double x, double y, double z, double t, double a) {
                                                                                  	return t;
                                                                                  }
                                                                                  
                                                                                  def code(x, y, z, t, a):
                                                                                  	return t
                                                                                  
                                                                                  function code(x, y, z, t, a)
                                                                                  	return t
                                                                                  end
                                                                                  
                                                                                  function tmp = code(x, y, z, t, a)
                                                                                  	tmp = t;
                                                                                  end
                                                                                  
                                                                                  code[x_, y_, z_, t_, a_] := t
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  t
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Initial program 77.0%

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

                                                                                    \[\leadsto \color{blue}{t} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. Applied rewrites32.6%

                                                                                      \[\leadsto \color{blue}{t} \]
                                                                                    2. Final simplification32.6%

                                                                                      \[\leadsto t \]
                                                                                    3. Add Preprocessing

                                                                                    Reproduce

                                                                                    ?
                                                                                    herbie shell --seed 2025019 
                                                                                    (FPCore (x y z t a)
                                                                                      :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
                                                                                      :precision binary64
                                                                                      (+ x (* (- y z) (/ (- t x) (- a z)))))