Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.3% → 92.1%
Time: 9.6s
Alternatives: 21
Speedup: 0.3×

Specification

?
\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 80.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 92.1% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999962e-292 or 2e-276 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3.99999999999999994e307

    1. Initial program 91.7%

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

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

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

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

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

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

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

    if -9.99999999999999962e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e-276

    1. Initial program 3.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. 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}} \]
    4. Step-by-step derivation
      1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

Alternative 2: 91.2% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 89.9%

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

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

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

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

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

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

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

    if -9.99999999999999962e-292 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e-276

    1. Initial program 3.3%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. 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}} \]
    4. Step-by-step derivation
      1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-291} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 2 \cdot 10^{-276}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a - z}, y - z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-\left(t - x\right), \frac{y - a}{z}, t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 63.8% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;z \leq -5.8 \cdot 10^{-161}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 2.45 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -7.20000000000000013e148

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -7.20000000000000013e148 < z < -2.35e-86

      1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.35e-86 < z < -5.8e-161 or 1.4499999999999999e-13 < z < 2.44999999999999998e134

      1. Initial program 78.8%

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

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

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

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

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

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

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

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

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

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

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

      if -5.8e-161 < z < 1.4499999999999999e-13

      1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

      if 2.44999999999999998e134 < z

      1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 72.1% accurate, 0.6× speedup?

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

          1. Initial program 61.1%

            \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
          2. Add Preprocessing
          3. 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}} \]
          4. Step-by-step derivation
            1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -7.80000000000000033e147 < z < -2.35e-86

          1. Initial program 82.1%

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.35e-86 < z < -5.8e-161

          1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

          if -5.8e-161 < z < 2.0000000000000001e-13

          1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 66.3% accurate, 0.6× speedup?

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

          1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.59999999999999997e180 < z < -2.80000000000000019e43

            1. Initial program 78.2%

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

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

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

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

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

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

                \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
              6. lower--.f6466.9

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

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

            if -2.80000000000000019e43 < z < 1.4499999999999999e-13

            1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

            if 1.4499999999999999e-13 < z < 2.44999999999999998e134

            1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

            if 2.44999999999999998e134 < z

            1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 6: 64.4% accurate, 0.6× speedup?

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

                1. Initial program 59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -1.59999999999999997e180 < z < -1.04e12

                  1. Initial program 77.5%

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

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

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

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

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

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

                      \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                    6. lower--.f6458.2

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

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

                  if -1.04e12 < z < 9.4999999999999999e-14

                  1. Initial program 91.0%

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

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

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

                      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
                    3. *-commutativeN/A

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

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

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

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

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

                  if 9.4999999999999999e-14 < z < 2.44999999999999998e134

                  1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

                  if 2.44999999999999998e134 < z

                  1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 7: 62.7% accurate, 0.7× speedup?

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

                      1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot z}{a - z}} \]
                      7. Step-by-step derivation
                        1. Applied rewrites65.8%

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

                        if -2.2499999999999999e45 < z < 9.4999999999999999e-14

                        1. Initial program 90.0%

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

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

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

                            \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
                          3. *-commutativeN/A

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

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

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

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

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

                        if 9.4999999999999999e-14 < z < 2.44999999999999998e134

                        1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

                        if 2.44999999999999998e134 < z

                        1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 8: 76.2% accurate, 0.8× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -360000000 \lor \neg \left(z \leq 2.25 \cdot 10^{-13}\right):\\ \;\;\;\;\mathsf{fma}\left(-\left(t - x\right), \frac{y - a}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{a} \cdot \left(t - x\right)\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (or (<= z -360000000.0) (not (<= z 2.25e-13)))
                             (fma (- (- t x)) (/ (- y a) z) t)
                             (+ x (* (/ (- y z) a) (- t x)))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((z <= -360000000.0) || !(z <= 2.25e-13)) {
                          		tmp = fma(-(t - x), ((y - a) / z), t);
                          	} else {
                          		tmp = x + (((y - z) / a) * (t - x));
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if ((z <= -360000000.0) || !(z <= 2.25e-13))
                          		tmp = fma(Float64(-Float64(t - x)), Float64(Float64(y - a) / z), t);
                          	else
                          		tmp = Float64(x + Float64(Float64(Float64(y - z) / a) * Float64(t - x)));
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -360000000.0], N[Not[LessEqual[z, 2.25e-13]], $MachinePrecision]], N[((-N[(t - x), $MachinePrecision]) * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], N[(x + N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;z \leq -360000000 \lor \neg \left(z \leq 2.25 \cdot 10^{-13}\right):\\
                          \;\;\;\;\mathsf{fma}\left(-\left(t - x\right), \frac{y - a}{z}, t\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x + \frac{y - z}{a} \cdot \left(t - x\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -3.6e8 or 2.25e-13 < z

                            1. Initial program 64.3%

                              \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                            2. Add Preprocessing
                            3. 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}} \]
                            4. Step-by-step derivation
                              1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -3.6e8 < z < 2.25e-13

                            1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -360000000 \lor \neg \left(z \leq 2.25 \cdot 10^{-13}\right):\\ \;\;\;\;\mathsf{fma}\left(-\left(t - x\right), \frac{y - a}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{a} \cdot \left(t - x\right)\\ \end{array} \]
                          5. Add Preprocessing

                          Alternative 9: 46.7% accurate, 0.8× speedup?

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

                            1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -6.4000000000000001e31 < z < -6.8000000000000004e-193

                              1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto x \cdot \color{blue}{\left(1 + \frac{z}{a - z}\right)} \]
                              7. Step-by-step derivation
                                1. Applied rewrites43.0%

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

                                if -6.8000000000000004e-193 < z < 4.4999999999999999e-26

                                1. Initial program 92.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 4.4999999999999999e-26 < z

                                    1. Initial program 61.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(a, \frac{-x}{z}, t\right) \]
                                      4. Recombined 4 regimes into one program.
                                      5. Final simplification55.3%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+31}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-193}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a - z}, x, x\right)\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-26}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \end{array} \]
                                      6. Add Preprocessing

                                      Alternative 10: 62.5% accurate, 0.9× speedup?

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

                                        1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot z}{a - z}} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites65.8%

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

                                          if -2.2499999999999999e45 < z < 2.0000000000000001e138

                                          1. Initial program 87.1%

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

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

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

                                              \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
                                            3. *-commutativeN/A

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

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

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

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

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

                                          if 2.0000000000000001e138 < z

                                          1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 11: 62.5% accurate, 0.9× speedup?

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

                                              1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

                                                \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot \left(y - z\right)}{z}} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites60.8%

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

                                                if -1.15e12 < z < 2.0000000000000001e138

                                                1. Initial program 87.7%

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

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

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

                                                    \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
                                                  3. *-commutativeN/A

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

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

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

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

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

                                                if 2.0000000000000001e138 < z

                                                1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  Alternative 12: 62.8% accurate, 0.9× speedup?

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

                                                    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if -1.12e30 < z < 2.0000000000000001e138

                                                      1. Initial program 88.1%

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

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

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

                                                          \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
                                                        3. *-commutativeN/A

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

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

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

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

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

                                                      if 2.0000000000000001e138 < z

                                                      1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 13: 46.3% accurate, 0.9× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-64} \lor \neg \left(z \leq 4.5 \cdot 10^{-26}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - x\right)\\ \end{array} \end{array} \]
                                                        (FPCore (x y z t a)
                                                         :precision binary64
                                                         (if (or (<= z -2.6e-64) (not (<= z 4.5e-26)))
                                                           (fma a (/ (- x) z) t)
                                                           (* (/ y a) (- t x))))
                                                        double code(double x, double y, double z, double t, double a) {
                                                        	double tmp;
                                                        	if ((z <= -2.6e-64) || !(z <= 4.5e-26)) {
                                                        		tmp = fma(a, (-x / z), t);
                                                        	} else {
                                                        		tmp = (y / a) * (t - x);
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        function code(x, y, z, t, a)
                                                        	tmp = 0.0
                                                        	if ((z <= -2.6e-64) || !(z <= 4.5e-26))
                                                        		tmp = fma(a, Float64(Float64(-x) / z), t);
                                                        	else
                                                        		tmp = Float64(Float64(y / a) * Float64(t - x));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6e-64], N[Not[LessEqual[z, 4.5e-26]], $MachinePrecision]], N[(a * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;z \leq -2.6 \cdot 10^{-64} \lor \neg \left(z \leq 4.5 \cdot 10^{-26}\right):\\
                                                        \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{y}{a} \cdot \left(t - x\right)\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if z < -2.6e-64 or 4.4999999999999999e-26 < z

                                                          1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              if -2.6e-64 < z < 4.4999999999999999e-26

                                                              1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \frac{y}{a} \cdot \left(\color{blue}{t} - x\right) \]
                                                                4. Recombined 2 regimes into one program.
                                                                5. Final simplification52.4%

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-64} \lor \neg \left(z \leq 4.5 \cdot 10^{-26}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - x\right)\\ \end{array} \]
                                                                6. Add Preprocessing

                                                                Alternative 14: 46.0% accurate, 0.9× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-64} \lor \neg \left(z \leq 4.5 \cdot 10^{-26}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \end{array} \end{array} \]
                                                                (FPCore (x y z t a)
                                                                 :precision binary64
                                                                 (if (or (<= z -2.6e-64) (not (<= z 4.5e-26)))
                                                                   (fma a (/ (- x) z) t)
                                                                   (* (/ (- t x) a) y)))
                                                                double code(double x, double y, double z, double t, double a) {
                                                                	double tmp;
                                                                	if ((z <= -2.6e-64) || !(z <= 4.5e-26)) {
                                                                		tmp = fma(a, (-x / z), t);
                                                                	} else {
                                                                		tmp = ((t - x) / a) * y;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                function code(x, y, z, t, a)
                                                                	tmp = 0.0
                                                                	if ((z <= -2.6e-64) || !(z <= 4.5e-26))
                                                                		tmp = fma(a, Float64(Float64(-x) / z), t);
                                                                	else
                                                                		tmp = Float64(Float64(Float64(t - x) / a) * y);
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6e-64], N[Not[LessEqual[z, 4.5e-26]], $MachinePrecision]], N[(a * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                \mathbf{if}\;z \leq -2.6 \cdot 10^{-64} \lor \neg \left(z \leq 4.5 \cdot 10^{-26}\right):\\
                                                                \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\frac{t - x}{a} \cdot y\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if z < -2.6e-64 or 4.4999999999999999e-26 < z

                                                                  1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      if -2.6e-64 < z < 4.4999999999999999e-26

                                                                      1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            \[\leadsto \frac{t - x}{a} \cdot \color{blue}{y} \]
                                                                        4. Recombined 2 regimes into one program.
                                                                        5. Final simplification52.2%

                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-64} \lor \neg \left(z \leq 4.5 \cdot 10^{-26}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \end{array} \]
                                                                        6. Add Preprocessing

                                                                        Alternative 15: 41.8% accurate, 0.9× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-74} \lor \neg \left(z \leq 4.5 \cdot 10^{-26}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \end{array} \]
                                                                        (FPCore (x y z t a)
                                                                         :precision binary64
                                                                         (if (or (<= z -1.8e-74) (not (<= z 4.5e-26)))
                                                                           (fma a (/ (- x) z) t)
                                                                           (* t (/ y (- a z)))))
                                                                        double code(double x, double y, double z, double t, double a) {
                                                                        	double tmp;
                                                                        	if ((z <= -1.8e-74) || !(z <= 4.5e-26)) {
                                                                        		tmp = fma(a, (-x / z), t);
                                                                        	} else {
                                                                        		tmp = t * (y / (a - z));
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        function code(x, y, z, t, a)
                                                                        	tmp = 0.0
                                                                        	if ((z <= -1.8e-74) || !(z <= 4.5e-26))
                                                                        		tmp = fma(a, Float64(Float64(-x) / z), t);
                                                                        	else
                                                                        		tmp = Float64(t * Float64(y / Float64(a - z)));
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.8e-74], N[Not[LessEqual[z, 4.5e-26]], $MachinePrecision]], N[(a * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        \mathbf{if}\;z \leq -1.8 \cdot 10^{-74} \lor \neg \left(z \leq 4.5 \cdot 10^{-26}\right):\\
                                                                        \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\
                                                                        
                                                                        \mathbf{else}:\\
                                                                        \;\;\;\;t \cdot \frac{y}{a - z}\\
                                                                        
                                                                        
                                                                        \end{array}
                                                                        \end{array}
                                                                        
                                                                        Derivation
                                                                        1. Split input into 2 regimes
                                                                        2. if z < -1.8000000000000001e-74 or 4.4999999999999999e-26 < z

                                                                          1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              if -1.8000000000000001e-74 < z < 4.4999999999999999e-26

                                                                              1. Initial program 92.4%

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

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

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

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

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

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

                                                                                  \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                                                                                6. lower--.f6437.2

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

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

                                                                                \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]
                                                                              7. Step-by-step derivation
                                                                                1. Applied rewrites34.0%

                                                                                  \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]
                                                                              8. Recombined 2 regimes into one program.
                                                                              9. Final simplification46.6%

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-74} \lor \neg \left(z \leq 4.5 \cdot 10^{-26}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \]
                                                                              10. Add Preprocessing

                                                                              Alternative 16: 37.2% accurate, 0.9× speedup?

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

                                                                                1. Initial program 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot z}{a - z}} \]
                                                                                7. Step-by-step derivation
                                                                                  1. Applied rewrites53.8%

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

                                                                                    \[\leadsto \left(-t\right) \cdot -1 \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites48.3%

                                                                                      \[\leadsto \left(-t\right) \cdot -1 \]

                                                                                    if -1.81999999999999991e-84 < z < 2.8999999999999999e132

                                                                                    1. Initial program 87.8%

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

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

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

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

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

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

                                                                                        \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
                                                                                      6. lower--.f6438.7

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

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

                                                                                      \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]
                                                                                    7. Step-by-step derivation
                                                                                      1. Applied rewrites31.4%

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

                                                                                      if 2.8999999999999999e132 < z

                                                                                      1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                          \[\leadsto \mathsf{fma}\left(a, \frac{t}{z}, t\right) \]
                                                                                        3. Step-by-step derivation
                                                                                          1. Applied rewrites69.0%

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

                                                                                        Alternative 17: 34.0% accurate, 1.0× speedup?

                                                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-205} \lor \neg \left(z \leq 1.96 \cdot 10^{-13}\right):\\ \;\;\;\;\left(-t\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
                                                                                        (FPCore (x y z t a)
                                                                                         :precision binary64
                                                                                         (if (or (<= z -3.4e-205) (not (<= z 1.96e-13))) (* (- t) -1.0) (* t (/ y a))))
                                                                                        double code(double x, double y, double z, double t, double a) {
                                                                                        	double tmp;
                                                                                        	if ((z <= -3.4e-205) || !(z <= 1.96e-13)) {
                                                                                        		tmp = -t * -1.0;
                                                                                        	} else {
                                                                                        		tmp = t * (y / a);
                                                                                        	}
                                                                                        	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 ((z <= (-3.4d-205)) .or. (.not. (z <= 1.96d-13))) then
                                                                                                tmp = -t * (-1.0d0)
                                                                                            else
                                                                                                tmp = t * (y / a)
                                                                                            end if
                                                                                            code = tmp
                                                                                        end function
                                                                                        
                                                                                        public static double code(double x, double y, double z, double t, double a) {
                                                                                        	double tmp;
                                                                                        	if ((z <= -3.4e-205) || !(z <= 1.96e-13)) {
                                                                                        		tmp = -t * -1.0;
                                                                                        	} else {
                                                                                        		tmp = t * (y / a);
                                                                                        	}
                                                                                        	return tmp;
                                                                                        }
                                                                                        
                                                                                        def code(x, y, z, t, a):
                                                                                        	tmp = 0
                                                                                        	if (z <= -3.4e-205) or not (z <= 1.96e-13):
                                                                                        		tmp = -t * -1.0
                                                                                        	else:
                                                                                        		tmp = t * (y / a)
                                                                                        	return tmp
                                                                                        
                                                                                        function code(x, y, z, t, a)
                                                                                        	tmp = 0.0
                                                                                        	if ((z <= -3.4e-205) || !(z <= 1.96e-13))
                                                                                        		tmp = Float64(Float64(-t) * -1.0);
                                                                                        	else
                                                                                        		tmp = Float64(t * Float64(y / a));
                                                                                        	end
                                                                                        	return tmp
                                                                                        end
                                                                                        
                                                                                        function tmp_2 = code(x, y, z, t, a)
                                                                                        	tmp = 0.0;
                                                                                        	if ((z <= -3.4e-205) || ~((z <= 1.96e-13)))
                                                                                        		tmp = -t * -1.0;
                                                                                        	else
                                                                                        		tmp = t * (y / a);
                                                                                        	end
                                                                                        	tmp_2 = tmp;
                                                                                        end
                                                                                        
                                                                                        code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.4e-205], N[Not[LessEqual[z, 1.96e-13]], $MachinePrecision]], N[((-t) * -1.0), $MachinePrecision], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]
                                                                                        
                                                                                        \begin{array}{l}
                                                                                        
                                                                                        \\
                                                                                        \begin{array}{l}
                                                                                        \mathbf{if}\;z \leq -3.4 \cdot 10^{-205} \lor \neg \left(z \leq 1.96 \cdot 10^{-13}\right):\\
                                                                                        \;\;\;\;\left(-t\right) \cdot -1\\
                                                                                        
                                                                                        \mathbf{else}:\\
                                                                                        \;\;\;\;t \cdot \frac{y}{a}\\
                                                                                        
                                                                                        
                                                                                        \end{array}
                                                                                        \end{array}
                                                                                        
                                                                                        Derivation
                                                                                        1. Split input into 2 regimes
                                                                                        2. if z < -3.4000000000000002e-205 or 1.95999999999999998e-13 < z

                                                                                          1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot z}{a - z}} \]
                                                                                          7. Step-by-step derivation
                                                                                            1. Applied rewrites47.2%

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

                                                                                              \[\leadsto \left(-t\right) \cdot -1 \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites42.6%

                                                                                                \[\leadsto \left(-t\right) \cdot -1 \]

                                                                                              if -3.4000000000000002e-205 < z < 1.95999999999999998e-13

                                                                                              1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

                                                                                                \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                                                              7. Step-by-step derivation
                                                                                                1. Applied rewrites30.2%

                                                                                                  \[\leadsto \frac{y \cdot t}{\color{blue}{a}} \]
                                                                                                2. Step-by-step derivation
                                                                                                  1. Applied rewrites34.2%

                                                                                                    \[\leadsto t \cdot \frac{y}{\color{blue}{a}} \]
                                                                                                3. Recombined 2 regimes into one program.
                                                                                                4. Final simplification39.9%

                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-205} \lor \neg \left(z \leq 1.96 \cdot 10^{-13}\right):\\ \;\;\;\;\left(-t\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \end{array} \]
                                                                                                5. Add Preprocessing

                                                                                                Alternative 18: 34.2% accurate, 1.0× speedup?

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

                                                                                                  1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                      if -3.4000000000000002e-205 < z < 1.95999999999999998e-13

                                                                                                      1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                                                                      7. Step-by-step derivation
                                                                                                        1. Applied rewrites30.2%

                                                                                                          \[\leadsto \frac{y \cdot t}{\color{blue}{a}} \]
                                                                                                        2. Step-by-step derivation
                                                                                                          1. Applied rewrites34.2%

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

                                                                                                          if 1.95999999999999998e-13 < z

                                                                                                          1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                            \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot z}{a - z}} \]
                                                                                                          7. Step-by-step derivation
                                                                                                            1. Applied rewrites50.4%

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

                                                                                                              \[\leadsto \left(-t\right) \cdot -1 \]
                                                                                                            3. Step-by-step derivation
                                                                                                              1. Applied rewrites46.5%

                                                                                                                \[\leadsto \left(-t\right) \cdot -1 \]
                                                                                                            4. Recombined 3 regimes into one program.
                                                                                                            5. Add Preprocessing

                                                                                                            Alternative 19: 25.8% accurate, 3.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                \[\leadsto \left(-t\right) \cdot -1 \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. Applied rewrites31.2%

                                                                                                                  \[\leadsto \left(-t\right) \cdot -1 \]
                                                                                                                2. Add Preprocessing

                                                                                                                Alternative 20: 20.0% accurate, 4.1× speedup?

                                                                                                                \[\begin{array}{l} \\ x + \left(t - x\right) \end{array} \]
                                                                                                                (FPCore (x y z t a) :precision binary64 (+ x (- t x)))
                                                                                                                double code(double x, double y, double z, double t, double a) {
                                                                                                                	return x + (t - x);
                                                                                                                }
                                                                                                                
                                                                                                                module fmin_fmax_functions
                                                                                                                    implicit none
                                                                                                                    private
                                                                                                                    public fmax
                                                                                                                    public fmin
                                                                                                                
                                                                                                                    interface fmax
                                                                                                                        module procedure fmax88
                                                                                                                        module procedure fmax44
                                                                                                                        module procedure fmax84
                                                                                                                        module procedure fmax48
                                                                                                                    end interface
                                                                                                                    interface fmin
                                                                                                                        module procedure fmin88
                                                                                                                        module procedure fmin44
                                                                                                                        module procedure fmin84
                                                                                                                        module procedure fmin48
                                                                                                                    end interface
                                                                                                                contains
                                                                                                                    real(8) function fmax88(x, y) result (res)
                                                                                                                        real(8), intent (in) :: x
                                                                                                                        real(8), intent (in) :: y
                                                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(4) function fmax44(x, y) result (res)
                                                                                                                        real(4), intent (in) :: x
                                                                                                                        real(4), intent (in) :: y
                                                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(8) function fmax84(x, y) result(res)
                                                                                                                        real(8), intent (in) :: x
                                                                                                                        real(4), intent (in) :: y
                                                                                                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(8) function fmax48(x, y) result(res)
                                                                                                                        real(4), intent (in) :: x
                                                                                                                        real(8), intent (in) :: y
                                                                                                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(8) function fmin88(x, y) result (res)
                                                                                                                        real(8), intent (in) :: x
                                                                                                                        real(8), intent (in) :: y
                                                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(4) function fmin44(x, y) result (res)
                                                                                                                        real(4), intent (in) :: x
                                                                                                                        real(4), intent (in) :: y
                                                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(8) function fmin84(x, y) result(res)
                                                                                                                        real(8), intent (in) :: x
                                                                                                                        real(4), intent (in) :: y
                                                                                                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(8) function fmin48(x, y) result(res)
                                                                                                                        real(4), intent (in) :: x
                                                                                                                        real(8), intent (in) :: y
                                                                                                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                end module
                                                                                                                
                                                                                                                real(8) function code(x, y, z, t, a)
                                                                                                                use fmin_fmax_functions
                                                                                                                    real(8), intent (in) :: x
                                                                                                                    real(8), intent (in) :: y
                                                                                                                    real(8), intent (in) :: z
                                                                                                                    real(8), intent (in) :: t
                                                                                                                    real(8), intent (in) :: a
                                                                                                                    code = x + (t - x)
                                                                                                                end function
                                                                                                                
                                                                                                                public static double code(double x, double y, double z, double t, double a) {
                                                                                                                	return x + (t - x);
                                                                                                                }
                                                                                                                
                                                                                                                def code(x, y, z, t, a):
                                                                                                                	return x + (t - x)
                                                                                                                
                                                                                                                function code(x, y, z, t, a)
                                                                                                                	return Float64(x + Float64(t - x))
                                                                                                                end
                                                                                                                
                                                                                                                function tmp = code(x, y, z, t, a)
                                                                                                                	tmp = x + (t - x);
                                                                                                                end
                                                                                                                
                                                                                                                code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
                                                                                                                
                                                                                                                \begin{array}{l}
                                                                                                                
                                                                                                                \\
                                                                                                                x + \left(t - x\right)
                                                                                                                \end{array}
                                                                                                                
                                                                                                                Derivation
                                                                                                                1. Initial program 76.7%

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

                                                                                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. lower--.f6422.9

                                                                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                5. Applied rewrites22.9%

                                                                                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                6. Add Preprocessing

                                                                                                                Alternative 21: 2.8% accurate, 4.8× speedup?

                                                                                                                \[\begin{array}{l} \\ x + \left(-x\right) \end{array} \]
                                                                                                                (FPCore (x y z t a) :precision binary64 (+ x (- x)))
                                                                                                                double code(double x, double y, double z, double t, double a) {
                                                                                                                	return x + -x;
                                                                                                                }
                                                                                                                
                                                                                                                module fmin_fmax_functions
                                                                                                                    implicit none
                                                                                                                    private
                                                                                                                    public fmax
                                                                                                                    public fmin
                                                                                                                
                                                                                                                    interface fmax
                                                                                                                        module procedure fmax88
                                                                                                                        module procedure fmax44
                                                                                                                        module procedure fmax84
                                                                                                                        module procedure fmax48
                                                                                                                    end interface
                                                                                                                    interface fmin
                                                                                                                        module procedure fmin88
                                                                                                                        module procedure fmin44
                                                                                                                        module procedure fmin84
                                                                                                                        module procedure fmin48
                                                                                                                    end interface
                                                                                                                contains
                                                                                                                    real(8) function fmax88(x, y) result (res)
                                                                                                                        real(8), intent (in) :: x
                                                                                                                        real(8), intent (in) :: y
                                                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(4) function fmax44(x, y) result (res)
                                                                                                                        real(4), intent (in) :: x
                                                                                                                        real(4), intent (in) :: y
                                                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(8) function fmax84(x, y) result(res)
                                                                                                                        real(8), intent (in) :: x
                                                                                                                        real(4), intent (in) :: y
                                                                                                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(8) function fmax48(x, y) result(res)
                                                                                                                        real(4), intent (in) :: x
                                                                                                                        real(8), intent (in) :: y
                                                                                                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(8) function fmin88(x, y) result (res)
                                                                                                                        real(8), intent (in) :: x
                                                                                                                        real(8), intent (in) :: y
                                                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(4) function fmin44(x, y) result (res)
                                                                                                                        real(4), intent (in) :: x
                                                                                                                        real(4), intent (in) :: y
                                                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(8) function fmin84(x, y) result(res)
                                                                                                                        real(8), intent (in) :: x
                                                                                                                        real(4), intent (in) :: y
                                                                                                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                    real(8) function fmin48(x, y) result(res)
                                                                                                                        real(4), intent (in) :: x
                                                                                                                        real(8), intent (in) :: y
                                                                                                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                    end function
                                                                                                                end module
                                                                                                                
                                                                                                                real(8) function code(x, y, z, t, a)
                                                                                                                use fmin_fmax_functions
                                                                                                                    real(8), intent (in) :: x
                                                                                                                    real(8), intent (in) :: y
                                                                                                                    real(8), intent (in) :: z
                                                                                                                    real(8), intent (in) :: t
                                                                                                                    real(8), intent (in) :: a
                                                                                                                    code = x + -x
                                                                                                                end function
                                                                                                                
                                                                                                                public static double code(double x, double y, double z, double t, double a) {
                                                                                                                	return x + -x;
                                                                                                                }
                                                                                                                
                                                                                                                def code(x, y, z, t, a):
                                                                                                                	return x + -x
                                                                                                                
                                                                                                                function code(x, y, z, t, a)
                                                                                                                	return Float64(x + Float64(-x))
                                                                                                                end
                                                                                                                
                                                                                                                function tmp = code(x, y, z, t, a)
                                                                                                                	tmp = x + -x;
                                                                                                                end
                                                                                                                
                                                                                                                code[x_, y_, z_, t_, a_] := N[(x + (-x)), $MachinePrecision]
                                                                                                                
                                                                                                                \begin{array}{l}
                                                                                                                
                                                                                                                \\
                                                                                                                x + \left(-x\right)
                                                                                                                \end{array}
                                                                                                                
                                                                                                                Derivation
                                                                                                                1. Initial program 76.7%

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

                                                                                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. lower--.f6422.9

                                                                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                5. Applied rewrites22.9%

                                                                                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                6. Taylor expanded in x around inf

                                                                                                                  \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                                                                                7. Step-by-step derivation
                                                                                                                  1. Applied rewrites2.8%

                                                                                                                    \[\leadsto x + \left(-x\right) \]
                                                                                                                  2. Add Preprocessing

                                                                                                                  Reproduce

                                                                                                                  ?
                                                                                                                  herbie shell --seed 2024359 
                                                                                                                  (FPCore (x y z t a)
                                                                                                                    :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
                                                                                                                    :precision binary64
                                                                                                                    (+ x (* (- y z) (/ (- t x) (- a z)))))