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

Percentage Accurate: 68.3% → 89.3%
Time: 4.7s
Alternatives: 19
Speedup: 0.6×

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 19 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.3% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+302}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 62.9%

      \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 13.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 96.9%

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

Alternative 2: 89.2% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+302}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 62.9%

      \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 13.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 96.9%

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

Alternative 3: 86.9% accurate, 0.3× speedup?

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

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

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

    1. Initial program 73.2%

      \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 13.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 71.7% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

    if -1.48e-8 < a < 2.1e-74

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1e-74 < a < 4.9e69

    1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
      10. lift--.f6437.4

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

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

    if 4.9e69 < a

    1. Initial program 67.2%

      \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 70.7% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\ \mathbf{if}\;a \leq -1.7 \cdot 10^{-15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -4.4 \cdot 10^{-228}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{-74}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (fma (- t x) (/ (- y z) a) x)))
       (if (<= a -1.7e-15)
         t_1
         (if (<= a -4.4e-228)
           (* y (/ (- t x) (- a z)))
           (if (<= a 2.1e-74) (* t (/ (- y z) (- a z))) t_1)))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = fma((t - x), ((y - z) / a), x);
    	double tmp;
    	if (a <= -1.7e-15) {
    		tmp = t_1;
    	} else if (a <= -4.4e-228) {
    		tmp = y * ((t - x) / (a - z));
    	} else if (a <= 2.1e-74) {
    		tmp = t * ((y - z) / (a - z));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = fma(Float64(t - x), Float64(Float64(y - z) / a), x)
    	tmp = 0.0
    	if (a <= -1.7e-15)
    		tmp = t_1;
    	elseif (a <= -4.4e-228)
    		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
    	elseif (a <= 2.1e-74)
    		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - 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[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.7e-15], t$95$1, If[LessEqual[a, -4.4e-228], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e-74], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
    \mathbf{if}\;a \leq -1.7 \cdot 10^{-15}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq -4.4 \cdot 10^{-228}:\\
    \;\;\;\;y \cdot \frac{t - x}{a - z}\\
    
    \mathbf{elif}\;a \leq 2.1 \cdot 10^{-74}:\\
    \;\;\;\;t \cdot \frac{y - z}{a - z}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if a < -1.7e-15 or 2.1e-74 < a

      1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

      if -1.7e-15 < a < -4.4000000000000001e-228

      1. Initial program 69.9%

        \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.4000000000000001e-228 < a < 2.1e-74

      1. Initial program 65.6%

        \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 66.4% accurate, 0.7× speedup?

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

      1. Initial program 70.1%

        \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -8.1999999999999997e104 < y < 5.2999999999999997e60

      1. Initial program 67.2%

        \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 7: 60.9% accurate, 0.6× speedup?

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

        1. Initial program 68.4%

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

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

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

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

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

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

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

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

        if -2.7499999999999999e50 < a < -4.4000000000000001e-228

        1. Initial program 70.8%

          \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -4.4000000000000001e-228 < a < 2.1e-74

        1. Initial program 65.6%

          \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 60.7% accurate, 0.6× speedup?

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

        1. Initial program 68.4%

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

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

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

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

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

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

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

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

        if -2.4500000000000001e50 < a < -4.4000000000000001e-228

        1. Initial program 70.8%

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

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

            \[\leadsto y \cdot \frac{t - x}{\color{blue}{a - z}} \]
          2. associate-/l*N/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)}{\color{blue}{a - z}} \]
          4. *-commutativeN/A

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

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

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

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

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

        if -4.4000000000000001e-228 < a < 2.1e-74

        1. Initial program 65.6%

          \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 9: 58.8% accurate, 0.6× speedup?

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

        1. Initial program 68.4%

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

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

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

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

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

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

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

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

        if -2.4500000000000001e50 < a < -7.5999999999999999e-213

        1. Initial program 71.0%

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

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

            \[\leadsto y \cdot \frac{t - x}{\color{blue}{a - z}} \]
          2. associate-/l*N/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)}{\color{blue}{a - z}} \]
          4. *-commutativeN/A

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

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

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

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

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

        if -7.5999999999999999e-213 < a < 2.1e-74

        1. Initial program 65.7%

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

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

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

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

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

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

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

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

      Alternative 10: 57.5% accurate, 0.7× speedup?

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

        1. Initial program 68.4%

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

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

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

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

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

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

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

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

        if -2.4500000000000001e50 < a < 3.5000000000000001e-231

        1. Initial program 68.6%

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

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

            \[\leadsto y \cdot \frac{t - x}{\color{blue}{a - z}} \]
          2. associate-/l*N/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)}{\color{blue}{a - z}} \]
          4. *-commutativeN/A

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

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

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

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

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

        if 3.5000000000000001e-231 < a < 1.8999999999999998e-74

        1. Initial program 66.7%

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

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

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

        Alternative 11: 56.2% accurate, 0.7× speedup?

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

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

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

            if -4.6e14 < z < 1.3e19

            1. Initial program 88.8%

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

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

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

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

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

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

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

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

            if 1.3e19 < z < 6.50000000000000027e84

            1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
              10. lift--.f6443.5

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

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

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

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

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

              \[\leadsto \frac{y - a}{z} \cdot x \]
            8. Taylor expanded in y around inf

              \[\leadsto \left(-1 \cdot \frac{y}{a - z}\right) \cdot x \]
            9. Step-by-step derivation
              1. associate-*r/N/A

                \[\leadsto \frac{-1 \cdot y}{a - z} \cdot x \]
              2. mul-1-negN/A

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

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

                \[\leadsto \frac{-y}{a - z} \cdot x \]
              5. lift--.f6420.9

                \[\leadsto \frac{-y}{a - z} \cdot x \]
            10. Applied rewrites20.9%

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

          Alternative 12: 52.0% accurate, 0.7× speedup?

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

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

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

              if -4.6e14 < z < 1.8e18

              1. Initial program 88.8%

                \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 1.8e18 < z < 6.50000000000000027e84

                    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                      10. lift--.f6443.5

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

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

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

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

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

                      \[\leadsto \frac{y - a}{z} \cdot x \]
                    8. Taylor expanded in y around inf

                      \[\leadsto \left(-1 \cdot \frac{y}{a - z}\right) \cdot x \]
                    9. Step-by-step derivation
                      1. associate-*r/N/A

                        \[\leadsto \frac{-1 \cdot y}{a - z} \cdot x \]
                      2. mul-1-negN/A

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

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

                        \[\leadsto \frac{-y}{a - z} \cdot x \]
                      5. lift--.f6421.0

                        \[\leadsto \frac{-y}{a - z} \cdot x \]
                    10. Applied rewrites21.0%

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

                  Alternative 13: 52.0% accurate, 0.7× speedup?

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

                    1. Initial program 41.0%

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

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

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

                      if -4.6e14 < z < 1.85e18

                      1. Initial program 88.8%

                        \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.85e18 < z < 1.16000000000000005e96

                            1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                              10. lift--.f6442.7

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

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

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

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

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

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

                          Alternative 14: 51.9% accurate, 0.7× speedup?

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

                            1. Initial program 41.0%

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

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

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

                              if -4.6e14 < z < 1.85e18

                              1. Initial program 88.8%

                                \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 1.85e18 < z < 1.16000000000000005e96

                                    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                      10. lift--.f6442.7

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

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x} \]
                                    5. Taylor expanded in z 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--.f6421.1

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

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

                                  Alternative 15: 51.8% accurate, 0.8× speedup?

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

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

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

                                      if -4.6e14 < z < 1.85e18

                                      1. Initial program 88.8%

                                        \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 1.85e18 < z < 6.50000000000000027e84

                                            1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{y}{z} \cdot x \]
                                            6. Step-by-step derivation
                                              1. lower-/.f6417.2

                                                \[\leadsto \frac{y}{z} \cdot x \]
                                            7. Applied rewrites17.2%

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

                                          Alternative 16: 37.1% accurate, 1.0× speedup?

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

                                            1. Initial program 68.4%

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

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

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

                                              if -3.05000000000000013e50 < a < -7.5999999999999999e-213

                                              1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \frac{y}{z} \cdot x \]
                                              6. Step-by-step derivation
                                                1. lower-/.f6422.2

                                                  \[\leadsto \frac{y}{z} \cdot x \]
                                              7. Applied rewrites22.2%

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

                                              if -7.5999999999999999e-213 < a < 2.1e-74

                                              1. Initial program 65.7%

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

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

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

                                              Alternative 17: 35.4% accurate, 1.0× speedup?

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

                                                1. Initial program 68.4%

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

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

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

                                                  if -4.40000000000000034e50 < a < -4.3e-228

                                                  1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \frac{x \cdot y}{z} \]
                                                  7. Applied rewrites20.1%

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

                                                  if -4.3e-228 < a < 2.1e-74

                                                  1. Initial program 65.6%

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

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

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

                                                  Alternative 18: 34.8% accurate, 1.4× speedup?

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

                                                    1. Initial program 69.0%

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

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

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

                                                      if -3.6000000000000001e-15 < a < 2.1e-74

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

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

                                                      Alternative 19: 25.2% accurate, 13.0× speedup?

                                                      \[\begin{array}{l} \\ t \end{array} \]
                                                      (FPCore (x y z t a) :precision binary64 t)
                                                      double code(double x, double y, double z, double t, double a) {
                                                      	return t;
                                                      }
                                                      
                                                      module fmin_fmax_functions
                                                          implicit none
                                                          private
                                                          public fmax
                                                          public fmin
                                                      
                                                          interface fmax
                                                              module procedure fmax88
                                                              module procedure fmax44
                                                              module procedure fmax84
                                                              module procedure fmax48
                                                          end interface
                                                          interface fmin
                                                              module procedure fmin88
                                                              module procedure fmin44
                                                              module procedure fmin84
                                                              module procedure fmin48
                                                          end interface
                                                      contains
                                                          real(8) function fmax88(x, y) result (res)
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                          end function
                                                          real(4) function fmax44(x, y) result (res)
                                                              real(4), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmax84(x, y) result(res)
                                                              real(8), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmax48(x, y) result(res)
                                                              real(4), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin88(x, y) result (res)
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                          end function
                                                          real(4) function fmin44(x, y) result (res)
                                                              real(4), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin84(x, y) result(res)
                                                              real(8), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin48(x, y) result(res)
                                                              real(4), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                          end function
                                                      end module
                                                      
                                                      real(8) function code(x, y, z, t, a)
                                                      use fmin_fmax_functions
                                                          real(8), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          real(8), intent (in) :: z
                                                          real(8), intent (in) :: t
                                                          real(8), intent (in) :: a
                                                          code = t
                                                      end function
                                                      
                                                      public static double code(double x, double y, double z, double t, double a) {
                                                      	return t;
                                                      }
                                                      
                                                      def code(x, y, z, t, a):
                                                      	return t
                                                      
                                                      function code(x, y, z, t, a)
                                                      	return t
                                                      end
                                                      
                                                      function tmp = code(x, y, z, t, a)
                                                      	tmp = t;
                                                      end
                                                      
                                                      code[x_, y_, z_, t_, a_] := t
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      t
                                                      \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 \color{blue}{t} \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites25.2%

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

                                                        Reproduce

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