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

Percentage Accurate: 68.3% → 89.9%
Time: 8.5s
Alternatives: 18
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
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 - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a):
	return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * (t - x)) / (a - z));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\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 18 alternatives:

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

Initial Program: 68.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
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 - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a):
	return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (((y - z) * (t - x)) / (a - z));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 89.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{z - y}{z - a} \cdot \left(t - x\right)\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-229}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ (- z y) (- z a)) (- t x))))
        (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_2 -1e-229)
     t_1
     (if (<= t_2 0.0)
       (+ t (* -1.0 (/ (- (* y (- t x)) (* a (- t x))) z)))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((z - y) / (z - a)) * (t - x));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -1e-229) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + (-1.0 * (((y * (t - x)) - (a * (t - x))) / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

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

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


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

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
      11. sub-negate-revN/A

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

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

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

        \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
      15. sub-negate-revN/A

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

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

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

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

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6446.9

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

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

Alternative 2: 89.4% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
      11. sub-negate-revN/A

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

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

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

        \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
      15. sub-negate-revN/A

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

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

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

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

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot \frac{t - x}{z} - y \cdot \frac{t - x}{z}\right) + t \]
      13. distribute-rgt-out--N/A

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

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

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

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

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

Alternative 3: 89.4% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)} \]
      10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot \frac{t - x}{z} - y \cdot \frac{t - x}{z}\right) + t \]
      13. distribute-rgt-out--N/A

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

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

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

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

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

Alternative 4: 85.2% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot \frac{t - x}{z} - y \cdot \frac{t - x}{z}\right) + t \]
      13. distribute-rgt-out--N/A

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

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

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

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

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

