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

Percentage Accurate: 68.1% → 88.9%
Time: 4.9s
Alternatives: 21
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 21 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.1% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 88.9% 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^{-167}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\left(\mathsf{fma}\left(a, \frac{-1 \cdot \left(\left(y - x\right) \cdot \left(z - a\right)\right)}{t \cdot t}, -\frac{\left(y - x\right) \cdot z}{t}\right) + y\right) - \left(-\frac{\left(y - x\right) \cdot a}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- y x) (/ (- z t) (- a t)) x))
        (t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
   (if (<= t_2 -2e-167)
     t_1
     (if (<= t_2 0.0)
       (-
        (+
         (fma
          a
          (/ (* -1.0 (* (- y x) (- z a))) (* t t))
          (- (/ (* (- y x) z) t)))
         y)
        (- (/ (* (- 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 - t)), x);
	double t_2 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_2 <= -2e-167) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = (fma(a, ((-1.0 * ((y - x) * (z - a))) / (t * t)), -(((y - x) * z) / t)) + y) - -(((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) / 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-167)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(fma(a, Float64(Float64(-1.0 * Float64(Float64(y - x) * Float64(z - a))) / Float64(t * t)), Float64(-Float64(Float64(Float64(y - x) * z) / t))) + y) - Float64(-Float64(Float64(Float64(y - x) * 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] / 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-167], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(N[(a * N[(N[(-1.0 * N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * t), $MachinePrecision]), $MachinePrecision] + (-N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision])), $MachinePrecision] + y), $MachinePrecision] - (-N[(N[(N[(y - x), $MachinePrecision] * a), $MachinePrecision] / t), $MachinePrecision])), $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^{-167}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 72.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--.f6489.8

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

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

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

    1. Initial program 27.9%

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

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

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

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

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

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

    1. Initial program 72.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--.f6489.8

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

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

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

    1. Initial program 27.9%

      \[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--.f6428.6

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

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

      \[\leadsto \mathsf{fma}\left(y - x, \color{blue}{-1 \cdot \left(z \cdot \left(\frac{t}{z \cdot \left(a - t\right)} - \frac{1}{a - t}\right)\right)}, x\right) \]
    5. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y + -1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
    8. Step-by-step derivation
      1. fp-cancel-sign-sub-invN/A

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

        \[\leadsto y - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      3. metadata-evalN/A

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

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

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

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

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

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

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

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

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

Alternative 3: 88.9% 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^{-167}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\left(y + \left(-\frac{z \cdot \left(y - x\right)}{t}\right)\right) - \left(-\frac{a \cdot \left(y - x\right)}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- y x) (/ (- z t) (- a t)) x))
        (t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
   (if (<= t_2 -2e-167)
     t_1
     (if (<= t_2 0.0)
       (- (+ y (- (/ (* z (- y x)) t))) (- (/ (* a (- y x)) t)))
       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-167) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = (y + -((z * (y - x)) / t)) - -((a * (y - x)) / t);
	} 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-167)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(y + Float64(-Float64(Float64(z * Float64(y - x)) / t))) - Float64(-Float64(Float64(a * Float64(y - x)) / 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] / 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-167], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(y + (-N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision])), $MachinePrecision] - (-N[(N[(a * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision])), $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^{-167}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 72.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--.f6489.8

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

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

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

    1. Initial program 27.9%

      \[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--.f6428.6

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)} \]
    4. 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}} \]
    5. Step-by-step derivation
      1. lower--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 88.7% 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^{-167}:\\ \;\;\;\;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-167)
     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-167) {
		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-167)
		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-167], 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^{-167}:\\
