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

Percentage Accurate: 67.2% → 90.5%
Time: 4.4s
Alternatives: 15
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}

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 15 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: 67.2% 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: 90.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}, -1, y\right)\\

\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot t\_1\\


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

    1. Initial program 70.8%

      \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 10.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. associate--l+N/A

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

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

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

        \[\leadsto y + \frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - -1 \cdot \left(a \cdot \left(y - x\right)\right)}{\color{blue}{t}} \]
      5. distribute-lft-out--N/A

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

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

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

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

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

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

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

    1. Initial program 73.6%

      \[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 x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}, -1, y\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\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.00000000000000003e-251 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 72.2%

      \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 10.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. associate--l+N/A

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

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

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

        \[\leadsto y + \frac{-1 \cdot \left(z \cdot \left(y - x\right)\right) - -1 \cdot \left(a \cdot \left(y - x\right)\right)}{\color{blue}{t}} \]
      5. distribute-lft-out--N/A

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

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

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

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

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

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

Alternative 3: 86.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\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.00000000000000003e-251 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 72.2%

      \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 10.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}{y} \]
    4. Step-by-step derivation
      1. Applied rewrites41.9%

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

    Alternative 4: 60.3% accurate, 0.7× speedup?

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

      1. Initial program 33.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 rewrites52.5%

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

        if -3.1999999999999999e157 < t < -3.1999999999999999e-84

        1. Initial program 69.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 x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
          2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -3.1999999999999999e-84 < t < 2.15e83

            1. Initial program 87.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 x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
              2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y - x, x\right) \]
            8. Step-by-step derivation
              1. lower-/.f6473.0

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

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

          Alternative 5: 71.3% accurate, 0.8× speedup?

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

            1. Initial program 33.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto -y \cdot \frac{z - t}{t} \]
              6. lift--.f6458.0

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

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

            if -3.20000000000000012e155 < t < 2.15e83

            1. Initial program 82.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 x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
              2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 65.4% accurate, 0.8× speedup?

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

              1. Initial program 34.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto -y \cdot \frac{z - t}{t} \]
                6. lift--.f6457.5

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

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

              if -3.3000000000000002e139 < t < 2.15e83

              1. Initial program 83.5%

                \[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. +-commutativeN/A

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

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

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

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

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

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

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

            Alternative 7: 39.3% accurate, 0.8× speedup?

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

              1. Initial program 36.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}{y} \]
              4. Step-by-step derivation
                1. Applied rewrites50.7%

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

                if -3.20000000000000004e44 < t < -2.29999999999999999e-166 or 1.25e-220 < t < 6.8000000000000002e-31

                1. Initial program 87.0%

                  \[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 rewrites32.5%

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

                  if -2.29999999999999999e-166 < t < 1.25e-220

                  1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{y \cdot z}{a} \]
                  8. Applied rewrites32.9%

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

                  if 6.8000000000000002e-31 < t < 3.2999999999999999e155

                  1. Initial program 63.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 x + \color{blue}{\left(y - x\right)} \]
                  4. Step-by-step derivation
                    1. lift--.f6421.4

                      \[\leadsto x + \left(y - \color{blue}{x}\right) \]
                  5. Applied rewrites21.4%

                    \[\leadsto x + \color{blue}{\left(y - x\right)} \]
                  6. Taylor expanded in x around 0

                    \[\leadsto x + y \]
                  7. Step-by-step derivation
                    1. Applied rewrites35.0%

                      \[\leadsto x + y \]
                  8. Recombined 4 regimes into one program.
                  9. Add Preprocessing

                  Alternative 8: 62.4% accurate, 0.9× speedup?

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

                    1. Initial program 34.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto -y \cdot \frac{z - t}{t} \]
                      6. lift--.f6457.5

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

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

                    if -3.3000000000000002e139 < t < 2.15e83

                    1. Initial program 83.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 x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
                      2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y - x, x\right) \]
                    8. Step-by-step derivation
                      1. lower-/.f6464.7

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

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

                  Alternative 9: 60.5% accurate, 0.9× speedup?

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

                    1. Initial program 34.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 rewrites51.8%

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

                      if -3.3000000000000002e139 < t < 2.15e83

                      1. Initial program 83.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 x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
                        2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y - x, x\right) \]
                      8. Step-by-step derivation
                        1. lower-/.f6464.7

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

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

                    Alternative 10: 59.4% accurate, 0.9× speedup?

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

                      1. Initial program 34.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 rewrites51.8%

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

                        if -3.3000000000000002e139 < t < 2.15e83

                        1. Initial program 83.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. +-commutativeN/A

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

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

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

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

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

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

                      Alternative 11: 69.1% accurate, 0.9× speedup?

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

                        1. Initial program 66.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 x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
                          2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 2.6999999999999999e-53 < z

                          1. Initial program 69.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 x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
                            2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 12: 51.6% accurate, 1.0× speedup?

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

                            1. Initial program 34.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 rewrites51.8%

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

                              if -3.3000000000000002e139 < t < 7.20000000000000028e82

                              1. Initial program 83.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. +-commutativeN/A

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(z, \frac{y}{a}, x\right) \]
                              8. Recombined 2 regimes into one program.
                              9. Add Preprocessing

                              Alternative 13: 40.2% accurate, 1.3× speedup?

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

                                1. Initial program 36.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}{y} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites50.7%

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

                                  if -3.20000000000000004e44 < t < 6.8000000000000002e-31

                                  1. Initial program 89.4%

                                    \[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 rewrites34.5%

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

                                    if 6.8000000000000002e-31 < t < 3.2999999999999999e155

                                    1. Initial program 63.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 x + \color{blue}{\left(y - x\right)} \]
                                    4. Step-by-step derivation
                                      1. lift--.f6421.4

                                        \[\leadsto x + \left(y - \color{blue}{x}\right) \]
                                    5. Applied rewrites21.4%

                                      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
                                    6. Taylor expanded in x around 0

                                      \[\leadsto x + y \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites35.0%

                                        \[\leadsto x + y \]
                                    8. Recombined 3 regimes into one program.
                                    9. Add Preprocessing

                                    Alternative 14: 39.2% accurate, 2.2× speedup?

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

                                      1. Initial program 38.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}{y} \]
                                      4. Step-by-step derivation
                                        1. Applied rewrites48.4%

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

                                        if -3.20000000000000004e44 < t < 2.2499999999999998e82

                                        1. Initial program 86.9%

                                          \[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 rewrites32.9%

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

                                        Alternative 15: 24.9% 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 67.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 rewrites24.9%

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

                                          Developer Target 1: 86.4% 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 2025089 
                                          (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))))