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

Percentage Accurate: 68.3% → 91.1%
Time: 4.3s
Alternatives: 17
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 17 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.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 91.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y - x, \frac{z}{a - t} - \frac{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 -5 \cdot 10^{-294}:\\ \;\;\;\;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 (- a t)) (/ t (- a t))) x))
        (t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
   (if (<= t_2 -5e-294)
     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 / (a - t)) - (t / (a - t))), x);
	double t_2 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_2 <= -5e-294) {
		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 / Float64(a - t)) - Float64(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 <= -5e-294)
		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 / N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(t / N[(a - t), $MachinePrecision]), $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, -5e-294], 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}{a - t} - \frac{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 -5 \cdot 10^{-294}:\\
\;\;\;\;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))) < -5.0000000000000003e-294 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y + -1 \cdot \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)}{t} \]
      6. lift--.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--.f6498.0

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

      \[\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 2: 91.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y - x, \frac{z}{a - t} - \frac{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 -5 \cdot 10^{-294}:\\ \;\;\;\;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 (- a t)) (/ t (- a t))) x))
        (t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
   (if (<= t_2 -5e-294)
     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 / (a - t)) - (t / (a - t))), x);
	double t_2 = x + (((y - x) * (z - t)) / (a - t));
	double tmp;
	if (t_2 <= -5e-294) {
		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 / Float64(a - t)) - Float64(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 <= -5e-294)
		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 / N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(t / N[(a - t), $MachinePrecision]), $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, -5e-294], 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}{a - t} - \frac{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 -5 \cdot 10^{-294}:\\
\;\;\;\;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))) < -5.0000000000000003e-294 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 6.1%

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

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

Alternative 3: 91.1% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 6.1%

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

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

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

    1. Initial program 72.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)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 91.0% 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 -5 \cdot 10^{-294}:\\ \;\;\;\;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 -5e-294)
     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 <= -5e-294) {
		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 <= -5e-294)
		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, -5e-294], 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 -5 \cdot 10^{-294}:\\