\;\;\;\;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))) < -2e-167 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 72.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--.f6489.8

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

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

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

    1. Initial program 27.9%

      \[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 rewrites80.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 5: 73.2% 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 -1.62 \cdot 10^{+53}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-44}:\\ \;\;\;\;\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) x)))
   (if (<= a -1.62e+53)
     t_1
     (if (<= a 2.5e-44) (+ (- (/ (* (- 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), x);
	double tmp;
	if (a <= -1.62e+53) {
		tmp = t_1;
	} else if (a <= 2.5e-44) {
		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) / a), x)
	tmp = 0.0
	if (a <= -1.62e+53)
		tmp = t_1;
	elseif (a <= 2.5e-44)
		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] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.62e+53], t$95$1, If[LessEqual[a, 2.5e-44], 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}, x\right)\\
\mathbf{if}\;a \leq -1.62 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{-44}:\\
\;\;\;\;\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 a < -1.61999999999999999e53 or 2.50000000000000019e-44 < a

    1. Initial program 69.5%

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

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

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

    if -1.61999999999999999e53 < a < 2.50000000000000019e-44

    1. Initial program 66.8%

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

      \[\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 6: 68.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\ \mathbf{if}\;a \leq -1.75 \cdot 10^{+61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -6.7 \cdot 10^{-90}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-59}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{-t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- y x) (/ (- z t) a) x)))
   (if (<= a -1.75e+61)
     t_1
     (if (<= a -6.7e-90)
       (* y (/ (- z t) (- a t)))
       (if (<= a 9e-59) (fma (- y x) (/ (- z t) (- t)) x) 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 <= -1.75e+61) {
		tmp = t_1;
	} else if (a <= -6.7e-90) {
		tmp = y * ((z - t) / (a - t));
	} else if (a <= 9e-59) {
		tmp = fma((y - x), ((z - t) / -t), x);
	} 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 <= -1.75e+61)
		tmp = t_1;
	elseif (a <= -6.7e-90)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	elseif (a <= 9e-59)
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(-t)), x);
	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, -1.75e+61], t$95$1, If[LessEqual[a, -6.7e-90], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e-59], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / (-t)), $MachinePrecision] + x), $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 -1.75 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -6.7 \cdot 10^{-90}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.75000000000000009e61 or 9.00000000000000023e-59 < a

    1. Initial program 69.4%

      \[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--.f6474.3

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

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

    if -1.75000000000000009e61 < a < -6.7000000000000004e-90

    1. Initial program 71.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--.f6483.0

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

      \[\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--.f6454.1

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

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

    if -6.7000000000000004e-90 < a < 9.00000000000000023e-59

    1. Initial program 65.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--.f6476.0

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

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

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

        \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\mathsf{neg}\left(t\right)}, x\right) \]
      2. lower-neg.f6461.7

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

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

