Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3

Percentage Accurate: 68.5% → 88.0%
Time: 11.2s
Alternatives: 16
Speedup: 0.9×

Specification

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

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

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

\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\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 16 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: 68.5% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 88.0% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-250}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{\left(y - x\right) \cdot \left(z - a\right)}{-t} + y\\

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


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

    1. Initial program 39.9%

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

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

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

      if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.0000000000000001e-250

      1. Initial program 95.9%

        \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
      2. Add Preprocessing

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

      1. Initial program 3.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 75.0%

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 90.3% accurate, 0.3× speedup?

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

        1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 3.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 3: 89.7% accurate, 0.3× speedup?

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

          1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 3.7%

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

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

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

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

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

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

            Alternative 4: 76.5% accurate, 0.7× speedup?

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

              1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

                if -1.3000000000000001e-46 < a < 5.5000000000000002e24

                1. Initial program 66.3%

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

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

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

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

                Alternative 5: 75.0% accurate, 0.8× speedup?

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

                  1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

                    if -1.8e-131 < a < 7.00000000000000057e-113

                    1. Initial program 64.7%

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

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

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

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

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

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

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

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

                        Alternative 6: 51.5% accurate, 0.8× speedup?

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

                          1. Initial program 42.2%

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

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

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

                            if -6.5000000000000004e133 < t < -3.6499999999999999e-79

                            1. Initial program 75.1%

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

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

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

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

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

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

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

                                  if -3.6499999999999999e-79 < t < 7.79999999999999962e127

                                  1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 7.79999999999999962e127 < t

                                      1. Initial program 37.4%

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

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

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

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

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

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

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

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

                                          Alternative 7: 68.9% accurate, 0.9× speedup?

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

                                            1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if -6.5e-29 < a < 7.5000000000000003e46

                                                1. Initial program 67.6%

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

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

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

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

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

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

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

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

                                                    Alternative 8: 68.5% accurate, 0.9× speedup?

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

                                                      1. Initial program 57.7%

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

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

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

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

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

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

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

                                                            if -3.6499999999999999e-79 < t < 2.05e14

                                                            1. Initial program 88.5%

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

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

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

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

                                                            Alternative 9: 65.3% accurate, 0.9× speedup?

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

                                                              1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  if -6.20000000000000052e-29 < a < 1.20000000000000009e47

                                                                  1. Initial program 67.6%

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

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

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

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

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

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

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

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

                                                                      Alternative 10: 71.2% accurate, 0.9× speedup?

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

                                                                        1. Initial program 67.8%

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

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

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

                                                                          if -6.20000000000000052e-29 < a < 7.5000000000000003e46

                                                                          1. Initial program 67.6%

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

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

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

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

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

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

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

                                                                                if 7.5000000000000003e46 < a

                                                                                1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  Alternative 11: 54.5% accurate, 0.9× speedup?

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

                                                                                    1. Initial program 57.7%

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

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

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

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

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

                                                                                          \[\leadsto \mathsf{fma}\left(-y, \frac{z}{t}, y\right) \]
                                                                                        3. Step-by-step derivation
                                                                                          1. Applied rewrites55.4%

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

                                                                                          if -3.6499999999999999e-79 < t < 1.52e19

                                                                                          1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            Alternative 12: 52.0% accurate, 1.0× speedup?

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

                                                                                              1. Initial program 48.5%

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

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

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

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

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

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

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

                                                                                                    if -1.15e15 < t < 7.79999999999999962e127

                                                                                                    1. Initial program 85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                      Alternative 13: 38.8% accurate, 1.0× speedup?

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

                                                                                                        1. Initial program 53.5%

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

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

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

                                                                                                          if -1.15e15 < t < 6.49999999999999957e-13

                                                                                                          1. Initial program 88.2%

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

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

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

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

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

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

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

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

                                                                                                            Alternative 14: 39.8% accurate, 1.0× speedup?

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

                                                                                                              1. Initial program 69.2%

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

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

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

                                                                                                                if -3.10000000000000003e84 < a < 1.2999999999999999e33

                                                                                                                1. Initial program 67.0%

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

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

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

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

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

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

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

                                                                                                                      if 1.2999999999999999e33 < a

                                                                                                                      1. Initial program 80.4%

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

                                                                                                                        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot \frac{z - t}{a - t}\right)} \]
                                                                                                                      4. Applied rewrites50.7%

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

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

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

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

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

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

                                                                                                                        Alternative 15: 38.1% accurate, 2.2× speedup?

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

                                                                                                                          1. Initial program 75.8%

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

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

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

                                                                                                                            if -3.29999999999999985e83 < a < 1.2999999999999999e33

                                                                                                                            1. Initial program 67.0%

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

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

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

                                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.3 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+33}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                                                                                                            7. Add Preprocessing

                                                                                                                            Alternative 16: 24.7% accurate, 29.0× speedup?

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

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

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

                                                                                                                                \[\leadsto \color{blue}{x} \]
                                                                                                                              2. Final simplification26.5%

                                                                                                                                \[\leadsto x \]
                                                                                                                              3. Add Preprocessing

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

                                                                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                                                                              (FPCore (x y z t a)
                                                                                                                               :precision binary64
                                                                                                                               (let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
                                                                                                                                 (if (< a -1.6153062845442575e-142)
                                                                                                                                   t_1
                                                                                                                                   (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
                                                                                                                              double code(double x, double y, double z, double t, double a) {
                                                                                                                              	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
                                                                                                                              	double tmp;
                                                                                                                              	if (a < -1.6153062845442575e-142) {
                                                                                                                              		tmp = t_1;
                                                                                                                              	} else if (a < 3.774403170083174e-182) {
                                                                                                                              		tmp = y - ((z / t) * (y - x));
                                                                                                                              	} else {
                                                                                                                              		tmp = t_1;
                                                                                                                              	}
                                                                                                                              	return tmp;
                                                                                                                              }
                                                                                                                              
                                                                                                                              module fmin_fmax_functions
                                                                                                                                  implicit none
                                                                                                                                  private
                                                                                                                                  public fmax
                                                                                                                                  public fmin
                                                                                                                              
                                                                                                                                  interface fmax
                                                                                                                                      module procedure fmax88
                                                                                                                                      module procedure fmax44
                                                                                                                                      module procedure fmax84
                                                                                                                                      module procedure fmax48
                                                                                                                                  end interface
                                                                                                                                  interface fmin
                                                                                                                                      module procedure fmin88
                                                                                                                                      module procedure fmin44
                                                                                                                                      module procedure fmin84
                                                                                                                                      module procedure fmin48
                                                                                                                                  end interface
                                                                                                                              contains
                                                                                                                                  real(8) function fmax88(x, y) result (res)
                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                  end function
                                                                                                                                  real(4) function fmax44(x, y) result (res)
                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                  end function
                                                                                                                                  real(8) function fmax84(x, y) result(res)
                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                  end function
                                                                                                                                  real(8) function fmax48(x, y) result(res)
                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                  end function
                                                                                                                                  real(8) function fmin88(x, y) result (res)
                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                  end function
                                                                                                                                  real(4) function fmin44(x, y) result (res)
                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                  end function
                                                                                                                                  real(8) function fmin84(x, y) result(res)
                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                  end function
                                                                                                                                  real(8) function fmin48(x, y) result(res)
                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                  end function
                                                                                                                              end module
                                                                                                                              
                                                                                                                              real(8) function code(x, y, z, t, a)
                                                                                                                              use fmin_fmax_functions
                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                  real(8), intent (in) :: z
                                                                                                                                  real(8), intent (in) :: t
                                                                                                                                  real(8), intent (in) :: a
                                                                                                                                  real(8) :: t_1
                                                                                                                                  real(8) :: tmp
                                                                                                                                  t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
                                                                                                                                  if (a < (-1.6153062845442575d-142)) then
                                                                                                                                      tmp = t_1
                                                                                                                                  else if (a < 3.774403170083174d-182) then
                                                                                                                                      tmp = y - ((z / t) * (y - x))
                                                                                                                                  else
                                                                                                                                      tmp = t_1
                                                                                                                                  end if
                                                                                                                                  code = tmp
                                                                                                                              end function
                                                                                                                              
                                                                                                                              public static double code(double x, double y, double z, double t, double a) {
                                                                                                                              	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
                                                                                                                              	double tmp;
                                                                                                                              	if (a < -1.6153062845442575e-142) {
                                                                                                                              		tmp = t_1;
                                                                                                                              	} else if (a < 3.774403170083174e-182) {
                                                                                                                              		tmp = y - ((z / t) * (y - x));
                                                                                                                              	} else {
                                                                                                                              		tmp = t_1;
                                                                                                                              	}
                                                                                                                              	return tmp;
                                                                                                                              }
                                                                                                                              
                                                                                                                              def code(x, y, z, t, a):
                                                                                                                              	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)))
                                                                                                                              	tmp = 0
                                                                                                                              	if a < -1.6153062845442575e-142:
                                                                                                                              		tmp = t_1
                                                                                                                              	elif a < 3.774403170083174e-182:
                                                                                                                              		tmp = y - ((z / t) * (y - x))
                                                                                                                              	else:
                                                                                                                              		tmp = t_1
                                                                                                                              	return tmp
                                                                                                                              
                                                                                                                              function code(x, y, z, t, a)
                                                                                                                              	t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t))))
                                                                                                                              	tmp = 0.0
                                                                                                                              	if (a < -1.6153062845442575e-142)
                                                                                                                              		tmp = t_1;
                                                                                                                              	elseif (a < 3.774403170083174e-182)
                                                                                                                              		tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x)));
                                                                                                                              	else
                                                                                                                              		tmp = t_1;
                                                                                                                              	end
                                                                                                                              	return tmp
                                                                                                                              end
                                                                                                                              
                                                                                                                              function tmp_2 = code(x, y, z, t, a)
                                                                                                                              	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
                                                                                                                              	tmp = 0.0;
                                                                                                                              	if (a < -1.6153062845442575e-142)
                                                                                                                              		tmp = t_1;
                                                                                                                              	elseif (a < 3.774403170083174e-182)
                                                                                                                              		tmp = y - ((z / t) * (y - x));
                                                                                                                              	else
                                                                                                                              		tmp = t_1;
                                                                                                                              	end
                                                                                                                              	tmp_2 = tmp;
                                                                                                                              end
                                                                                                                              
                                                                                                                              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                                                                                              
                                                                                                                              \begin{array}{l}
                                                                                                                              
                                                                                                                              \\
                                                                                                                              \begin{array}{l}
                                                                                                                              t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
                                                                                                                              \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
                                                                                                                              \;\;\;\;t\_1\\
                                                                                                                              
                                                                                                                              \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
                                                                                                                              \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
                                                                                                                              
                                                                                                                              \mathbf{else}:\\
                                                                                                                              \;\;\;\;t\_1\\
                                                                                                                              
                                                                                                                              
                                                                                                                              \end{array}
                                                                                                                              \end{array}
                                                                                                                              

                                                                                                                              Reproduce

                                                                                                                              ?
                                                                                                                              herbie shell --seed 2025021 
                                                                                                                              (FPCore (x y z t a)
                                                                                                                                :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                                                                                                                :precision binary64
                                                                                                                              
                                                                                                                                :alt
                                                                                                                                (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
                                                                                                                              
                                                                                                                                (+ x (/ (* (- y x) (- z t)) (- a t))))