\;\;\;\;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))) < -5.0000000000000003e-294 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 6.1%

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

      \[\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: 74.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.3999999999999999e88 or 5.2e39 < t

    1. Initial program 41.1%

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

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

    if -2.3999999999999999e88 < t < 5.2e39

    1. Initial program 86.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--.f6492.8

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

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

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

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

    Alternative 6: 73.8% accurate, 0.8× speedup?

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

      1. Initial program 41.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--.f6471.7

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

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

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

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

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

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

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

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

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

      if -8.4999999999999995e91 < t < 2.90000000000000007e38

      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--.f6492.8

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

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

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

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

      Alternative 7: 68.5% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+117}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{+84}:\\ \;\;\;\;-1 \cdot \left(x \cdot \left(-\frac{z - a}{t}\right)\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+38}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (* y (/ (- z t) (- a t)))))
         (if (<= t -2.8e+117)
           t_1
           (if (<= t -1.25e+84)
             (* -1.0 (* x (- (/ (- z a) t))))
             (if (<= t 2.9e+38) (fma (- y x) (/ (- z t) a) x) t_1)))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = y * ((z - t) / (a - t));
      	double tmp;
      	if (t <= -2.8e+117) {
      		tmp = t_1;
      	} else if (t <= -1.25e+84) {
      		tmp = -1.0 * (x * -((z - a) / t));
      	} else if (t <= 2.9e+38) {
      		tmp = fma((y - x), ((z - t) / a), x);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t)))
      	tmp = 0.0
      	if (t <= -2.8e+117)
      		tmp = t_1;
      	elseif (t <= -1.25e+84)
      		tmp = Float64(-1.0 * Float64(x * Float64(-Float64(Float64(z - a) / t))));
      	elseif (t <= 2.9e+38)
      		tmp = fma(Float64(y - x), Float64(Float64(z - t) / a), x);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+117], t$95$1, If[LessEqual[t, -1.25e+84], N[(-1.0 * N[(x * (-N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+38], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := y \cdot \frac{z - t}{a - t}\\
      \mathbf{if}\;t \leq -2.8 \cdot 10^{+117}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq -1.25 \cdot 10^{+84}:\\
      \;\;\;\;-1 \cdot \left(x \cdot \left(-\frac{z - a}{t}\right)\right)\\
      
      \mathbf{elif}\;t \leq 2.9 \cdot 10^{+38}:\\
      \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -2.79999999999999997e117 or 2.90000000000000007e38 < t

        1. Initial program 40.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--.f6471.2

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

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

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

        if -2.79999999999999997e117 < t < -1.25e84

        1. Initial program 62.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--.f6482.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.25e84 < t < 2.90000000000000007e38

        1. Initial program 86.7%

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

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

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

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

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

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

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

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

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

      Alternative 8: 66.9% accurate, 0.7× speedup?

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

        1. Initial program 46.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--.f6474.0

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

        if -2.79999999999999997e117 < t < -1.1799999999999999e83

        1. Initial program 61.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--.f6481.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.1799999999999999e83 < t < 7.5000000000000005e-54

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

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

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

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

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

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

      Alternative 9: 65.9% accurate, 0.9× speedup?

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

        1. Initial program 47.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--.f6474.5

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

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

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

        if -5.1000000000000003e82 < t < 7.5000000000000005e-54

        1. Initial program 87.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--.f6493.6

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

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

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

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

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

      Alternative 10: 58.6% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+117}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -8 \cdot 10^{+86}:\\ \;\;\;\;-1 \cdot \left(x \cdot \left(-\frac{z}{t}\right)\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+44}:\\ \;\;\;\;\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 -2.5e+117)
         (+ x y)
         (if (<= t -8e+86)
           (* -1.0 (* x (- (/ z t))))
           (if (<= t 3.1e+44) (fma (- y x) (/ z a) x) y))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (t <= -2.5e+117) {
      		tmp = x + y;
      	} else if (t <= -8e+86) {
      		tmp = -1.0 * (x * -(z / t));
      	} else if (t <= 3.1e+44) {
      		tmp = fma((y - x), (z / a), x);
      	} else {
      		tmp = y;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (t <= -2.5e+117)
      		tmp = Float64(x + y);
      	elseif (t <= -8e+86)
      		tmp = Float64(-1.0 * Float64(x * Float64(-Float64(z / t))));
      	elseif (t <= 3.1e+44)
      		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, -2.5e+117], N[(x + y), $MachinePrecision], If[LessEqual[t, -8e+86], N[(-1.0 * N[(x * (-N[(z / t), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+44], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], y]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq -2.5 \cdot 10^{+117}:\\
      \;\;\;\;x + y\\
      
      \mathbf{elif}\;t \leq -8 \cdot 10^{+86}:\\
      \;\;\;\;-1 \cdot \left(x \cdot \left(-\frac{z}{t}\right)\right)\\
      
      \mathbf{elif}\;t \leq 3.1 \cdot 10^{+44}:\\
      \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;y\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if t < -2.49999999999999992e117

        1. Initial program 35.3%

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

            \[\leadsto x + \left(y - \color{blue}{x}\right) \]
        4. Applied rewrites40.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 rewrites44.3%

            \[\leadsto x + y \]

          if -2.49999999999999992e117 < t < -8.0000000000000001e86

          1. Initial program 61.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--.f6482.0

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

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

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

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

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

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

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

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

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

              \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{\color{blue}{a - t}}\right)\right)\right) \]
            8. lift--.f6438.0

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

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

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

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

              \[\leadsto -1 \cdot \left(x \cdot \left(-\frac{z}{t}\right)\right) \]
            3. lower-/.f6416.5

              \[\leadsto -1 \cdot \left(x \cdot \left(-\frac{z}{t}\right)\right) \]
          9. Applied rewrites16.5%

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

          if -8.0000000000000001e86 < t < 3.09999999999999996e44

          1. Initial program 86.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--.f6492.8

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

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

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

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

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

          if 3.09999999999999996e44 < t

          1. Initial program 42.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 rewrites45.8%

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

          Alternative 11: 57.7% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+117}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -8 \cdot 10^{+86}:\\ \;\;\;\;-1 \cdot \left(x \cdot \left(-\frac{z}{t}\right)\right)\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+44}:\\ \;\;\;\;\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 -2.5e+117)
             (+ x y)
             (if (<= t -8e+86)
               (* -1.0 (* x (- (/ z t))))
               (if (<= t 3.1e+44) (fma z (/ (- y x) a) x) y))))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (t <= -2.5e+117) {
          		tmp = x + y;
          	} else if (t <= -8e+86) {
          		tmp = -1.0 * (x * -(z / t));
          	} else if (t <= 3.1e+44) {
          		tmp = fma(z, ((y - x) / a), x);
          	} else {
          		tmp = y;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (t <= -2.5e+117)
          		tmp = Float64(x + y);
          	elseif (t <= -8e+86)
          		tmp = Float64(-1.0 * Float64(x * Float64(-Float64(z / t))));
          	elseif (t <= 3.1e+44)
          		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, -2.5e+117], N[(x + y), $MachinePrecision], If[LessEqual[t, -8e+86], N[(-1.0 * N[(x * (-N[(z / t), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+44], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], y]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;t \leq -2.5 \cdot 10^{+117}:\\
          \;\;\;\;x + y\\
          
          \mathbf{elif}\;t \leq -8 \cdot 10^{+86}:\\
          \;\;\;\;-1 \cdot \left(x \cdot \left(-\frac{z}{t}\right)\right)\\
          
          \mathbf{elif}\;t \leq 3.1 \cdot 10^{+44}:\\
          \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;y\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if t < -2.49999999999999992e117

            1. Initial program 35.3%

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

                \[\leadsto x + \left(y - \color{blue}{x}\right) \]
            4. Applied rewrites40.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 rewrites44.3%

                \[\leadsto x + y \]

              if -2.49999999999999992e117 < t < -8.0000000000000001e86

              1. Initial program 61.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--.f6482.0

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

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

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

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

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

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

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

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

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

                  \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{\color{blue}{a - t}}\right)\right)\right) \]
                8. lift--.f6438.0

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

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

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

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

                  \[\leadsto -1 \cdot \left(x \cdot \left(-\frac{z}{t}\right)\right) \]
                3. lower-/.f6416.5

                  \[\leadsto -1 \cdot \left(x \cdot \left(-\frac{z}{t}\right)\right) \]
              9. Applied rewrites16.5%

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

              if -8.0000000000000001e86 < t < 3.09999999999999996e44

              1. Initial program 86.6%

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

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

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

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

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

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

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

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

              if 3.09999999999999996e44 < t

              1. Initial program 42.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 rewrites45.8%

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

              Alternative 12: 52.4% accurate, 0.9× speedup?

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

                1. Initial program 35.3%

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

                    \[\leadsto x + \left(y - \color{blue}{x}\right) \]
                4. Applied rewrites40.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 rewrites44.3%

                    \[\leadsto x + y \]

                  if -2.49999999999999992e117 < t < -1.1799999999999999e83

                  1. Initial program 61.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--.f6481.5

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

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

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

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

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

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

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

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

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

                      \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{\color{blue}{a - t}}\right)\right)\right) \]
                    8. lift--.f6437.2

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

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

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

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

                      \[\leadsto -1 \cdot \left(x \cdot \left(-\frac{z}{t}\right)\right) \]
                    3. lower-/.f6415.8

                      \[\leadsto -1 \cdot \left(x \cdot \left(-\frac{z}{t}\right)\right) \]
                  9. Applied rewrites15.8%

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

                  if -1.1799999999999999e83 < t < 2.3000000000000002e43

                  1. Initial program 86.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--.f6492.8

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

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

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

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

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

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

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

                    if 2.3000000000000002e43 < t

                    1. Initial program 42.7%

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

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

                    Alternative 13: 52.0% accurate, 0.9× speedup?

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

                      1. Initial program 35.3%

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

                          \[\leadsto x + \left(y - \color{blue}{x}\right) \]
                      4. Applied rewrites40.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 rewrites44.3%

                          \[\leadsto x + y \]

                        if -2.79999999999999997e117 < t < -1.1799999999999999e83

                        1. Initial program 61.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--.f6481.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -1.1799999999999999e83 < t < 2.3000000000000002e43

                        1. Initial program 86.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--.f6492.8

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

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

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

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

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

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

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

                          if 2.3000000000000002e43 < t

                          1. Initial program 42.7%

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

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

                          Alternative 14: 51.8% accurate, 1.1× speedup?

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

                            1. Initial program 39.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--.f6438.4

                                \[\leadsto x + \left(y - \color{blue}{x}\right) \]
                            4. Applied rewrites38.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 rewrites43.7%

                                \[\leadsto x + y \]

                              if -5.49999999999999997e82 < t < 2.3000000000000002e43

                              1. Initial program 86.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--.f6492.9

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

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

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

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

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

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

                                if 2.3000000000000002e43 < t

                                1. Initial program 42.7%

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

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

                                Alternative 15: 39.5% accurate, 2.1× speedup?

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

                                  1. Initial program 49.2%

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

                                      \[\leadsto x + \left(y - \color{blue}{x}\right) \]
                                  4. Applied rewrites32.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 rewrites40.9%

                                      \[\leadsto x + y \]

                                    if -1.65e-4 < t < 2.8e38

                                    1. Initial program 88.3%

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

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

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

                                      if 2.8e38 < t

                                      1. Initial program 43.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 rewrites45.2%

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

                                      Alternative 16: 38.7% accurate, 2.1× speedup?

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

                                        1. Initial program 41.0%

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

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

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

                                          if -8.2000000000000005e91 < t < 2.8e38

                                          1. Initial program 86.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} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites33.7%

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

                                          Alternative 17: 25.5% 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.3%

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

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

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

                                            Reproduce

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