Alternative 7: 67.1% 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 -1.75 \cdot 10^{+61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-44}:\\ \;\;\;\;y \cdot \frac{z - t}{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 -1.75e+61)
     t_1
     (if (<= a 2.5e-44) (* y (/ (- z t) (- 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 <= -1.75e+61) {
		tmp = t_1;
	} else if (a <= 2.5e-44) {
		tmp = y * ((z - t) / (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 <= -1.75e+61)
		tmp = t_1;
	elseif (a <= 2.5e-44)
		tmp = Float64(y * Float64(Float64(z - t) / 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, -1.75e+61], t$95$1, If[LessEqual[a, 2.5e-44], N[(y * N[(N[(z - t), $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 -1.75 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 2.5 \cdot 10^{-44}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.75000000000000009e61 or 2.50000000000000019e-44 < a

    1. Initial program 69.5%

      \[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--.f6475.0

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

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

    if -1.75000000000000009e61 < a < 2.50000000000000019e-44

    1. Initial program 66.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--.f6477.6

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

      \[\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--.f6461.4

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

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

Alternative 8: 64.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;y \leq -7.6 \cdot 10^{-65}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+71}:\\ \;\;\;\;\left(\frac{-z}{a - t} + 1\right) \cdot x\\ \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 (<= y -7.6e-65)
     t_1
     (if (<= y 6.2e+71) (* (+ (/ (- z) (- a t)) 1.0) 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 (y <= -7.6e-65) {
		tmp = t_1;
	} else if (y <= 6.2e+71) {
		tmp = ((-z / (a - t)) + 1.0) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((z - t) / (a - t))
    if (y <= (-7.6d-65)) then
        tmp = t_1
    else if (y <= 6.2d+71) then
        tmp = ((-z / (a - t)) + 1.0d0) * x
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((z - t) / (a - t));
	double tmp;
	if (y <= -7.6e-65) {
		tmp = t_1;
	} else if (y <= 6.2e+71) {
		tmp = ((-z / (a - t)) + 1.0) * x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((z - t) / (a - t))
	tmp = 0
	if y <= -7.6e-65:
		tmp = t_1
	elif y <= 6.2e+71:
		tmp = ((-z / (a - t)) + 1.0) * 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 (y <= -7.6e-65)
		tmp = t_1;
	elseif (y <= 6.2e+71)
		tmp = Float64(Float64(Float64(Float64(-z) / Float64(a - t)) + 1.0) * x);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((z - t) / (a - t));
	tmp = 0.0;
	if (y <= -7.6e-65)
		tmp = t_1;
	elseif (y <= 6.2e+71)
		tmp = ((-z / (a - t)) + 1.0) * x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.6e-65], t$95$1, If[LessEqual[y, 6.2e+71], N[(N[(N[((-z) / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.6000000000000003e-65 or 6.20000000000000036e71 < y

    1. Initial program 65.6%

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

        \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{a - t}}, x\right) \]
    3. Applied rewrites91.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--.f6472.2

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

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

    if -7.6000000000000003e-65 < y < 6.20000000000000036e71

    1. Initial program 70.6%

      \[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--.f6456.7

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

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

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

        \[\leadsto \left(\frac{-z}{a - t} + 1\right) \cdot x \]
    7. Recombined 2 regimes into one program.
    8. Add Preprocessing

    Alternative 9: 63.4% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \mathbf{if}\;a \leq -1.3 \cdot 10^{+62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.26 \cdot 10^{+33}:\\ \;\;\;\;y \cdot \frac{z - t}{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 a) x)))
       (if (<= a -1.3e+62)
         t_1
         (if (<= a 1.26e+33) (* y (/ (- z t) (- a t))) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = fma((y - x), (z / a), x);
    	double tmp;
    	if (a <= -1.3e+62) {
    		tmp = t_1;
    	} else if (a <= 1.26e+33) {
    		tmp = y * ((z - t) / (a - t));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = fma(Float64(y - x), Float64(z / a), x)
    	tmp = 0.0
    	if (a <= -1.3e+62)
    		tmp = t_1;
    	elseif (a <= 1.26e+33)
    		tmp = Float64(y * Float64(Float64(z - t) / 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[(z / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.3e+62], t$95$1, If[LessEqual[a, 1.26e+33], N[(y * N[(N[(z - t), $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}{a}, x\right)\\
    \mathbf{if}\;a \leq -1.3 \cdot 10^{+62}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq 1.26 \cdot 10^{+33}:\\
    \;\;\;\;y \cdot \frac{z - t}{a - t}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < -1.29999999999999992e62 or 1.26e33 < a

      1. Initial program 69.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--.f6492.0

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

        \[\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 -1.29999999999999992e62 < a < 1.26e33

      1. Initial program 67.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--.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 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--.f6460.9

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

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

    Alternative 10: 59.7% accurate, 0.8× speedup?

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

      1. Initial program 29.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 rewrites55.4%

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

        if -1.7e205 < t < -1.45e-91

        1. Initial program 66.3%

          \[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--.f6435.2

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

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

        if -1.45e-91 < t < 6.4999999999999997e119

        1. Initial program 86.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--.f6493.2

            \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{a - t}}, x\right) \]
        3. Applied rewrites93.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-/.f6469.6

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

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

      Alternative 11: 58.6% accurate, 0.9× speedup?

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

        1. Initial program 29.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 rewrites55.2%

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

          if -9.79999999999999968e185 < t < 6.4999999999999997e119

          1. Initial program 80.9%

            \[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.3

              \[\leadsto \mathsf{fma}\left(y - x, \frac{z - t}{\color{blue}{a - t}}, x\right) \]
          3. Applied rewrites90.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-/.f6461.2

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

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

        Alternative 12: 58.0% accurate, 0.9× speedup?

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

          1. Initial program 29.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 rewrites55.2%

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

            if -9.79999999999999968e185 < t < 6.4999999999999997e119

            1. Initial program 80.9%

              \[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--.f6459.7

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

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

          Alternative 13: 47.7% accurate, 0.8× speedup?

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

            1. Initial program 74.2%

              \[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--.f6449.4

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

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

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

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

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

                \[\leadsto \left(-\frac{z}{a - t}\right) \cdot x \]
              4. lift--.f6447.9

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

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

            if -1.1500000000000001e239 < z < -3.2000000000000001e109 or 1.55e133 < z

            1. Initial program 67.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--.f6491.2

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

              \[\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--.f6451.7

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

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

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

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

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

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

            if -3.2000000000000001e109 < z < 1.55e133

            1. Initial program 67.8%

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

              \[\leadsto x + \color{blue}{\left(y - x\right)} \]
            3. Step-by-step derivation
              1. lift--.f6423.4

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

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

              \[\leadsto x + y \]
            6. Step-by-step derivation
              1. Applied rewrites42.4%

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

            Alternative 14: 42.5% accurate, 0.8× speedup?

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

              1. Initial program 74.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--.f6449.5

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

                \[\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-/.f6436.3

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

                \[\leadsto \frac{z}{t} \cdot x \]

              if -1.0499999999999999e240 < z < -3.2000000000000001e109 or 1.55e133 < z

              1. Initial program 67.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--.f6491.2

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

                \[\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--.f6451.7

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

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

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

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

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

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

              if -3.2000000000000001e109 < z < 1.55e133

              1. Initial program 67.8%

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

                \[\leadsto x + \color{blue}{\left(y - x\right)} \]
              3. Step-by-step derivation
                1. lift--.f6423.4

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

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

                \[\leadsto x + y \]
              6. Step-by-step derivation
                1. Applied rewrites42.4%

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

              Alternative 15: 41.9% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -9.8 \cdot 10^{+185}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+119}:\\ \;\;\;\;\left(1 - \frac{z}{a}\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (if (<= t -9.8e+185) y (if (<= t 6.5e+119) (* (- 1.0 (/ z a)) x) y)))
              double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (t <= -9.8e+185) {
              		tmp = y;
              	} else if (t <= 6.5e+119) {
              		tmp = (1.0 - (z / a)) * 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 <= (-9.8d+185)) then
                      tmp = y
                  else if (t <= 6.5d+119) then
                      tmp = (1.0d0 - (z / a)) * 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 <= -9.8e+185) {
              		tmp = y;
              	} else if (t <= 6.5e+119) {
              		tmp = (1.0 - (z / a)) * x;
              	} else {
              		tmp = y;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	tmp = 0
              	if t <= -9.8e+185:
              		tmp = y
              	elif t <= 6.5e+119:
              		tmp = (1.0 - (z / a)) * x
              	else:
              		tmp = y
              	return tmp
              
              function code(x, y, z, t, a)
              	tmp = 0.0
              	if (t <= -9.8e+185)
              		tmp = y;
              	elseif (t <= 6.5e+119)
              		tmp = Float64(Float64(1.0 - Float64(z / a)) * x);
              	else
              		tmp = y;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	tmp = 0.0;
              	if (t <= -9.8e+185)
              		tmp = y;
              	elseif (t <= 6.5e+119)
              		tmp = (1.0 - (z / a)) * x;
              	else
              		tmp = y;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.8e+185], y, If[LessEqual[t, 6.5e+119], N[(N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], y]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;t \leq -9.8 \cdot 10^{+185}:\\
              \;\;\;\;y\\
              
              \mathbf{elif}\;t \leq 6.5 \cdot 10^{+119}:\\
              \;\;\;\;\left(1 - \frac{z}{a}\right) \cdot x\\
              
              \mathbf{else}:\\
              \;\;\;\;y\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < -9.79999999999999968e185 or 6.4999999999999997e119 < t

                1. Initial program 29.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 rewrites55.2%

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

                  if -9.79999999999999968e185 < t < 6.4999999999999997e119

                  1. Initial program 80.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--.f6452.1

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

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

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

                      \[\leadsto \left(1 - \frac{z}{a}\right) \cdot x \]
                    2. lower-/.f6445.2

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

                    \[\leadsto \left(1 - \frac{z}{a}\right) \cdot x \]
                4. Recombined 2 regimes into one program.
                5. Add Preprocessing

                Alternative 16: 39.3% accurate, 1.0× speedup?

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

                  1. Initial program 73.3%

                    \[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--.f6449.4

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

                    \[\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-/.f6434.9

                      \[\leadsto \frac{z}{t} \cdot x \]
                  7. Applied rewrites34.9%

                    \[\leadsto \frac{z}{t} \cdot x \]

                  if -2.2999999999999999e229 < z < -3.40000000000000006e109 or 2.5000000000000001e147 < z

                  1. Initial program 68.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 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--.f6451.7

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

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

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

                      \[\leadsto y \cdot \frac{z}{a} \]
                  9. Applied rewrites31.2%

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

                  if -3.40000000000000006e109 < z < 2.5000000000000001e147

                  1. Initial program 67.7%

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

                    \[\leadsto x + \color{blue}{\left(y - x\right)} \]
                  3. Step-by-step derivation
                    1. lift--.f6423.2

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

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

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

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

                  Alternative 17: 39.1% accurate, 1.2× speedup?

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

                    1. Initial program 69.6%

                      \[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--.f6450.4

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

                      \[\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-/.f6435.8

                        \[\leadsto \frac{z}{t} \cdot x \]
                    7. Applied rewrites35.8%

                      \[\leadsto \frac{z}{t} \cdot x \]

                    if -4.09999999999999976e173 < z < 1.15000000000000003e232

                    1. Initial program 67.8%

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

                      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
                    3. Step-by-step derivation
                      1. lift--.f6421.7

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

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

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

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

                    Alternative 18: 38.6% accurate, 1.2× speedup?

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

                      1. Initial program 69.6%

                        \[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--.f6450.4

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

                        \[\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-*.f6428.0

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

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

                      if -4.30000000000000025e173 < z < 2.34999999999999996e232

                      1. Initial program 67.8%

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

                        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
                      3. Step-by-step derivation
                        1. lift--.f6421.7

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

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

                        \[\leadsto x + y \]
                      6. Step-by-step derivation
                        1. Applied rewrites39.1%

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

                      Alternative 19: 38.0% accurate, 1.6× speedup?

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

                        1. Initial program 67.9%

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

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

                          if -7.0000000000000002e54 < a < 3.5e-149

                          1. Initial program 67.4%

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

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

                            if 3.5e-149 < a

                            1. Initial program 69.1%

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

                              \[\leadsto x + \color{blue}{\left(y - x\right)} \]
                            3. Step-by-step derivation
                              1. lift--.f6416.6

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

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

                              \[\leadsto x + y \]
                            6. Step-by-step derivation
                              1. Applied rewrites36.9%

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

                            Alternative 20: 37.2% accurate, 2.1× speedup?

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

                              1. Initial program 68.9%

                                \[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 rewrites49.8%

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

                                if -7.0000000000000002e54 < a < 3e85

                                1. Initial program 67.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 rewrites32.6%

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

                                Alternative 21: 25.4% 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.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 rewrites25.4%

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

                                  Reproduce

                                  ?
                                  herbie shell --seed 2025115 
                                  (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))))