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

Percentage Accurate: 68.8% → 91.2%
Time: 4.8s
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.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 91.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(-1, x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right), y \cdot \frac{z - t}{a - t}\right) \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (fma
  -1.0
  (* x (- (/ z (- a t)) (+ 1.0 (/ t (- a t)))))
  (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
	return fma(-1.0, (x * ((z / (a - t)) - (1.0 + (t / (a - t))))), (y * ((z - t) / (a - t))));
}
function code(x, y, z, t, a)
	return fma(-1.0, Float64(x * Float64(Float64(z / Float64(a - t)) - Float64(1.0 + Float64(t / Float64(a - t))))), Float64(y * Float64(Float64(z - t) / Float64(a - t))))
end
code[x_, y_, z_, t_, a_] := N[(-1.0 * N[(x * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(1.0 + N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(-1, x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right), y \cdot \frac{z - t}{a - t}\right)
\end{array}
Derivation
  1. Initial program 68.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--.f6483.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;x \leq 1.75 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(y - x, t\_1 - t\_2, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.79999999999999967e110 or 1.75e44 < x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -8.79999999999999967e110 < x < 1.75e44

      1. Initial program 76.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--.f6489.4

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

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

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

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

    Alternative 3: 89.7% accurate, 0.3× speedup?

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

      1. Initial program 73.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--.f6490.1

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

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

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

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

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

      1. Initial program 18.7%

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

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

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

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

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

      1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 18.7%

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

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

    Alternative 5: 73.3% accurate, 0.8× speedup?

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

      1. Initial program 38.5%

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

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

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

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

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

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

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

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

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

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

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

      if -4.5e99 < t < 5.00000000000000003e40

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

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

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

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

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

        if 5.00000000000000003e40 < t

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 73.3% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;t \leq -7 \cdot 10^{+118}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+40}:\\ \;\;\;\;\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 -7e+118)
           t_1
           (if (<= t 5e+40) (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 <= -7e+118) {
      		tmp = t_1;
      	} else if (t <= 5e+40) {
      		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 <= -7e+118)
      		tmp = t_1;
      	elseif (t <= 5e+40)
      		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, -7e+118], t$95$1, If[LessEqual[t, 5e+40], 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 -7 \cdot 10^{+118}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 5 \cdot 10^{+40}:\\
      \;\;\;\;\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 < -7.00000000000000033e118 or 5.00000000000000003e40 < t

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

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

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

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

        if -7.00000000000000033e118 < t < 5.00000000000000003e40

        1. Initial program 85.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.3

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

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

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

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

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;t \leq -3.7 \cdot 10^{+114}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+36}:\\ \;\;\;\;\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 -3.7e+114)
             t_1
             (if (<= t 3.6e+36) (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 <= -3.7e+114) {
        		tmp = t_1;
        	} else if (t <= 3.6e+36) {
        		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 <= -3.7e+114)
        		tmp = t_1;
        	elseif (t <= 3.6e+36)
        		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, -3.7e+114], t$95$1, If[LessEqual[t, 3.6e+36], 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 -3.7 \cdot 10^{+114}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 3.6 \cdot 10^{+36}:\\
        \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -3.7000000000000001e114 or 3.5999999999999997e36 < 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--.f6469.0

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

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

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

          if -3.7000000000000001e114 < t < 3.5999999999999997e36

          1. Initial program 86.0%

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

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

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

        Alternative 8: 66.7% accurate, 0.9× speedup?

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

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

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

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

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

          if -3.4999999999999999e-71 < t < 7.2e-10

          1. Initial program 90.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--.f6495.2

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

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

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

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

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

        Alternative 9: 60.0% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+244}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{+173}:\\ \;\;\;\;\frac{z - a}{t} \cdot x\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-71}:\\ \;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+37}:\\ \;\;\;\;\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 -5.2e+244)
           y
           (if (<= t -1.5e+173)
             (* (/ (- z a) t) x)
             (if (<= t -3.5e-71)
               (/ (* (- z t) y) (- a t))
               (if (<= t 2.4e+37) (fma (- y x) (/ z a) x) y)))))
        double code(double x, double y, double z, double t, double a) {
        	double tmp;
        	if (t <= -5.2e+244) {
        		tmp = y;
        	} else if (t <= -1.5e+173) {
        		tmp = ((z - a) / t) * x;
        	} else if (t <= -3.5e-71) {
        		tmp = ((z - t) * y) / (a - t);
        	} else if (t <= 2.4e+37) {
        		tmp = fma((y - x), (z / a), x);
        	} else {
        		tmp = y;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a)
        	tmp = 0.0
        	if (t <= -5.2e+244)
        		tmp = y;
        	elseif (t <= -1.5e+173)
        		tmp = Float64(Float64(Float64(z - a) / t) * x);
        	elseif (t <= -3.5e-71)
        		tmp = Float64(Float64(Float64(z - t) * y) / Float64(a - t));
        	elseif (t <= 2.4e+37)
        		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, -5.2e+244], y, If[LessEqual[t, -1.5e+173], N[(N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, -3.5e-71], N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e+37], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], y]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;t \leq -5.2 \cdot 10^{+244}:\\
        \;\;\;\;y\\
        
        \mathbf{elif}\;t \leq -1.5 \cdot 10^{+173}:\\
        \;\;\;\;\frac{z - a}{t} \cdot x\\
        
        \mathbf{elif}\;t \leq -3.5 \cdot 10^{-71}:\\
        \;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t}\\
        
        \mathbf{elif}\;t \leq 2.4 \cdot 10^{+37}:\\
        \;\;\;\;\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 < -5.2000000000000001e244 or 2.4e37 < t

          1. Initial program 38.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 rewrites48.6%

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

            if -5.2000000000000001e244 < t < -1.4999999999999999e173

            1. Initial program 39.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.4999999999999999e173 < t < -3.4999999999999999e-71

            1. Initial program 67.7%

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

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

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

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

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

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

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

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

            if -3.4999999999999999e-71 < t < 2.4e37

            1. Initial program 89.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--.f6494.4

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

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

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

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

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

          Alternative 10: 59.4% accurate, 0.8× speedup?

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

            1. Initial program 39.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 rewrites47.8%

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

              if -1.15e119 < t < -2.7000000000000001e-17

              1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

              if -2.7000000000000001e-17 < t < 2.4e37

              1. Initial program 89.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--.f6494.2

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

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

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

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

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

            Alternative 11: 58.7% accurate, 0.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.6 \cdot 10^{+118}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+37}:\\ \;\;\;\;\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 -7.6e+118) y (if (<= t 2.4e+37) (fma (- y x) (/ z a) x) y)))
            double code(double x, double y, double z, double t, double a) {
            	double tmp;
            	if (t <= -7.6e+118) {
            		tmp = y;
            	} else if (t <= 2.4e+37) {
            		tmp = fma((y - x), (z / a), x);
            	} else {
            		tmp = y;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a)
            	tmp = 0.0
            	if (t <= -7.6e+118)
            		tmp = y;
            	elseif (t <= 2.4e+37)
            		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, -7.6e+118], y, If[LessEqual[t, 2.4e+37], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], y]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;t \leq -7.6 \cdot 10^{+118}:\\
            \;\;\;\;y\\
            
            \mathbf{elif}\;t \leq 2.4 \cdot 10^{+37}:\\
            \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;y\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if t < -7.60000000000000033e118 or 2.4e37 < t

              1. Initial program 39.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 rewrites47.8%

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

                if -7.60000000000000033e118 < t < 2.4e37

                1. Initial program 85.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--.f6492.3

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

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

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

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

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

              Alternative 12: 58.6% accurate, 0.9× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.6 \cdot 10^{+118}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+37}:\\ \;\;\;\;\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 -7.6e+118) y (if (<= t 2.4e+37) (fma z (/ (- y x) a) x) y)))
              double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (t <= -7.6e+118) {
              		tmp = y;
              	} else if (t <= 2.4e+37) {
              		tmp = fma(z, ((y - x) / a), x);
              	} else {
              		tmp = y;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a)
              	tmp = 0.0
              	if (t <= -7.6e+118)
              		tmp = y;
              	elseif (t <= 2.4e+37)
              		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, -7.6e+118], y, If[LessEqual[t, 2.4e+37], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], y]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;t \leq -7.6 \cdot 10^{+118}:\\
              \;\;\;\;y\\
              
              \mathbf{elif}\;t \leq 2.4 \cdot 10^{+37}:\\
              \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;y\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < -7.60000000000000033e118 or 2.4e37 < t

                1. Initial program 39.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 rewrites47.8%

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

                  if -7.60000000000000033e118 < t < 2.4e37

                  1. Initial program 85.8%

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

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

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

                Alternative 13: 52.2% accurate, 0.9× speedup?

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

                  1. Initial program 39.3%

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

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

                    if -8.50000000000000057e115 < t < 2.10000000000000013e-297

                    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.10000000000000013e-297 < t < 1.04999999999999993e44

                    1. Initial program 88.7%

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

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

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

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

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

                    Alternative 14: 50.6% accurate, 1.1× speedup?

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

                      1. Initial program 39.3%

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

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

                        if -7.60000000000000033e118 < t < 1.04999999999999993e44

                        1. Initial program 85.7%

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

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

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

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

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

                        Alternative 15: 38.6% accurate, 1.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+191}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-180}:\\ \;\;\;\;\frac{z}{t} \cdot x\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{-307}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+40}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                        (FPCore (x y z t a)
                         :precision binary64
                         (if (<= t -4.4e+191)
                           y
                           (if (<= t -3.8e-180)
                             (* (/ z t) x)
                             (if (<= t 1.4e-307) (* y (/ z a)) (if (<= t 6e+40) x y)))))
                        double code(double x, double y, double z, double t, double a) {
                        	double tmp;
                        	if (t <= -4.4e+191) {
                        		tmp = y;
                        	} else if (t <= -3.8e-180) {
                        		tmp = (z / t) * x;
                        	} else if (t <= 1.4e-307) {
                        		tmp = y * (z / a);
                        	} else if (t <= 6e+40) {
                        		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 <= (-4.4d+191)) then
                                tmp = y
                            else if (t <= (-3.8d-180)) then
                                tmp = (z / t) * x
                            else if (t <= 1.4d-307) then
                                tmp = y * (z / a)
                            else if (t <= 6d+40) 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 <= -4.4e+191) {
                        		tmp = y;
                        	} else if (t <= -3.8e-180) {
                        		tmp = (z / t) * x;
                        	} else if (t <= 1.4e-307) {
                        		tmp = y * (z / a);
                        	} else if (t <= 6e+40) {
                        		tmp = x;
                        	} else {
                        		tmp = y;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a):
                        	tmp = 0
                        	if t <= -4.4e+191:
                        		tmp = y
                        	elif t <= -3.8e-180:
                        		tmp = (z / t) * x
                        	elif t <= 1.4e-307:
                        		tmp = y * (z / a)
                        	elif t <= 6e+40:
                        		tmp = x
                        	else:
                        		tmp = y
                        	return tmp
                        
                        function code(x, y, z, t, a)
                        	tmp = 0.0
                        	if (t <= -4.4e+191)
                        		tmp = y;
                        	elseif (t <= -3.8e-180)
                        		tmp = Float64(Float64(z / t) * x);
                        	elseif (t <= 1.4e-307)
                        		tmp = Float64(y * Float64(z / a));
                        	elseif (t <= 6e+40)
                        		tmp = x;
                        	else
                        		tmp = y;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a)
                        	tmp = 0.0;
                        	if (t <= -4.4e+191)
                        		tmp = y;
                        	elseif (t <= -3.8e-180)
                        		tmp = (z / t) * x;
                        	elseif (t <= 1.4e-307)
                        		tmp = y * (z / a);
                        	elseif (t <= 6e+40)
                        		tmp = x;
                        	else
                        		tmp = y;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.4e+191], y, If[LessEqual[t, -3.8e-180], N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 1.4e-307], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+40], x, y]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;t \leq -4.4 \cdot 10^{+191}:\\
                        \;\;\;\;y\\
                        
                        \mathbf{elif}\;t \leq -3.8 \cdot 10^{-180}:\\
                        \;\;\;\;\frac{z}{t} \cdot x\\
                        
                        \mathbf{elif}\;t \leq 1.4 \cdot 10^{-307}:\\
                        \;\;\;\;y \cdot \frac{z}{a}\\
                        
                        \mathbf{elif}\;t \leq 6 \cdot 10^{+40}:\\
                        \;\;\;\;x\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;y\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 4 regimes
                        2. if t < -4.4e191 or 6.0000000000000004e40 < t

                          1. Initial program 37.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 rewrites49.4%

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

                            if -4.4e191 < t < -3.79999999999999999e-180

                            1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -3.79999999999999999e-180 < t < 1.4e-307

                            1. Initial program 92.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--.f6497.3

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

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

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

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

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

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

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

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

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

                              \[\leadsto y \cdot \frac{z}{\color{blue}{a}} \]
                            8. Step-by-step derivation
                              1. lift-/.f6432.9

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

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

                            if 1.4e-307 < t < 6.0000000000000004e40

                            1. Initial program 88.9%

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

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

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

                            Alternative 16: 33.8% accurate, 2.1× speedup?

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

                              1. Initial program 39.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 rewrites48.0%

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

                                if -7.00000000000000033e118 < t < 6.0000000000000004e40

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

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

                                Alternative 17: 25.7% 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.8%

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

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

                                  Reproduce

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