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

Percentage Accurate: 68.6% → 91.2%
Time: 6.7s
Alternatives: 20
Speedup: 0.8×

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 20 alternatives:

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

Initial Program: 68.6% 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: 91.2% accurate, 0.2× 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^{-293}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\left(-\frac{\mathsf{fma}\left(a, \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}, \left(y - x\right) \cdot z\right) - \left(y - x\right) \cdot a}{t}\right) + 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-293)
     t_1
     (if (<= t_2 0.0)
       (+
        (-
         (/
          (- (fma a (/ (* (- y x) (- z a)) t) (* (- y x) z)) (* (- y x) a))
          t))
        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-293) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = -((fma(a, (((y - x) * (z - a)) / t), ((y - x) * z)) - ((y - x) * a)) / t) + 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-293)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(-Float64(Float64(fma(a, Float64(Float64(Float64(y - x) * Float64(z - a)) / t), Float64(Float64(y - x) * z)) - Float64(Float64(y - x) * a)) / t)) + 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-293], t$95$1, If[LessEqual[t$95$2, 0.0], N[((-N[(N[(N[(a * N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(y - x), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + 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^{-293}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\left(-\frac{\mathsf{fma}\left(a, \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}, \left(y - x\right) \cdot z\right) - \left(y - x\right) \cdot a}{t}\right) + 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.0000000000000001e-293 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 73.2%

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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.7

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

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

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

    1. Initial program 6.5%

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

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

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

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

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

Alternative 2: 91.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^{-293}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\left(-\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\right) + 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-293)
     t_1
     (if (<= t_2 0.0) (+ (- (/ (* (- y x) (- z a)) t)) 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-293) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = -(((y - x) * (z - a)) / t) + 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-293)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(-Float64(Float64(Float64(y - x) * Float64(z - a)) / t)) + 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-293], t$95$1, If[LessEqual[t$95$2, 0.0], N[((-N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + 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^{-293}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\left(-\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\right) + 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.0000000000000001e-293 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 73.2%

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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.7

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

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

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

    1. Initial program 6.5%

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

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

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

Alternative 3: 73.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{z - t}{a}\\
\mathbf{if}\;a \leq -8 \cdot 10^{-79}:\\
\;\;\;\;x + \left(y - x\right) \cdot t\_1\\

\mathbf{elif}\;a \leq 6.8 \cdot 10^{-43}:\\
\;\;\;\;\left(-\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\right) + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8e-79

    1. Initial program 70.3%

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

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

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

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

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

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

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

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

    if -8e-79 < a < 6.8000000000000001e-43

    1. Initial program 66.3%

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

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

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

    if 6.8000000000000001e-43 < a

    1. Initial program 69.7%

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

      \[\leadsto \color{blue}{x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a}} \]
    3. 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--.f6473.3

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

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

Alternative 4: 67.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 3900000:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.2e8

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

    if -4.2e8 < a < 3.9e6

    1. Initial program 67.5%

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6478.7

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{y - x}{\color{blue}{a} - t} \]
      5. lift--.f6453.4

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

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

    if 3.9e6 < a

    1. Initial program 69.1%

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

      \[\leadsto \color{blue}{x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a}} \]
    3. 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--.f6476.5

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

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

Alternative 5: 64.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\ \mathbf{if}\;a \leq -420000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3900000:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \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) x)))
   (if (<= a -420000000.0)
     t_1
     (if (<= a 3900000.0) (* z (/ (- y x) (- a t))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((y - x), ((z - t) / a), x);
	double tmp;
	if (a <= -420000000.0) {
		tmp = t_1;
	} else if (a <= 3900000.0) {
		tmp = z * ((y - x) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(y - x), Float64(Float64(z - t) / a), x)
	tmp = 0.0
	if (a <= -420000000.0)
		tmp = t_1;
	elseif (a <= 3900000.0)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	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] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -420000000.0], t$95$1, If[LessEqual[a, 3900000.0], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 3900000:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.2e8 or 3.9e6 < a

    1. Initial program 69.6%

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

      \[\leadsto \color{blue}{x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a}} \]
    3. 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--.f6476.5

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

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

    if -4.2e8 < a < 3.9e6

    1. Initial program 67.5%

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6478.7

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{y - x}{\color{blue}{a} - t} \]
      5. lift--.f6453.4

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

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

Alternative 6: 64.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -750000000:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\ \mathbf{elif}\;a \leq 8.2 \cdot 10^{-189}:\\ \;\;\;\;z \cdot \frac{y - x}{a - t}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{+84}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -750000000.0)
   (fma z (/ (- y x) a) x)
   (if (<= a 8.2e-189)
     (* z (/ (- y x) (- a t)))
     (if (<= a 9e+84) (* y (/ (- z t) (- a t))) (fma (- y x) (/ z a) x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -750000000.0) {
		tmp = fma(z, ((y - x) / a), x);
	} else if (a <= 8.2e-189) {
		tmp = z * ((y - x) / (a - t));
	} else if (a <= 9e+84) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = fma((y - x), (z / a), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -750000000.0)
		tmp = fma(z, Float64(Float64(y - x) / a), x);
	elseif (a <= 8.2e-189)
		tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t)));
	elseif (a <= 9e+84)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = fma(Float64(y - x), Float64(z / a), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -750000000.0], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 8.2e-189], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+84], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq 8.2 \cdot 10^{-189}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\

\mathbf{elif}\;a \leq 9 \cdot 10^{+84}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -7.5e8

    1. Initial program 70.1%

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

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    3. 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--.f6468.1

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

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

    if -7.5e8 < a < 8.2000000000000006e-189

    1. Initial program 66.3%

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6478.1

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{y - x}{\color{blue}{a} - t} \]
      5. lift--.f6453.1

        \[\leadsto z \cdot \frac{y - x}{a - \color{blue}{t}} \]
    6. Applied rewrites53.1%

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

    if 8.2000000000000006e-189 < a < 8.9999999999999994e84

    1. Initial program 70.3%

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6481.3

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

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

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

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

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

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

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

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

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

    if 8.9999999999999994e84 < a

    1. Initial program 68.4%

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6492.7

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

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

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

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

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

