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

Percentage Accurate: 68.0% → 83.1%
Time: 9.9s
Alternatives: 18
Speedup: 0.7×

Specification

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

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

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

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

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 18 alternatives:

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

Initial Program: 68.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 83.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq 1.25 \cdot 10^{-115}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+185}:\\
\;\;\;\;x + \left(-t\right) \cdot \left(\frac{y - z}{a - z} \cdot \left(\frac{x}{t} - 1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.80000000000000033e147 or 2.60000000000000001e185 < z

    1. Initial program 28.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. div-subN/A

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

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

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

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

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

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

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

    if -7.80000000000000033e147 < z < 1.2500000000000001e-115

    1. Initial program 89.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing

    if 1.2500000000000001e-115 < z < 2.60000000000000001e185

    1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 62.9% accurate, 0.5× speedup?

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

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

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

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

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

\mathbf{elif}\;z \leq 1.35 \cdot 10^{+151}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -8.1999999999999996e148 or 1.3500000000000001e151 < z

    1. Initial program 31.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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}} \]
    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 rewrites72.9%

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

      if -8.1999999999999996e148 < z < -6.8000000000000001e-89

      1. Initial program 75.1%

        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -6.8000000000000001e-89 < z < -5.8e-161 or 2.29999999999999989e-12 < z < 1.3500000000000001e151

        1. Initial program 68.3%

          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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--.f6462.1

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

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

        if -5.8e-161 < z < 2.29999999999999989e-12

        1. Initial program 95.0%

          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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)} \]
      8. Recombined 4 regimes into one program.
      9. Add Preprocessing

      Alternative 3: 72.1% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{-\left(t - x\right)}{z}, y - a, t\right)\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{+132}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -6.8 \cdot 10^{-89}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{z}{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 7.5 \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)) z) (- y a) t)))
         (if (<= z -1.05e+132)
           t_1
           (if (<= z -6.8e-89)
             (fma (- x t) (/ z (- a z)) x)
             (if (<= z -5.8e-161)
               (* (- t x) (/ y (- a z)))
               (if (<= z 7.5e-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) / z), (y - a), t);
      	double tmp;
      	if (z <= -1.05e+132) {
      		tmp = t_1;
      	} else if (z <= -6.8e-89) {
      		tmp = fma((x - t), (z / (a - z)), x);
      	} else if (z <= -5.8e-161) {
      		tmp = (t - x) * (y / (a - z));
      	} else if (z <= 7.5e-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(-Float64(t - x)) / z), Float64(y - a), t)
      	tmp = 0.0
      	if (z <= -1.05e+132)
      		tmp = t_1;
      	elseif (z <= -6.8e-89)
      		tmp = fma(Float64(x - t), Float64(z / Float64(a - z)), x);
      	elseif (z <= -5.8e-161)
      		tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z)));
      	elseif (z <= 7.5e-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[((-N[(t - x), $MachinePrecision]) / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.05e+132], t$95$1, If[LessEqual[z, -6.8e-89], N[(N[(x - t), $MachinePrecision] * N[(z / 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, 7.5e-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(\frac{-\left(t - x\right)}{z}, y - a, t\right)\\
      \mathbf{if}\;z \leq -1.05 \cdot 10^{+132}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq -6.8 \cdot 10^{-89}:\\
      \;\;\;\;\mathsf{fma}\left(x - t, \frac{z}{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 7.5 \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 < -1.04999999999999997e132 or 7.5000000000000004e-13 < z

        1. Initial program 41.0%

          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. div-subN/A

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

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

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

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

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

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

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

        if -1.04999999999999997e132 < z < -6.8000000000000001e-89

        1. Initial program 73.8%

          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -6.8000000000000001e-89 < z < -5.8e-161

          1. Initial program 86.5%

            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 < 7.5000000000000004e-13

          1. Initial program 95.0%

            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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)} \]
        8. Recombined 4 regimes into one program.
        9. Add Preprocessing

        Alternative 4: 74.8% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{-\left(t - x\right)}{z}, y - a, t\right)\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-161}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{elif}\;z \leq 7.5 \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)) z) (- y a) t)))
           (if (<= z -7.8e+147)
             t_1
             (if (<= z -4.8e-161)
               (+ x (/ (* (- y z) t) (- a z)))
               (if (<= z 7.5e-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) / z), (y - a), t);
        	double tmp;
        	if (z <= -7.8e+147) {
        		tmp = t_1;
        	} else if (z <= -4.8e-161) {
        		tmp = x + (((y - z) * t) / (a - z));
        	} else if (z <= 7.5e-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(-Float64(t - x)) / z), Float64(y - a), t)
        	tmp = 0.0
        	if (z <= -7.8e+147)
        		tmp = t_1;
        	elseif (z <= -4.8e-161)
        		tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z)));
        	elseif (z <= 7.5e-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[((-N[(t - x), $MachinePrecision]) / z), $MachinePrecision] * N[(y - a), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -7.8e+147], t$95$1, If[LessEqual[z, -4.8e-161], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-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(\frac{-\left(t - x\right)}{z}, y - a, t\right)\\
        \mathbf{if}\;z \leq -7.8 \cdot 10^{+147}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq -4.8 \cdot 10^{-161}:\\
        \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
        
        \mathbf{elif}\;z \leq 7.5 \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 3 regimes
        2. if z < -7.80000000000000033e147 or 7.5000000000000004e-13 < z

          1. Initial program 39.9%

            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. div-subN/A

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

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

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

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

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

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

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

          if -7.80000000000000033e147 < z < -4.79999999999999998e-161

          1. Initial program 78.4%

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

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

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

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

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

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

          if -4.79999999999999998e-161 < z < 7.5000000000000004e-13

          1. Initial program 95.0%

            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 3 regimes into one program.
        4. Add Preprocessing

        Alternative 5: 83.0% accurate, 0.7× speedup?

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

          1. Initial program 31.9%

            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. div-subN/A

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

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

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

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

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

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

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

          if -7.80000000000000033e147 < z < 2.4e95

          1. Initial program 86.8%

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

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

        Alternative 6: 61.9% accurate, 0.7× speedup?

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

          1. Initial program 37.7%

            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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 -7.7999999999999994e41 < z < 1.24999999999999997e-13

            1. Initial program 91.1%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 1.24999999999999997e-13 < z < 1.3500000000000001e151

            1. Initial program 61.3%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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--.f6455.5

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

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

            if 1.3500000000000001e151 < z

            1. Initial program 37.9%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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--.f6453.3

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

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

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

            Alternative 7: 42.8% accurate, 0.7× speedup?

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

              1. Initial program 72.4%

                \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -6.99999999999999996e93 < a < -3.0000000000000002e-90

                1. Initial program 76.8%

                  \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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--.f6443.8

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

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

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

                  if -3.0000000000000002e-90 < a < 5.2e20

                  1. Initial program 60.5%

                    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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 rewrites46.5%

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

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

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

                    Alternative 8: 42.8% accurate, 0.8× speedup?

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

                      1. Initial program 72.4%

                        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -6.99999999999999996e93 < a < -3.0000000000000002e-90

                            1. Initial program 76.8%

                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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--.f6443.8

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

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

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

                              if -3.0000000000000002e-90 < a < 5.2e20

                              1. Initial program 60.5%

                                \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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 rewrites46.5%

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

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

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

                                Alternative 9: 66.9% accurate, 0.8× speedup?

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

                                  1. Initial program 68.2%

                                    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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--.f6471.0

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

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

                                  if -1.8000000000000001e33 < y < 1.9500000000000001e-46

                                  1. Initial program 66.5%

                                    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(x - t, \frac{\color{blue}{z}}{a - z}, x\right) \]
                                  8. Recombined 2 regimes into one program.
                                  9. Final simplification70.7%

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

                                  Alternative 10: 61.9% accurate, 0.9× speedup?

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

                                    1. Initial program 39.1%

                                      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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 rewrites68.7%

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

                                      if -7.7999999999999994e41 < z < 2.0000000000000001e138

                                      1. Initial program 84.5%

                                        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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)} \]
                                    8. Recombined 2 regimes into one program.
                                    9. Final simplification65.9%

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

                                    Alternative 11: 62.0% accurate, 0.9× speedup?

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

                                      1. Initial program 41.8%

                                        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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--.f6457.6

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

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

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

                                        if -3.05e10 < z < 2.30000000000000008e138

                                        1. Initial program 84.9%

                                          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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)} \]
                                      8. Recombined 2 regimes into one program.
                                      9. Final simplification65.8%

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

                                      Alternative 12: 60.0% accurate, 0.9× speedup?

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

                                        1. Initial program 39.1%

                                          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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 rewrites68.7%

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

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

                                            if -1.3800000000000001e42 < z < 2.30000000000000008e138

                                            1. Initial program 84.5%

                                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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)} \]
                                          4. Recombined 2 regimes into one program.
                                          5. Final simplification64.2%

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

                                          Alternative 13: 37.2% accurate, 0.9× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{-87}:\\ \;\;\;\;\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 -6.8e-87)
                                             (* (- 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 <= -6.8e-87) {
                                          		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 <= -6.8e-87)
                                          		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, -6.8e-87], 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 -6.8 \cdot 10^{-87}:\\
                                          \;\;\;\;\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 < -6.7999999999999997e-87

                                            1. Initial program 49.1%

                                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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 -6.7999999999999997e-87 < z < 2.8999999999999999e132

                                                1. Initial program 86.0%

                                                  \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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 40.0%

                                                    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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 rewrites71.2%

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

                                                      \[\leadsto t + \frac{a \cdot t}{\color{blue}{z}} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites69.0%

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

                                                    Alternative 14: 33.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.6 \cdot 10^{-13}\right):\\ \;\;\;\;\left(-t\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \end{array} \end{array} \]
                                                    (FPCore (x y z t a)
                                                     :precision binary64
                                                     (if (or (<= z -3.4e-205) (not (<= z 1.6e-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.6e-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.6d-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.6e-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.6e-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.6e-13))
                                                    		tmp = Float64(Float64(-t) * -1.0);
                                                    	else
                                                    		tmp = Float64(Float64(t * 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.6e-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.6e-13]], $MachinePrecision]], N[((-t) * -1.0), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;z \leq -3.4 \cdot 10^{-205} \lor \neg \left(z \leq 1.6 \cdot 10^{-13}\right):\\
                                                    \;\;\;\;\left(-t\right) \cdot -1\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\frac{t \cdot y}{a}\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if z < -3.4000000000000002e-205 or 1.6e-13 < z

                                                      1. Initial program 54.4%

                                                        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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.6e-13

                                                          1. Initial program 95.1%

                                                            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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{t \cdot y}{\color{blue}{a}} \]
                                                          8. Recombined 2 regimes into one program.
                                                          9. Final simplification38.7%

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

                                                          Alternative 15: 33.3% accurate, 1.0× speedup?

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

                                                            1. Initial program 58.2%

                                                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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 rewrites45.7%

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

                                                                \[\leadsto t + \frac{a \cdot t}{\color{blue}{z}} \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites41.1%

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

                                                                if -2.2e-198 < z < 1.6e-13

                                                                1. Initial program 94.6%

                                                                  \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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.2

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

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

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

                                                                  if 1.6e-13 < z

                                                                  1. Initial program 48.4%

                                                                    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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 16: 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 67.3%

                                                                      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-\left(t - x\right), \frac{z}{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 17: 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 67.3%

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

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

                                                                          Developer Target 1: 84.3% accurate, 0.6× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                          (FPCore (x y z t a)
                                                                           :precision binary64
                                                                           (let* ((t_1 (- t (* (/ y z) (- t x)))))
                                                                             (if (< z -1.2536131056095036e+188)
                                                                               t_1
                                                                               (if (< z 4.446702369113811e+64)
                                                                                 (+ x (/ (- y z) (/ (- a z) (- t x))))
                                                                                 t_1))))
                                                                          double code(double x, double y, double z, double t, double a) {
                                                                          	double t_1 = t - ((y / z) * (t - x));
                                                                          	double tmp;
                                                                          	if (z < -1.2536131056095036e+188) {
                                                                          		tmp = t_1;
                                                                          	} else if (z < 4.446702369113811e+64) {
                                                                          		tmp = x + ((y - z) / ((a - z) / (t - x)));
                                                                          	} else {
                                                                          		tmp = t_1;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          module fmin_fmax_functions
                                                                              implicit none
                                                                              private
                                                                              public fmax
                                                                              public fmin
                                                                          
                                                                              interface fmax
                                                                                  module procedure fmax88
                                                                                  module procedure fmax44
                                                                                  module procedure fmax84
                                                                                  module procedure fmax48
                                                                              end interface
                                                                              interface fmin
                                                                                  module procedure fmin88
                                                                                  module procedure fmin44
                                                                                  module procedure fmin84
                                                                                  module procedure fmin48
                                                                              end interface
                                                                          contains
                                                                              real(8) function fmax88(x, y) result (res)
                                                                                  real(8), intent (in) :: x
                                                                                  real(8), intent (in) :: y
                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                              end function
                                                                              real(4) function fmax44(x, y) result (res)
                                                                                  real(4), intent (in) :: x
                                                                                  real(4), intent (in) :: y
                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                              end function
                                                                              real(8) function fmax84(x, y) result(res)
                                                                                  real(8), intent (in) :: x
                                                                                  real(4), intent (in) :: y
                                                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                              end function
                                                                              real(8) function fmax48(x, y) result(res)
                                                                                  real(4), intent (in) :: x
                                                                                  real(8), intent (in) :: y
                                                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                              end function
                                                                              real(8) function fmin88(x, y) result (res)
                                                                                  real(8), intent (in) :: x
                                                                                  real(8), intent (in) :: y
                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                              end function
                                                                              real(4) function fmin44(x, y) result (res)
                                                                                  real(4), intent (in) :: x
                                                                                  real(4), intent (in) :: y
                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                              end function
                                                                              real(8) function fmin84(x, y) result(res)
                                                                                  real(8), intent (in) :: x
                                                                                  real(4), intent (in) :: y
                                                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                              end function
                                                                              real(8) function fmin48(x, y) result(res)
                                                                                  real(4), intent (in) :: x
                                                                                  real(8), intent (in) :: y
                                                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                              end function
                                                                          end module
                                                                          
                                                                          real(8) function code(x, y, z, t, a)
                                                                          use fmin_fmax_functions
                                                                              real(8), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              real(8), intent (in) :: z
                                                                              real(8), intent (in) :: t
                                                                              real(8), intent (in) :: a
                                                                              real(8) :: t_1
                                                                              real(8) :: tmp
                                                                              t_1 = t - ((y / z) * (t - x))
                                                                              if (z < (-1.2536131056095036d+188)) then
                                                                                  tmp = t_1
                                                                              else if (z < 4.446702369113811d+64) then
                                                                                  tmp = x + ((y - z) / ((a - z) / (t - x)))
                                                                              else
                                                                                  tmp = t_1
                                                                              end if
                                                                              code = tmp
                                                                          end function
                                                                          
                                                                          public static double code(double x, double y, double z, double t, double a) {
                                                                          	double t_1 = t - ((y / z) * (t - x));
                                                                          	double tmp;
                                                                          	if (z < -1.2536131056095036e+188) {
                                                                          		tmp = t_1;
                                                                          	} else if (z < 4.446702369113811e+64) {
                                                                          		tmp = x + ((y - z) / ((a - z) / (t - x)));
                                                                          	} else {
                                                                          		tmp = t_1;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          def code(x, y, z, t, a):
                                                                          	t_1 = t - ((y / z) * (t - x))
                                                                          	tmp = 0
                                                                          	if z < -1.2536131056095036e+188:
                                                                          		tmp = t_1
                                                                          	elif z < 4.446702369113811e+64:
                                                                          		tmp = x + ((y - z) / ((a - z) / (t - x)))
                                                                          	else:
                                                                          		tmp = t_1
                                                                          	return tmp
                                                                          
                                                                          function code(x, y, z, t, a)
                                                                          	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
                                                                          	tmp = 0.0
                                                                          	if (z < -1.2536131056095036e+188)
                                                                          		tmp = t_1;
                                                                          	elseif (z < 4.446702369113811e+64)
                                                                          		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
                                                                          	else
                                                                          		tmp = t_1;
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          function tmp_2 = code(x, y, z, t, a)
                                                                          	t_1 = t - ((y / z) * (t - x));
                                                                          	tmp = 0.0;
                                                                          	if (z < -1.2536131056095036e+188)
                                                                          		tmp = t_1;
                                                                          	elseif (z < 4.446702369113811e+64)
                                                                          		tmp = x + ((y - z) / ((a - z) / (t - x)));
                                                                          	else
                                                                          		tmp = t_1;
                                                                          	end
                                                                          	tmp_2 = tmp;
                                                                          end
                                                                          
                                                                          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
                                                                          \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
                                                                          \;\;\;\;t\_1\\
                                                                          
                                                                          \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
                                                                          \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;t\_1\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          

                                                                          Reproduce

                                                                          ?
                                                                          herbie shell --seed 2024359 
                                                                          (FPCore (x y z t a)
                                                                            :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
                                                                            :precision binary64
                                                                          
                                                                            :alt
                                                                            (! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
                                                                          
                                                                            (+ x (/ (* (- y z) (- t x)) (- a z))))