Alternative 5: 76.7% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.7000000000000003e-49 or 1.55e-7 < a

    1. Initial program 68.3%

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

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

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

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

        \[\leadsto x - \left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}}\right)\right) \]
      5. distribute-neg-fracN/A

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

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

        \[\leadsto x - \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}\right)}{a - z} \]
      8. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{t - x}{a} \cdot \left(z - y\right)}\right)\right) + x \]
        9. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

      if -5.7000000000000003e-49 < a < 1.55e-7

      1. Initial program 68.3%

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

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

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

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

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

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

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

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

          \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
        8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \left(\left(y - a\right) \cdot \frac{1}{z}\right) + t \]
        14. sub-negate-revN/A

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

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

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

    Alternative 6: 75.1% accurate, 0.8× speedup?

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

      1. Initial program 68.3%

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

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

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

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

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

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

        if -3.4499999999999998e-40 < a < 1.5e6

        1. Initial program 68.3%

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

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

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

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

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

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

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

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

            \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
          8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \left(\left(y - a\right) \cdot \frac{1}{z}\right) + t \]
          14. sub-negate-revN/A

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

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

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

      Alternative 7: 71.6% accurate, 0.8× speedup?

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

        1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
          11. sub-negate-revN/A

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

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

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

            \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
          15. sub-negate-revN/A

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

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

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

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

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

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

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

            \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
          3. fp-cancel-sign-sub-invN/A

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

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

            \[\leadsto x - \color{blue}{\left(t - x\right) \cdot \left(\mathsf{neg}\left(\frac{y}{a}\right)\right)} \]
          6. distribute-rgt-neg-inN/A

            \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right) \cdot \frac{y}{a}\right)\right)} \]
          7. distribute-lft-neg-inN/A

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

            \[\leadsto x - \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right)}\right)\right) \cdot \frac{y}{a} \]
          9. sub-negate-revN/A

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

            \[\leadsto x - \color{blue}{\left(x - t\right) \cdot \frac{y}{a}} \]
          11. lower--.f6448.3

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

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

        if -5.7000000000000003e-49 < a < 1.55e-7

        1. Initial program 68.3%

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

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

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

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

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

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

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

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

            \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
          8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \left(\left(y - a\right) \cdot \frac{1}{z}\right) + t \]
          14. sub-negate-revN/A

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

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

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

        if 1.55e-7 < a

        1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
          11. sub-negate-revN/A

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

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

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

            \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
          15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a}} + x \]
          5. lower-fma.f6448.3

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

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

      Alternative 8: 64.2% accurate, 0.6× speedup?

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

        1. Initial program 68.3%

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

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

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

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

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

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

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

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

            \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
          8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
          11. distribute-rgt-out--N/A

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

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

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

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

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

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

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

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

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

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

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

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

        if -6.49999999999999992e242 < z < -7.99999999999999999e-14 or 4.29999999999999974e88 < z < 6.80000000000000021e195

        1. Initial program 68.3%

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

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

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

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

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

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

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

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

            if -7.99999999999999999e-14 < z < 28

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
              11. sub-negate-revN/A

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

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

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

                \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a}} + x \]
              5. lower-fma.f6448.3

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

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

            if 28 < z < 4.29999999999999974e88

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              4. mult-flipN/A

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

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

                \[\leadsto \mathsf{neg}\left(\left(y \cdot \left(t - x\right)\right) \cdot \frac{1}{z}\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{neg}\left(\left(\left(t - x\right) \cdot y\right) \cdot \frac{1}{z}\right) \]
              8. associate-*l*N/A

                \[\leadsto \mathsf{neg}\left(\left(t - x\right) \cdot \left(y \cdot \frac{1}{z}\right)\right) \]
              9. distribute-lft-neg-inN/A

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

                \[\leadsto \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \left(y \cdot \color{blue}{\frac{1}{z}}\right) \]
              11. sub-negate-revN/A

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

                \[\leadsto \left(x - t\right) \cdot \left(y \cdot \frac{\color{blue}{1}}{z}\right) \]
              13. mult-flip-revN/A

                \[\leadsto \left(x - t\right) \cdot \frac{y}{z} \]
              14. lower-/.f6426.2

                \[\leadsto \left(x - t\right) \cdot \frac{y}{z} \]
            11. Applied rewrites26.2%

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

          Alternative 9: 62.4% accurate, 0.7× speedup?

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

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
              11. sub-negate-revN/A

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

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

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

                \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

                \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
              3. fp-cancel-sign-sub-invN/A

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

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

                \[\leadsto x - \color{blue}{\left(t - x\right) \cdot \left(\mathsf{neg}\left(\frac{y}{a}\right)\right)} \]
              6. distribute-rgt-neg-inN/A

                \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right) \cdot \frac{y}{a}\right)\right)} \]
              7. distribute-lft-neg-inN/A

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

                \[\leadsto x - \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right)}\right)\right) \cdot \frac{y}{a} \]
              9. sub-negate-revN/A

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

                \[\leadsto x - \color{blue}{\left(x - t\right) \cdot \frac{y}{a}} \]
              11. lower--.f6448.3

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

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

            if -0.00160000000000000008 < a < 8.99999999999999946e-147

            1. Initial program 68.3%

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

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

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

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

                \[\leadsto x - \left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}}\right)\right) \]
              5. distribute-neg-fracN/A

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

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

                \[\leadsto x - \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}\right)}{a - z} \]
              8. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x - x \cdot \mathsf{fma}\left(-1, \frac{z - y}{a - z}, \frac{t \cdot \left(z - y\right)}{x \cdot \left(a - z\right)}\right) \]
              10. lower--.f6464.3

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

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

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

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

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

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

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

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

            if 8.99999999999999946e-147 < a < 8.1999999999999996e-29

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

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

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

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

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

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

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

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

            if 8.1999999999999996e-29 < a

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
              11. sub-negate-revN/A

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

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

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

                \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a}} + x \]
              5. lower-fma.f6448.3

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

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

          Alternative 10: 58.0% accurate, 0.8× speedup?

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

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
              11. sub-negate-revN/A

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

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

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

                \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

                \[\leadsto x + \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} \]
              3. fp-cancel-sign-sub-invN/A

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

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

                \[\leadsto x - \color{blue}{\left(t - x\right) \cdot \left(\mathsf{neg}\left(\frac{y}{a}\right)\right)} \]
              6. distribute-rgt-neg-inN/A

                \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right) \cdot \frac{y}{a}\right)\right)} \]
              7. distribute-lft-neg-inN/A

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

                \[\leadsto x - \left(\mathsf{neg}\left(\color{blue}{\left(t - x\right)}\right)\right) \cdot \frac{y}{a} \]
              9. sub-negate-revN/A

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

                \[\leadsto x - \color{blue}{\left(x - t\right) \cdot \frac{y}{a}} \]
              11. lower--.f6448.3

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

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

            if -0.00160000000000000008 < a < 8.99999999999999946e-147

            1. Initial program 68.3%

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

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

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

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

                \[\leadsto x - \left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}}\right)\right) \]
              5. distribute-neg-fracN/A

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

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

                \[\leadsto x - \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}\right)}{a - z} \]
              8. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x - x \cdot \mathsf{fma}\left(-1, \frac{z - y}{a - z}, \frac{t \cdot \left(z - y\right)}{x \cdot \left(a - z\right)}\right) \]
              10. lower--.f6464.3

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

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

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

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

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

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

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

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

            if 8.99999999999999946e-147 < a < 8.1999999999999996e-29

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

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

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

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

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

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

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

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

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

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

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

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

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

            if 8.1999999999999996e-29 < a

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
              11. sub-negate-revN/A

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

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

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

                \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a}} + x \]
              5. lower-fma.f6448.3

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

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

          Alternative 11: 57.9% accurate, 0.8× speedup?

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

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
              11. sub-negate-revN/A

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

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

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

                \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
              15. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a}} + x \]
              5. lower-fma.f6448.3

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

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

            if -0.00160000000000000008 < a < 8.99999999999999946e-147

            1. Initial program 68.3%

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

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

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

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

                \[\leadsto x - \left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}}\right)\right) \]
              5. distribute-neg-fracN/A

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

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

                \[\leadsto x - \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right) \cdot \left(t - x\right)}\right)}{a - z} \]
              8. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x - x \cdot \mathsf{fma}\left(-1, \frac{z - y}{a - z}, \frac{t \cdot \left(z - y\right)}{x \cdot \left(a - z\right)}\right) \]
              10. lower--.f6464.3

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

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

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

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

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

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

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

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

            if 8.99999999999999946e-147 < a < 8.1999999999999996e-29

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 57.9% accurate, 0.7× speedup?

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

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.3e114 < z < -1.64999999999999991e58

            1. Initial program 68.3%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

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

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

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

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

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(z\right)}, t\right) \]
              16. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{z}\right)}, t\right) \]
              17. frac-2neg-revN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
              18. lower-/.f6454.2

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
            6. Applied rewrites54.2%

              \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{-1}{z}}, t\right) \]
            7. Taylor expanded in y around inf

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            8. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. lower-/.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              3. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              4. lower--.f6423.5

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
            9. Applied rewrites23.5%

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            10. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. mul-1-negN/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              3. lift-/.f64N/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              4. lift-*.f64N/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              5. lift--.f64N/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              6. associate-/l*N/A

                \[\leadsto \mathsf{neg}\left(y \cdot \frac{t - x}{z}\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{neg}\left(\frac{t - x}{z} \cdot y\right) \]
              8. distribute-lft-neg-inN/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot y \]
              9. distribute-neg-frac2N/A

                \[\leadsto \frac{t - x}{\mathsf{neg}\left(z\right)} \cdot y \]
              10. mult-flip-revN/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}\right) \cdot y \]
              11. metadata-evalN/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(z\right)}\right) \cdot y \]
              12. frac-2negN/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{-1}{z}\right) \cdot y \]
              13. lower-*.f64N/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{-1}{z}\right) \cdot y \]
              14. frac-2negN/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(z\right)}\right) \cdot y \]
              15. metadata-evalN/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}\right) \cdot y \]
              16. mult-flip-revN/A

                \[\leadsto \frac{t - x}{\mathsf{neg}\left(z\right)} \cdot y \]
              17. distribute-neg-frac2N/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot y \]
              18. distribute-neg-fracN/A

                \[\leadsto \frac{\mathsf{neg}\left(\left(t - x\right)\right)}{z} \cdot y \]
              19. lower-/.f64N/A

                \[\leadsto \frac{\mathsf{neg}\left(\left(t - x\right)\right)}{z} \cdot y \]
              20. sub-negate-revN/A

                \[\leadsto \frac{x - t}{z} \cdot y \]
              21. lower--.f6425.3

                \[\leadsto \frac{x - t}{z} \cdot y \]
            11. Applied rewrites25.3%

              \[\leadsto \frac{x - t}{z} \cdot \color{blue}{y} \]

            if -1.64999999999999991e58 < z < 28

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
              2. mult-flipN/A

                \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right)\right) \cdot \frac{1}{a - z}} \]
              3. lift-*.f64N/A

                \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right)\right)} \cdot \frac{1}{a - z} \]
              4. *-commutativeN/A

                \[\leadsto x + \color{blue}{\left(\left(t - x\right) \cdot \left(y - z\right)\right)} \cdot \frac{1}{a - z} \]
              5. associate-*l*N/A

                \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \left(\left(y - z\right) \cdot \frac{1}{a - z}\right)} \]
              6. *-commutativeN/A

                \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
              7. lower-*.f64N/A

                \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
              8. mult-flip-revN/A

                \[\leadsto x + \color{blue}{\frac{y - z}{a - z}} \cdot \left(t - x\right) \]
              9. frac-2negN/A

                \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(\left(y - z\right)\right)}{\mathsf{neg}\left(\left(a - z\right)\right)}} \cdot \left(t - x\right) \]
              10. lift--.f64N/A

                \[\leadsto x + \frac{\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
              11. sub-negate-revN/A

                \[\leadsto x + \frac{\color{blue}{z - y}}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
              12. lower-/.f64N/A

                \[\leadsto x + \color{blue}{\frac{z - y}{\mathsf{neg}\left(\left(a - z\right)\right)}} \cdot \left(t - x\right) \]
              13. lower--.f64N/A

                \[\leadsto x + \frac{\color{blue}{z - y}}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(t - x\right) \]
              14. lift--.f64N/A

                \[\leadsto x + \frac{z - y}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)} \cdot \left(t - x\right) \]
              15. sub-negate-revN/A

                \[\leadsto x + \frac{z - y}{\color{blue}{z - a}} \cdot \left(t - x\right) \]
              16. lower--.f6483.9

                \[\leadsto x + \frac{z - y}{\color{blue}{z - a}} \cdot \left(t - x\right) \]
            3. Applied rewrites83.9%

              \[\leadsto x + \color{blue}{\frac{z - y}{z - a} \cdot \left(t - x\right)} \]
            4. Taylor expanded in z around 0

              \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
            5. Step-by-step derivation
              1. lower-/.f6448.3

                \[\leadsto x + \frac{y}{\color{blue}{a}} \cdot \left(t - x\right) \]
            6. Applied rewrites48.3%

              \[\leadsto x + \color{blue}{\frac{y}{a}} \cdot \left(t - x\right) \]
            7. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{x + \frac{y}{a} \cdot \left(t - x\right)} \]
              2. +-commutativeN/A

                \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(t - x\right) + x} \]
              3. lift-*.f64N/A

                \[\leadsto \color{blue}{\frac{y}{a} \cdot \left(t - x\right)} + x \]
              4. *-commutativeN/A

                \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a}} + x \]
              5. lower-fma.f6448.3

                \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)} \]
            8. Applied rewrites48.3%

              \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)} \]

            if 28 < z < 5.39999999999999979e192

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Taylor expanded in z around -inf

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            3. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              3. lower-/.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\color{blue}{z}} \]
              4. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              5. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              6. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              7. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
            4. Applied rewrites46.9%

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            5. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. +-commutativeN/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + \color{blue}{t} \]
              3. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + t \]
              4. mul-1-negN/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              5. lift-/.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              6. distribute-neg-frac2N/A

                \[\leadsto \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\mathsf{neg}\left(z\right)} + t \]
              7. mult-flipN/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              8. lift--.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              9. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              10. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

                \[\leadsto \left(\left(t - x\right) \cdot \left(y - a\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              12. associate-*l*N/A

                \[\leadsto \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}\right) + t \]
              13. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              14. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              15. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(z\right)}, t\right) \]
              16. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{z}\right)}, t\right) \]
              17. frac-2neg-revN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
              18. lower-/.f6454.2

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
            6. Applied rewrites54.2%

              \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{-1}{z}}, t\right) \]
            7. Taylor expanded in y around inf

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            8. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. lower-/.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              3. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              4. lower--.f6423.5

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
            9. Applied rewrites23.5%

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            10. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. mul-1-negN/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              3. lift-/.f64N/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              4. mult-flipN/A

                \[\leadsto \mathsf{neg}\left(\left(y \cdot \left(t - x\right)\right) \cdot \frac{1}{z}\right) \]
              5. lift-*.f64N/A

                \[\leadsto \mathsf{neg}\left(\left(y \cdot \left(t - x\right)\right) \cdot \frac{1}{z}\right) \]
              6. lift--.f64N/A

                \[\leadsto \mathsf{neg}\left(\left(y \cdot \left(t - x\right)\right) \cdot \frac{1}{z}\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{neg}\left(\left(\left(t - x\right) \cdot y\right) \cdot \frac{1}{z}\right) \]
              8. associate-*l*N/A

                \[\leadsto \mathsf{neg}\left(\left(t - x\right) \cdot \left(y \cdot \frac{1}{z}\right)\right) \]
              9. distribute-lft-neg-inN/A

                \[\leadsto \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \left(y \cdot \color{blue}{\frac{1}{z}}\right) \]
              10. lower-*.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \left(y \cdot \color{blue}{\frac{1}{z}}\right) \]
              11. sub-negate-revN/A

                \[\leadsto \left(x - t\right) \cdot \left(y \cdot \frac{\color{blue}{1}}{z}\right) \]
              12. lower--.f64N/A

                \[\leadsto \left(x - t\right) \cdot \left(y \cdot \frac{\color{blue}{1}}{z}\right) \]
              13. mult-flip-revN/A

                \[\leadsto \left(x - t\right) \cdot \frac{y}{z} \]
              14. lower-/.f6426.2

                \[\leadsto \left(x - t\right) \cdot \frac{y}{z} \]
            11. Applied rewrites26.2%

              \[\leadsto \left(x - t\right) \cdot \frac{y}{\color{blue}{z}} \]
          3. Recombined 4 regimes into one program.
          4. Add Preprocessing

          Alternative 13: 41.4% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{-63}:\\ \;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+137}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{a}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (<= y -1.75e-63)
             (* (- x t) (/ y z))
             (if (<= y 2e+137) (fma (- t x) (/ a z) t) (* (/ (- x t) z) y))))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (y <= -1.75e-63) {
          		tmp = (x - t) * (y / z);
          	} else if (y <= 2e+137) {
          		tmp = fma((t - x), (a / z), t);
          	} else {
          		tmp = ((x - t) / z) * y;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (y <= -1.75e-63)
          		tmp = Float64(Float64(x - t) * Float64(y / z));
          	elseif (y <= 2e+137)
          		tmp = fma(Float64(t - x), Float64(a / z), t);
          	else
          		tmp = Float64(Float64(Float64(x - t) / z) * y);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.75e-63], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+137], N[(N[(t - x), $MachinePrecision] * N[(a / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y \leq -1.75 \cdot 10^{-63}:\\
          \;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\
          
          \mathbf{elif}\;y \leq 2 \cdot 10^{+137}:\\
          \;\;\;\;\mathsf{fma}\left(t - x, \frac{a}{z}, t\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{x - t}{z} \cdot y\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y < -1.75000000000000002e-63

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Taylor expanded in z around -inf

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            3. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              3. lower-/.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\color{blue}{z}} \]
              4. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              5. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              6. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              7. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
            4. Applied rewrites46.9%

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            5. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. +-commutativeN/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + \color{blue}{t} \]
              3. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + t \]
              4. mul-1-negN/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              5. lift-/.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              6. distribute-neg-frac2N/A

                \[\leadsto \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\mathsf{neg}\left(z\right)} + t \]
              7. mult-flipN/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              8. lift--.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              9. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              10. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

                \[\leadsto \left(\left(t - x\right) \cdot \left(y - a\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              12. associate-*l*N/A

                \[\leadsto \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}\right) + t \]
              13. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              14. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              15. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(z\right)}, t\right) \]
              16. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{z}\right)}, t\right) \]
              17. frac-2neg-revN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
              18. lower-/.f6454.2

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
            6. Applied rewrites54.2%

              \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{-1}{z}}, t\right) \]
            7. Taylor expanded in y around inf

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            8. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. lower-/.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              3. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              4. lower--.f6423.5

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
            9. Applied rewrites23.5%

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            10. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. mul-1-negN/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              3. lift-/.f64N/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              4. mult-flipN/A

                \[\leadsto \mathsf{neg}\left(\left(y \cdot \left(t - x\right)\right) \cdot \frac{1}{z}\right) \]
              5. lift-*.f64N/A

                \[\leadsto \mathsf{neg}\left(\left(y \cdot \left(t - x\right)\right) \cdot \frac{1}{z}\right) \]
              6. lift--.f64N/A

                \[\leadsto \mathsf{neg}\left(\left(y \cdot \left(t - x\right)\right) \cdot \frac{1}{z}\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{neg}\left(\left(\left(t - x\right) \cdot y\right) \cdot \frac{1}{z}\right) \]
              8. associate-*l*N/A

                \[\leadsto \mathsf{neg}\left(\left(t - x\right) \cdot \left(y \cdot \frac{1}{z}\right)\right) \]
              9. distribute-lft-neg-inN/A

                \[\leadsto \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \left(y \cdot \color{blue}{\frac{1}{z}}\right) \]
              10. lower-*.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \left(y \cdot \color{blue}{\frac{1}{z}}\right) \]
              11. sub-negate-revN/A

                \[\leadsto \left(x - t\right) \cdot \left(y \cdot \frac{\color{blue}{1}}{z}\right) \]
              12. lower--.f64N/A

                \[\leadsto \left(x - t\right) \cdot \left(y \cdot \frac{\color{blue}{1}}{z}\right) \]
              13. mult-flip-revN/A

                \[\leadsto \left(x - t\right) \cdot \frac{y}{z} \]
              14. lower-/.f6426.2

                \[\leadsto \left(x - t\right) \cdot \frac{y}{z} \]
            11. Applied rewrites26.2%

              \[\leadsto \left(x - t\right) \cdot \frac{y}{\color{blue}{z}} \]

            if -1.75000000000000002e-63 < y < 2.0000000000000001e137

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Taylor expanded in z around -inf

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            3. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              3. lower-/.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\color{blue}{z}} \]
              4. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              5. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              6. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              7. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
            4. Applied rewrites46.9%

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            5. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. +-commutativeN/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + \color{blue}{t} \]
              3. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + t \]
              4. mul-1-negN/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              5. lift-/.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              6. distribute-neg-frac2N/A

                \[\leadsto \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\mathsf{neg}\left(z\right)} + t \]
              7. mult-flipN/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              8. lift--.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              9. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              10. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

                \[\leadsto \left(\left(t - x\right) \cdot \left(y - a\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              12. associate-*l*N/A

                \[\leadsto \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}\right) + t \]
              13. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              14. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              15. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(z\right)}, t\right) \]
              16. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{z}\right)}, t\right) \]
              17. frac-2neg-revN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
              18. lower-/.f6454.2

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
            6. Applied rewrites54.2%

              \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{-1}{z}}, t\right) \]
            7. Taylor expanded in y around 0

              \[\leadsto \mathsf{fma}\left(t - x, \frac{a}{\color{blue}{z}}, t\right) \]
            8. Step-by-step derivation
              1. lower-/.f6432.6

                \[\leadsto \mathsf{fma}\left(t - x, \frac{a}{z}, t\right) \]
            9. Applied rewrites32.6%

              \[\leadsto \mathsf{fma}\left(t - x, \frac{a}{\color{blue}{z}}, t\right) \]

            if 2.0000000000000001e137 < y

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Taylor expanded in z around -inf

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            3. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              3. lower-/.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\color{blue}{z}} \]
              4. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              5. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              6. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              7. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
            4. Applied rewrites46.9%

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            5. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. +-commutativeN/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + \color{blue}{t} \]
              3. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + t \]
              4. mul-1-negN/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              5. lift-/.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              6. distribute-neg-frac2N/A

                \[\leadsto \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\mathsf{neg}\left(z\right)} + t \]
              7. mult-flipN/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              8. lift--.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              9. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              10. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

                \[\leadsto \left(\left(t - x\right) \cdot \left(y - a\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              12. associate-*l*N/A

                \[\leadsto \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}\right) + t \]
              13. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              14. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              15. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(z\right)}, t\right) \]
              16. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{z}\right)}, t\right) \]
              17. frac-2neg-revN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
              18. lower-/.f6454.2

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
            6. Applied rewrites54.2%

              \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{-1}{z}}, t\right) \]
            7. Taylor expanded in y around inf

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            8. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. lower-/.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              3. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              4. lower--.f6423.5

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
            9. Applied rewrites23.5%

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            10. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. mul-1-negN/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              3. lift-/.f64N/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              4. lift-*.f64N/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              5. lift--.f64N/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              6. associate-/l*N/A

                \[\leadsto \mathsf{neg}\left(y \cdot \frac{t - x}{z}\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{neg}\left(\frac{t - x}{z} \cdot y\right) \]
              8. distribute-lft-neg-inN/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot y \]
              9. distribute-neg-frac2N/A

                \[\leadsto \frac{t - x}{\mathsf{neg}\left(z\right)} \cdot y \]
              10. mult-flip-revN/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}\right) \cdot y \]
              11. metadata-evalN/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(z\right)}\right) \cdot y \]
              12. frac-2negN/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{-1}{z}\right) \cdot y \]
              13. lower-*.f64N/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{-1}{z}\right) \cdot y \]
              14. frac-2negN/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(z\right)}\right) \cdot y \]
              15. metadata-evalN/A

                \[\leadsto \left(\left(t - x\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}\right) \cdot y \]
              16. mult-flip-revN/A

                \[\leadsto \frac{t - x}{\mathsf{neg}\left(z\right)} \cdot y \]
              17. distribute-neg-frac2N/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{t - x}{z}\right)\right) \cdot y \]
              18. distribute-neg-fracN/A

                \[\leadsto \frac{\mathsf{neg}\left(\left(t - x\right)\right)}{z} \cdot y \]
              19. lower-/.f64N/A

                \[\leadsto \frac{\mathsf{neg}\left(\left(t - x\right)\right)}{z} \cdot y \]
              20. sub-negate-revN/A

                \[\leadsto \frac{x - t}{z} \cdot y \]
              21. lower--.f6425.3

                \[\leadsto \frac{x - t}{z} \cdot y \]
            11. Applied rewrites25.3%

              \[\leadsto \frac{x - t}{z} \cdot \color{blue}{y} \]
          3. Recombined 3 regimes into one program.
          4. Add Preprocessing

          Alternative 14: 34.0% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - t\right) \cdot \frac{y}{z}\\ \mathbf{if}\;y \leq -1.6 \cdot 10^{-59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 9.8 \cdot 10^{-59}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (let* ((t_1 (* (- x t) (/ y z))))
             (if (<= y -1.6e-59) t_1 (if (<= y 9.8e-59) (+ x (- t x)) t_1))))
          double code(double x, double y, double z, double t, double a) {
          	double t_1 = (x - t) * (y / z);
          	double tmp;
          	if (y <= -1.6e-59) {
          		tmp = t_1;
          	} else if (y <= 9.8e-59) {
          		tmp = x + (t - x);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8) :: t_1
              real(8) :: tmp
              t_1 = (x - t) * (y / z)
              if (y <= (-1.6d-59)) then
                  tmp = t_1
              else if (y <= 9.8d-59) then
                  tmp = x + (t - x)
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a) {
          	double t_1 = (x - t) * (y / z);
          	double tmp;
          	if (y <= -1.6e-59) {
          		tmp = t_1;
          	} else if (y <= 9.8e-59) {
          		tmp = x + (t - x);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a):
          	t_1 = (x - t) * (y / z)
          	tmp = 0
          	if y <= -1.6e-59:
          		tmp = t_1
          	elif y <= 9.8e-59:
          		tmp = x + (t - x)
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a)
          	t_1 = Float64(Float64(x - t) * Float64(y / z))
          	tmp = 0.0
          	if (y <= -1.6e-59)
          		tmp = t_1;
          	elseif (y <= 9.8e-59)
          		tmp = Float64(x + Float64(t - x));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	t_1 = (x - t) * (y / z);
          	tmp = 0.0;
          	if (y <= -1.6e-59)
          		tmp = t_1;
          	elseif (y <= 9.8e-59)
          		tmp = x + (t - x);
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e-59], t$95$1, If[LessEqual[y, 9.8e-59], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(x - t\right) \cdot \frac{y}{z}\\
          \mathbf{if}\;y \leq -1.6 \cdot 10^{-59}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;y \leq 9.8 \cdot 10^{-59}:\\
          \;\;\;\;x + \left(t - x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -1.6e-59 or 9.79999999999999954e-59 < y

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Taylor expanded in z around -inf

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            3. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              3. lower-/.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\color{blue}{z}} \]
              4. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              5. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              6. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              7. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
            4. Applied rewrites46.9%

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            5. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. +-commutativeN/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + \color{blue}{t} \]
              3. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + t \]
              4. mul-1-negN/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              5. lift-/.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              6. distribute-neg-frac2N/A

                \[\leadsto \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\mathsf{neg}\left(z\right)} + t \]
              7. mult-flipN/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              8. lift--.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              9. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              10. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

                \[\leadsto \left(\left(t - x\right) \cdot \left(y - a\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              12. associate-*l*N/A

                \[\leadsto \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}\right) + t \]
              13. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              14. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              15. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(z\right)}, t\right) \]
              16. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{z}\right)}, t\right) \]
              17. frac-2neg-revN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
              18. lower-/.f6454.2

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
            6. Applied rewrites54.2%

              \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{-1}{z}}, t\right) \]
            7. Taylor expanded in y around inf

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            8. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. lower-/.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              3. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              4. lower--.f6423.5

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
            9. Applied rewrites23.5%

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            10. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. mul-1-negN/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              3. lift-/.f64N/A

                \[\leadsto \mathsf{neg}\left(\frac{y \cdot \left(t - x\right)}{z}\right) \]
              4. mult-flipN/A

                \[\leadsto \mathsf{neg}\left(\left(y \cdot \left(t - x\right)\right) \cdot \frac{1}{z}\right) \]
              5. lift-*.f64N/A

                \[\leadsto \mathsf{neg}\left(\left(y \cdot \left(t - x\right)\right) \cdot \frac{1}{z}\right) \]
              6. lift--.f64N/A

                \[\leadsto \mathsf{neg}\left(\left(y \cdot \left(t - x\right)\right) \cdot \frac{1}{z}\right) \]
              7. *-commutativeN/A

                \[\leadsto \mathsf{neg}\left(\left(\left(t - x\right) \cdot y\right) \cdot \frac{1}{z}\right) \]
              8. associate-*l*N/A

                \[\leadsto \mathsf{neg}\left(\left(t - x\right) \cdot \left(y \cdot \frac{1}{z}\right)\right) \]
              9. distribute-lft-neg-inN/A

                \[\leadsto \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \left(y \cdot \color{blue}{\frac{1}{z}}\right) \]
              10. lower-*.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\left(t - x\right)\right)\right) \cdot \left(y \cdot \color{blue}{\frac{1}{z}}\right) \]
              11. sub-negate-revN/A

                \[\leadsto \left(x - t\right) \cdot \left(y \cdot \frac{\color{blue}{1}}{z}\right) \]
              12. lower--.f64N/A

                \[\leadsto \left(x - t\right) \cdot \left(y \cdot \frac{\color{blue}{1}}{z}\right) \]
              13. mult-flip-revN/A

                \[\leadsto \left(x - t\right) \cdot \frac{y}{z} \]
              14. lower-/.f6426.2

                \[\leadsto \left(x - t\right) \cdot \frac{y}{z} \]
            11. Applied rewrites26.2%

              \[\leadsto \left(x - t\right) \cdot \frac{y}{\color{blue}{z}} \]

            if -1.6e-59 < y < 9.79999999999999954e-59

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Taylor expanded in z around inf

              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
            3. Step-by-step derivation
              1. lower--.f6420.2

                \[\leadsto x + \left(t - \color{blue}{x}\right) \]
            4. Applied rewrites20.2%

              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 15: 28.2% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t - x\right)\\ \mathbf{if}\;t \leq -1.35 \cdot 10^{+25}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-33}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (let* ((t_1 (+ x (- t x))))
             (if (<= t -1.35e+25) t_1 (if (<= t 7.5e-33) (/ (* x (- y a)) z) t_1))))
          double code(double x, double y, double z, double t, double a) {
          	double t_1 = x + (t - x);
          	double tmp;
          	if (t <= -1.35e+25) {
          		tmp = t_1;
          	} else if (t <= 7.5e-33) {
          		tmp = (x * (y - a)) / z;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8) :: t_1
              real(8) :: tmp
              t_1 = x + (t - x)
              if (t <= (-1.35d+25)) then
                  tmp = t_1
              else if (t <= 7.5d-33) then
                  tmp = (x * (y - a)) / z
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a) {
          	double t_1 = x + (t - x);
          	double tmp;
          	if (t <= -1.35e+25) {
          		tmp = t_1;
          	} else if (t <= 7.5e-33) {
          		tmp = (x * (y - a)) / z;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a):
          	t_1 = x + (t - x)
          	tmp = 0
          	if t <= -1.35e+25:
          		tmp = t_1
          	elif t <= 7.5e-33:
          		tmp = (x * (y - a)) / z
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a)
          	t_1 = Float64(x + Float64(t - x))
          	tmp = 0.0
          	if (t <= -1.35e+25)
          		tmp = t_1;
          	elseif (t <= 7.5e-33)
          		tmp = Float64(Float64(x * Float64(y - a)) / z);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	t_1 = x + (t - x);
          	tmp = 0.0;
          	if (t <= -1.35e+25)
          		tmp = t_1;
          	elseif (t <= 7.5e-33)
          		tmp = (x * (y - a)) / z;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.35e+25], t$95$1, If[LessEqual[t, 7.5e-33], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := x + \left(t - x\right)\\
          \mathbf{if}\;t \leq -1.35 \cdot 10^{+25}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \leq 7.5 \cdot 10^{-33}:\\
          \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -1.35e25 or 7.5000000000000001e-33 < t

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Taylor expanded in z around inf

              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
            3. Step-by-step derivation
              1. lower--.f6420.2

                \[\leadsto x + \left(t - \color{blue}{x}\right) \]
            4. Applied rewrites20.2%

              \[\leadsto x + \color{blue}{\left(t - x\right)} \]

            if -1.35e25 < t < 7.5000000000000001e-33

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Taylor expanded in z around -inf

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            3. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              3. lower-/.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\color{blue}{z}} \]
              4. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              5. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              6. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              7. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
            4. Applied rewrites46.9%

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            5. Taylor expanded in x around -inf

              \[\leadsto \frac{x \cdot \left(y - a\right)}{\color{blue}{z}} \]
            6. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{x \cdot \left(y - a\right)}{z} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{x \cdot \left(y - a\right)}{z} \]
              3. lower--.f6420.2

                \[\leadsto \frac{x \cdot \left(y - a\right)}{z} \]
            7. Applied rewrites20.2%

              \[\leadsto \frac{x \cdot \left(y - a\right)}{\color{blue}{z}} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 16: 25.2% accurate, 1.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t - x\right)\\ \mathbf{if}\;t \leq -7.9:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-33}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (let* ((t_1 (+ x (- t x))))
             (if (<= t -7.9) t_1 (if (<= t 7.5e-33) (/ (* x y) z) t_1))))
          double code(double x, double y, double z, double t, double a) {
          	double t_1 = x + (t - x);
          	double tmp;
          	if (t <= -7.9) {
          		tmp = t_1;
          	} else if (t <= 7.5e-33) {
          		tmp = (x * y) / z;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8) :: t_1
              real(8) :: tmp
              t_1 = x + (t - x)
              if (t <= (-7.9d0)) then
                  tmp = t_1
              else if (t <= 7.5d-33) then
                  tmp = (x * y) / z
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a) {
          	double t_1 = x + (t - x);
          	double tmp;
          	if (t <= -7.9) {
          		tmp = t_1;
          	} else if (t <= 7.5e-33) {
          		tmp = (x * y) / z;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a):
          	t_1 = x + (t - x)
          	tmp = 0
          	if t <= -7.9:
          		tmp = t_1
          	elif t <= 7.5e-33:
          		tmp = (x * y) / z
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a)
          	t_1 = Float64(x + Float64(t - x))
          	tmp = 0.0
          	if (t <= -7.9)
          		tmp = t_1;
          	elseif (t <= 7.5e-33)
          		tmp = Float64(Float64(x * y) / z);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	t_1 = x + (t - x);
          	tmp = 0.0;
          	if (t <= -7.9)
          		tmp = t_1;
          	elseif (t <= 7.5e-33)
          		tmp = (x * y) / z;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.9], t$95$1, If[LessEqual[t, 7.5e-33], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := x + \left(t - x\right)\\
          \mathbf{if}\;t \leq -7.9:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \leq 7.5 \cdot 10^{-33}:\\
          \;\;\;\;\frac{x \cdot y}{z}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -7.9000000000000004 or 7.5000000000000001e-33 < t

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Taylor expanded in z around inf

              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
            3. Step-by-step derivation
              1. lower--.f6420.2

                \[\leadsto x + \left(t - \color{blue}{x}\right) \]
            4. Applied rewrites20.2%

              \[\leadsto x + \color{blue}{\left(t - x\right)} \]

            if -7.9000000000000004 < t < 7.5000000000000001e-33

            1. Initial program 68.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Taylor expanded in z around -inf

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            3. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              3. lower-/.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\color{blue}{z}} \]
              4. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              5. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              6. lower--.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              7. lower-*.f64N/A

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6446.9

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
            4. Applied rewrites46.9%

              \[\leadsto \color{blue}{t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
            5. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto t + \color{blue}{-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
              2. +-commutativeN/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + \color{blue}{t} \]
              3. lift-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} + t \]
              4. mul-1-negN/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              5. lift-/.f64N/A

                \[\leadsto \left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
              6. distribute-neg-frac2N/A

                \[\leadsto \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{\mathsf{neg}\left(z\right)} + t \]
              7. mult-flipN/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              8. lift--.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              9. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              10. lift-*.f64N/A

                \[\leadsto \left(y \cdot \left(t - x\right) - a \cdot \left(t - x\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              11. distribute-rgt-out--N/A

                \[\leadsto \left(\left(t - x\right) \cdot \left(y - a\right)\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)} + t \]
              12. associate-*l*N/A

                \[\leadsto \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}\right) + t \]
              13. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              14. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \color{blue}{\frac{1}{\mathsf{neg}\left(z\right)}}, t\right) \]
              15. lower--.f64N/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\color{blue}{1}}{\mathsf{neg}\left(z\right)}, t\right) \]
              16. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{z}\right)}, t\right) \]
              17. frac-2neg-revN/A

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
              18. lower-/.f6454.2

                \[\leadsto \mathsf{fma}\left(t - x, \left(y - a\right) \cdot \frac{-1}{\color{blue}{z}}, t\right) \]
            6. Applied rewrites54.2%

              \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\left(y - a\right) \cdot \frac{-1}{z}}, t\right) \]
            7. Taylor expanded in y around inf

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            8. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
              2. lower-/.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              3. lower-*.f64N/A

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
              4. lower--.f6423.5

                \[\leadsto -1 \cdot \frac{y \cdot \left(t - x\right)}{z} \]
            9. Applied rewrites23.5%

              \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right)}{z}} \]
            10. Taylor expanded in x around inf

              \[\leadsto \frac{x \cdot y}{z} \]
            11. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{x \cdot y}{z} \]
              2. lower-*.f6416.7

                \[\leadsto \frac{x \cdot y}{z} \]
            12. Applied rewrites16.7%

              \[\leadsto \frac{x \cdot y}{z} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 17: 20.2% accurate, 2.8× speedup?

          \[\begin{array}{l} \\ x + \left(t - x\right) \end{array} \]
          (FPCore (x y z t a) :precision binary64 (+ x (- t x)))
          double code(double x, double y, double z, double t, double a) {
          	return x + (t - 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 + (t - x)
          end function
          
          public static double code(double x, double y, double z, double t, double a) {
          	return x + (t - x);
          }
          
          def code(x, y, z, t, a):
          	return x + (t - x)
          
          function code(x, y, z, t, a)
          	return Float64(x + Float64(t - x))
          end
          
          function tmp = code(x, y, z, t, a)
          	tmp = x + (t - x);
          end
          
          code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          x + \left(t - x\right)
          \end{array}
          
          Derivation
          1. Initial program 68.3%

            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
          2. Taylor expanded in z around inf

            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
          3. Step-by-step derivation
            1. lower--.f6420.2

              \[\leadsto x + \left(t - \color{blue}{x}\right) \]
          4. Applied rewrites20.2%

            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
          5. Add Preprocessing

          Alternative 18: 2.8% accurate, 3.8× speedup?

          \[\begin{array}{l} \\ \left(-x\right) + x \end{array} \]
          (FPCore (x y z t a) :precision binary64 (+ (- x) x))
          double code(double x, double y, double z, double t, double a) {
          	return -x + 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 + x
          end function
          
          public static double code(double x, double y, double z, double t, double a) {
          	return -x + x;
          }
          
          def code(x, y, z, t, a):
          	return -x + x
          
          function code(x, y, z, t, a)
          	return Float64(Float64(-x) + x)
          end
          
          function tmp = code(x, y, z, t, a)
          	tmp = -x + x;
          end
          
          code[x_, y_, z_, t_, a_] := N[((-x) + x), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \left(-x\right) + x
          \end{array}
          
          Derivation
          1. Initial program 68.3%

            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
          2. Taylor expanded in z around inf

            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
          3. Step-by-step derivation
            1. lower--.f6420.2

              \[\leadsto x + \left(t - \color{blue}{x}\right) \]
          4. Applied rewrites20.2%

            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
          5. Taylor expanded in x around inf

            \[\leadsto x + -1 \cdot \color{blue}{x} \]
          6. Step-by-step derivation
            1. lower-*.f642.8

              \[\leadsto x + -1 \cdot x \]
          7. Applied rewrites2.8%

            \[\leadsto x + -1 \cdot \color{blue}{x} \]
          8. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \color{blue}{x + -1 \cdot x} \]
            2. +-commutativeN/A

              \[\leadsto \color{blue}{-1 \cdot x + x} \]
            3. lower-+.f642.8

              \[\leadsto \color{blue}{-1 \cdot x + x} \]
            4. lift-*.f64N/A

              \[\leadsto -1 \cdot x + x \]
            5. mul-1-negN/A

              \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
            6. lower-neg.f642.8

              \[\leadsto \left(-x\right) + x \]
          9. Applied rewrites2.8%

            \[\leadsto \color{blue}{\left(-x\right) + x} \]
          10. Add Preprocessing

          Reproduce

          ?
          herbie shell --seed 2025156 
          (FPCore (x y z t a)
            :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
            :precision binary64
            (+ x (/ (* (- y z) (- t x)) (- a z))))