Alternative 7: 61.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;t \leq -3.3 \cdot 10^{+48}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9 \cdot 10^{+79}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{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) (- a t)))))
   (if (<= t -3.3e+48) t_1 (if (<= t 9e+79) (fma (- y x) (/ z a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double tmp;
	if (t <= -3.3e+48) {
		tmp = t_1;
	} else if (t <= 9e+79) {
		tmp = fma((y - x), (z / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
	tmp = 0.0
	if (t <= -3.3e+48)
		tmp = t_1;
	elseif (t <= 9e+79)
		tmp = fma(Float64(y - x), Float64(z / 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] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+48], t$95$1, If[LessEqual[t, 9e+79], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 9 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.30000000000000023e48 or 8.99999999999999987e79 < t

    1. Initial program 40.8%

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6471.5

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{z - t}{\color{blue}{a} - t} \]
      5. lift--.f6463.3

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

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

    if -3.30000000000000023e48 < t < 8.99999999999999987e79

    1. Initial program 86.8%

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6493.5

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

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

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

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

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

Alternative 8: 61.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -680000000:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\ \mathbf{elif}\;a \leq 6600000:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -680000000.0)
   (fma z (/ (- y x) a) x)
   (if (<= a 6600000.0) (/ (* (- y x) z) (- a t)) (fma (- y x) (/ z a) x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -680000000.0) {
		tmp = fma(z, ((y - x) / a), x);
	} else if (a <= 6600000.0) {
		tmp = ((y - x) * z) / (a - t);
	} else {
		tmp = fma((y - x), (z / a), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -680000000.0)
		tmp = fma(z, Float64(Float64(y - x) / a), x);
	elseif (a <= 6600000.0)
		tmp = Float64(Float64(Float64(y - x) * z) / Float64(a - t));
	else
		tmp = fma(Float64(y - x), Float64(z / a), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -680000000.0], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 6600000.0], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.8e8

    1. Initial program 70.1%

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

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    3. 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--.f6468.1

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

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

    if -6.8e8 < a < 6.6e6

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

    if 6.6e6 < a

    1. Initial program 69.1%

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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.7

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

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

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

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

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

Alternative 9: 60.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+137}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-56}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \mathbf{elif}\;t \leq 6.7 \cdot 10^{+115}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -8e+137)
   y
   (if (<= t 2.05e-56)
     (fma (- y x) (/ z a) x)
     (if (<= t 6.7e+115) (fma y (/ (- z t) a) x) y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -8e+137) {
		tmp = y;
	} else if (t <= 2.05e-56) {
		tmp = fma((y - x), (z / a), x);
	} else if (t <= 6.7e+115) {
		tmp = fma(y, ((z - t) / a), x);
	} else {
		tmp = y;
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -8e+137)
		tmp = y;
	elseif (t <= 2.05e-56)
		tmp = fma(Float64(y - x), Float64(z / a), x);
	elseif (t <= 6.7e+115)
		tmp = fma(y, Float64(Float64(z - t) / a), x);
	else
		tmp = y;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8e+137], y, If[LessEqual[t, 2.05e-56], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 6.7e+115], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], y]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+137}:\\
\;\;\;\;y\\

\mathbf{elif}\;t \leq 2.05 \cdot 10^{-56}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\

\mathbf{elif}\;t \leq 6.7 \cdot 10^{+115}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.0000000000000003e137 or 6.6999999999999997e115 < t

    1. Initial program 33.5%

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

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

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

      if -8.0000000000000003e137 < t < 2.0500000000000001e-56

      1. Initial program 85.1%

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

          \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6492.8

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

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

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

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

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

      if 2.0500000000000001e-56 < t < 6.6999999999999997e115

      1. Initial program 73.7%

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

          \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6486.4

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

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

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

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

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

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

        Alternative 10: 60.1% accurate, 0.8× speedup?

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

          1. Initial program 33.6%

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

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

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

            if -1.3000000000000001e136 < t < 5.3000000000000002e-64

            1. Initial program 85.1%

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

              \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
            3. 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--.f6468.3

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

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

            if 5.3000000000000002e-64 < t < 6.6999999999999997e115

            1. Initial program 74.3%

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

                \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6486.5

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

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

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

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

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

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

              Alternative 11: 58.7% accurate, 0.8× speedup?

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

                1. Initial program 31.2%

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

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

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

                  if -1.3000000000000001e136 < t < 1300

                  1. Initial program 85.3%

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

                    \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
                  3. 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--.f6467.1

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

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

                  if 1300 < t < 1.14999999999999993e158

                  1. Initial program 62.9%

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

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

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

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

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

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

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

                      \[\leadsto \left(\frac{-1 \cdot \left(z - t\right)}{a - t} + 1\right) \cdot x \]
                    7. mul-1-negN/A

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

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

                      \[\leadsto \left(\frac{-\left(z - t\right)}{a - t} + 1\right) \cdot x \]
                    10. lift--.f6437.3

                      \[\leadsto \left(\frac{-\left(z - t\right)}{a - t} + 1\right) \cdot x \]
                  4. Applied rewrites37.3%

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

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

                      \[\leadsto \frac{z - a}{t} \cdot x \]
                    2. lower--.f6425.1

                      \[\leadsto \frac{z - a}{t} \cdot x \]
                  7. Applied rewrites25.1%

                    \[\leadsto \frac{z - a}{t} \cdot x \]
                4. Recombined 3 regimes into one program.
                5. Add Preprocessing

                Alternative 12: 53.2% accurate, 0.8× speedup?

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

                  1. Initial program 31.2%

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

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

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

                    if -3.99999999999999969e134 < t < 1.56e72

                    1. Initial program 84.2%

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

                        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6492.2

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

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

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

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

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

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

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

                      if 1.56e72 < t < 1.14999999999999993e158

                      1. Initial program 55.8%

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

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

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

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

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

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

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

                          \[\leadsto \left(\frac{-1 \cdot \left(z - t\right)}{a - t} + 1\right) \cdot x \]
                        7. mul-1-negN/A

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

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

                          \[\leadsto \left(\frac{-\left(z - t\right)}{a - t} + 1\right) \cdot x \]
                        10. lift--.f6429.7

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

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

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

                          \[\leadsto \frac{z - a}{t} \cdot x \]
                        2. lower--.f6425.5

                          \[\leadsto \frac{z - a}{t} \cdot x \]
                      7. Applied rewrites25.5%

                        \[\leadsto \frac{z - a}{t} \cdot x \]
                    9. Recombined 3 regimes into one program.
                    10. Add Preprocessing

                    Alternative 13: 52.6% accurate, 0.8× speedup?

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

                      1. Initial program 31.2%

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

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

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

                        if -3.99999999999999969e134 < t < 1.6599999999999999e72

                        1. Initial program 84.2%

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

                            \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6492.3

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

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

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

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

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

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

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

                          if 1.6599999999999999e72 < t < 1.14999999999999993e158

                          1. Initial program 55.9%

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

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

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

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

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

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

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

                              \[\leadsto \left(\frac{-1 \cdot \left(z - t\right)}{a - t} + 1\right) \cdot x \]
                            7. mul-1-negN/A

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

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

                              \[\leadsto \left(\frac{-\left(z - t\right)}{a - t} + 1\right) \cdot x \]
                            10. lift--.f6429.6

                              \[\leadsto \left(\frac{-\left(z - t\right)}{a - t} + 1\right) \cdot x \]
                          4. Applied rewrites29.6%

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

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

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

                              \[\leadsto \frac{x \cdot \left(z - a\right)}{t} \]
                            3. lower--.f6423.2

                              \[\leadsto \frac{x \cdot \left(z - a\right)}{t} \]
                          7. Applied rewrites23.2%

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

                        Alternative 14: 52.4% accurate, 1.1× speedup?

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

                          1. Initial program 33.8%

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

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

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

                            if -3.99999999999999969e134 < t < 2.34999999999999999e112

                            1. Initial program 83.0%

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

                                \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\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--.f6491.6

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

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

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

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

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

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

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

                            Alternative 15: 52.1% accurate, 1.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{+134}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{+112}:\\ \;\;\;\;\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 -2.2e+134) y (if (<= t 2.35e+112) (fma z (/ y a) x) y)))
                            double code(double x, double y, double z, double t, double a) {
                            	double tmp;
                            	if (t <= -2.2e+134) {
                            		tmp = y;
                            	} else if (t <= 2.35e+112) {
                            		tmp = fma(z, (y / a), x);
                            	} else {
                            		tmp = y;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z, t, a)
                            	tmp = 0.0
                            	if (t <= -2.2e+134)
                            		tmp = y;
                            	elseif (t <= 2.35e+112)
                            		tmp = fma(z, Float64(y / a), x);
                            	else
                            		tmp = y;
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.2e+134], y, If[LessEqual[t, 2.35e+112], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], y]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;t \leq -2.2 \cdot 10^{+134}:\\
                            \;\;\;\;y\\
                            
                            \mathbf{elif}\;t \leq 2.35 \cdot 10^{+112}:\\
                            \;\;\;\;\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 < -2.2e134 or 2.34999999999999999e112 < t

                              1. Initial program 33.9%

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

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

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

                                if -2.2e134 < t < 2.34999999999999999e112

                                1. Initial program 83.0%

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

                                  \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
                                3. 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.9

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

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

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

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

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

                              Alternative 16: 38.7% accurate, 0.8× speedup?

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

                                1. Initial program 69.1%

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

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

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

                                  if -1.3500000000000001e59 < a < -4.99999999999999999e-79

                                  1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{y \cdot z}{a} \]
                                  7. Applied rewrites20.3%

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

                                  if -4.99999999999999999e-79 < a < -5.0000000000000002e-217

                                  1. Initial program 65.0%

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

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

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

                                    if -5.0000000000000002e-217 < a < 3.8999999999999997e42

                                    1. Initial program 68.0%

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

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

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

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

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

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

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

                                        \[\leadsto \left(\frac{-1 \cdot \left(z - t\right)}{a - t} + 1\right) \cdot x \]
                                      7. mul-1-negN/A

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

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

                                        \[\leadsto \left(\frac{-\left(z - t\right)}{a - t} + 1\right) \cdot x \]
                                      10. lift--.f6433.2

                                        \[\leadsto \left(\frac{-\left(z - t\right)}{a - t} + 1\right) \cdot x \]
                                    4. Applied rewrites33.2%

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

                                      \[\leadsto \frac{z}{t} \cdot x \]
                                    6. Step-by-step derivation
                                      1. lower-/.f6429.0

                                        \[\leadsto \frac{z}{t} \cdot x \]
                                    7. Applied rewrites29.0%

                                      \[\leadsto \frac{z}{t} \cdot x \]
                                  4. Recombined 4 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 17: 36.7% accurate, 0.8× speedup?

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

                                    1. Initial program 69.1%

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

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

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

                                      if -1.3500000000000001e59 < a < -4.99999999999999999e-79

                                      1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{y \cdot z}{a} \]
                                      7. Applied rewrites20.3%

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

                                      if -4.99999999999999999e-79 < a < -5.0000000000000002e-217

                                      1. Initial program 65.0%

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

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

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

                                        if -5.0000000000000002e-217 < a < 1.3e40

                                        1. Initial program 67.9%

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

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

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

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

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

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

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

                                            \[\leadsto \left(\frac{-1 \cdot \left(z - t\right)}{a - t} + 1\right) \cdot x \]
                                          7. mul-1-negN/A

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

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

                                            \[\leadsto \left(\frac{-\left(z - t\right)}{a - t} + 1\right) \cdot x \]
                                          10. lift--.f6433.1

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

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

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

                                            \[\leadsto \frac{x \cdot z}{t} \]
                                          2. lower-*.f6426.4

                                            \[\leadsto \frac{x \cdot z}{t} \]
                                        7. Applied rewrites26.4%

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

                                      Alternative 18: 35.8% accurate, 1.2× speedup?

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

                                        1. Initial program 69.2%

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

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

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

                                          if -3.09999999999999997e-33 < a < 1.3e40

                                          1. Initial program 67.9%

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

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

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

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

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

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

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

                                              \[\leadsto \left(\frac{-1 \cdot \left(z - t\right)}{a - t} + 1\right) \cdot x \]
                                            7. mul-1-negN/A

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

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

                                              \[\leadsto \left(\frac{-\left(z - t\right)}{a - t} + 1\right) \cdot x \]
                                            10. lift--.f6432.9

                                              \[\leadsto \left(\frac{-\left(z - t\right)}{a - t} + 1\right) \cdot x \]
                                          4. Applied rewrites32.9%

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

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

                                              \[\leadsto \frac{x \cdot z}{t} \]
                                            2. lower-*.f6425.3

                                              \[\leadsto \frac{x \cdot z}{t} \]
                                          7. Applied rewrites25.3%

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

                                        Alternative 19: 34.2% accurate, 2.1× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+54}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+115}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a)
                                         :precision binary64
                                         (if (<= t -1.1e+54) y (if (<= t 4e+115) x y)))
                                        double code(double x, double y, double z, double t, double a) {
                                        	double tmp;
                                        	if (t <= -1.1e+54) {
                                        		tmp = y;
                                        	} else if (t <= 4e+115) {
                                        		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 <= (-1.1d+54)) then
                                                tmp = y
                                            else if (t <= 4d+115) 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 <= -1.1e+54) {
                                        		tmp = y;
                                        	} else if (t <= 4e+115) {
                                        		tmp = x;
                                        	} else {
                                        		tmp = y;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t, a):
                                        	tmp = 0
                                        	if t <= -1.1e+54:
                                        		tmp = y
                                        	elif t <= 4e+115:
                                        		tmp = x
                                        	else:
                                        		tmp = y
                                        	return tmp
                                        
                                        function code(x, y, z, t, a)
                                        	tmp = 0.0
                                        	if (t <= -1.1e+54)
                                        		tmp = y;
                                        	elseif (t <= 4e+115)
                                        		tmp = x;
                                        	else
                                        		tmp = y;
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x, y, z, t, a)
                                        	tmp = 0.0;
                                        	if (t <= -1.1e+54)
                                        		tmp = y;
                                        	elseif (t <= 4e+115)
                                        		tmp = x;
                                        	else
                                        		tmp = y;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.1e+54], y, If[LessEqual[t, 4e+115], x, y]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;t \leq -1.1 \cdot 10^{+54}:\\
                                        \;\;\;\;y\\
                                        
                                        \mathbf{elif}\;t \leq 4 \cdot 10^{+115}:\\
                                        \;\;\;\;x\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;y\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if t < -1.09999999999999995e54 or 4.0000000000000001e115 < t

                                          1. Initial program 38.9%

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

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

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

                                            if -1.09999999999999995e54 < t < 4.0000000000000001e115

                                            1. Initial program 85.3%

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

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

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

                                            Alternative 20: 25.8% accurate, 17.9× 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 68.6%

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

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

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

                                              Reproduce

                                              ?
                                              herbie shell --seed 2025119 
                                              (FPCore (x y z t a)
                                                :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                                :precision binary64
                                                (+ x (/ (* (- y x) (- z t)) (- a t))))