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

Percentage Accurate: 68.2% → 86.6%
Time: 8.0s
Alternatives: 17
Speedup: 0.8×

Specification

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

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

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

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

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

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

Initial Program: 68.2% 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: 86.6% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-263}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_1 \leq 10^{+291}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0

    1. Initial program 36.1%

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-263 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 9.9999999999999996e290

    1. Initial program 96.8%

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

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

    1. Initial program 9.1%

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

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

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

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

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

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

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

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

          \[\leadsto \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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

      if 9.9999999999999996e290 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

      1. Initial program 40.8%

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

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

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

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

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

    Alternative 2: 86.5% accurate, 0.2× speedup?

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

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

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

      if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-263 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000003e298

      1. Initial program 96.8%

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

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

      1. Initial program 9.1%

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

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

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

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

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

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

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

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

            \[\leadsto \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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

      Alternative 3: 76.4% accurate, 0.8× speedup?

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

        1. Initial program 70.7%

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

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

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

        if -3.5000000000000001e72 < a < 5.29999999999999974e-30

        1. Initial program 67.8%

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

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

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

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

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

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

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

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

              \[\leadsto \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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 73.9% accurate, 0.8× speedup?

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

          1. Initial program 69.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--.f6477.6

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

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

          if -1.7999999999999999e-14 < a < 2.69999999999999987e-30

          1. Initial program 69.1%

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

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

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

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

            \[\leadsto x + \color{blue}{\left(\frac{t - x}{a - z} \cdot \left(1 - \frac{z}{y}\right)\right) \cdot y} \]
          6. 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}} \]
          7. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 69.6% accurate, 0.8× speedup?

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

            1. Initial program 69.7%

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

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

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

            if -1.45e-45 < a < 2.69999999999999987e-30

            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 x + \color{blue}{y \cdot \left(\left(-1 \cdot \frac{z \cdot \left(t - x\right)}{y \cdot \left(a - z\right)} + \frac{t}{a - z}\right) - \frac{x}{a - z}\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

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

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

              \[\leadsto x + \color{blue}{\left(\frac{t - x}{a - z} \cdot \left(1 - \frac{z}{y}\right)\right) \cdot y} \]
            6. 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}} \]
            7. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 63.7% accurate, 0.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-37} \lor \neg \left(z \leq 7.2 \cdot 10^{-14}\right):\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{-x}{z}, t\right)\\ \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 -5e-37) (not (<= z 7.2e-14)))
               (fma (- y) (/ (- x) z) t)
               (fma (/ (- t x) a) y x)))
            double code(double x, double y, double z, double t, double a) {
            	double tmp;
            	if ((z <= -5e-37) || !(z <= 7.2e-14)) {
            		tmp = fma(-y, (-x / z), t);
            	} else {
            		tmp = fma(((t - x) / a), y, x);
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a)
            	tmp = 0.0
            	if ((z <= -5e-37) || !(z <= 7.2e-14))
            		tmp = fma(Float64(-y), Float64(Float64(-x) / z), t);
            	else
            		tmp = fma(Float64(Float64(t - x) / a), y, x);
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5e-37], N[Not[LessEqual[z, 7.2e-14]], $MachinePrecision]], N[((-y) * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -5 \cdot 10^{-37} \lor \neg \left(z \leq 7.2 \cdot 10^{-14}\right):\\
            \;\;\;\;\mathsf{fma}\left(-y, \frac{-x}{z}, t\right)\\
            
            \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 < -4.9999999999999997e-37 or 7.1999999999999996e-14 < z

              1. Initial program 50.7%

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

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

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

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

                \[\leadsto x + \color{blue}{\left(\frac{t - x}{a - z} \cdot \left(1 - \frac{z}{y}\right)\right) \cdot y} \]
              6. 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}} \]
              7. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -4.9999999999999997e-37 < z < 7.1999999999999996e-14

                  1. Initial program 87.7%

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

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

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

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

                Alternative 7: 61.0% accurate, 0.9× speedup?

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

                  1. Initial program 68.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--.f6467.2

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

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

                  if -1.7999999999999999e-14 < a < 3.0999999999999998e-47

                  1. Initial program 69.6%

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

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

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

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

                    \[\leadsto x + \color{blue}{\left(\frac{t - x}{a - z} \cdot \left(1 - \frac{z}{y}\right)\right) \cdot y} \]
                  6. 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}} \]
                  7. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 8: 56.3% accurate, 0.9× speedup?

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

                      1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

                          \[\leadsto x + \frac{y}{a} \cdot t \]
                        3. Step-by-step derivation
                          1. Applied rewrites60.2%

                            \[\leadsto x + \frac{y}{a} \cdot t \]

                          if -1.7999999999999999e-14 < a < 2.29999999999999997e-68

                          1. Initial program 69.1%

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

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

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

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

                            \[\leadsto x + \color{blue}{\left(\frac{t - x}{a - z} \cdot \left(1 - \frac{z}{y}\right)\right) \cdot y} \]
                          6. 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}} \]
                          7. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 9: 41.4% accurate, 0.9× speedup?

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

                              1. Initial program 68.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.9

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

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

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

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

                                if -4.59999999999999979e86 < a < 8.5000000000000007e25

                                1. Initial program 69.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 x + \color{blue}{y \cdot \left(\left(-1 \cdot \frac{z \cdot \left(t - x\right)}{y \cdot \left(a - z\right)} + \frac{t}{a - z}\right) - \frac{x}{a - z}\right)} \]
                                4. Step-by-step derivation
                                  1. *-commutativeN/A

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

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

                                  \[\leadsto x + \color{blue}{\left(\frac{t - x}{a - z} \cdot \left(1 - \frac{z}{y}\right)\right) \cdot y} \]
                                6. 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}} \]
                                7. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 10: 42.4% accurate, 0.9× speedup?

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

                                    1. Initial program 53.6%

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

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

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

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

                                      \[\leadsto x + \color{blue}{\left(\frac{t - x}{a - z} \cdot \left(1 - \frac{z}{y}\right)\right) \cdot y} \]
                                    6. 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}} \]
                                    7. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if -1.64999999999999991e-37 < z < 1.04e-72

                                        1. Initial program 87.7%

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

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

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

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

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

                                        Alternative 11: 42.3% accurate, 0.9× speedup?

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

                                          1. Initial program 55.4%

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

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

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

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

                                            \[\leadsto x + \color{blue}{\left(\frac{t - x}{a - z} \cdot \left(1 - \frac{z}{y}\right)\right) \cdot y} \]
                                          6. 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}} \]
                                          7. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -1.64999999999999991e-37 < z < 1.12000000000000005e-72

                                              1. Initial program 87.7%

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

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

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

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

                                                if 1.12000000000000005e-72 < z

                                                1. Initial program 52.1%

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

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

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

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

                                                  \[\leadsto x + \color{blue}{\left(\frac{t - x}{a - z} \cdot \left(1 - \frac{z}{y}\right)\right) \cdot y} \]
                                                6. 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}} \]
                                                7. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  Alternative 12: 37.9% accurate, 0.9× speedup?

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

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

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

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

                                                      \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot z}{a - z}} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites52.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 rewrites46.4%

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

                                                        if -2.8e-11 < z < 3.3e18

                                                        1. Initial program 86.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--.f6445.0

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

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

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

                                                          if 3.3e18 < z

                                                          1. Initial program 45.5%

                                                            \[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--.f6451.8

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

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

                                                            \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot z}{a - z}} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites59.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.9%

                                                                \[\leadsto \left(-t\right) \cdot -1 \]
                                                            4. Recombined 3 regimes into one program.
                                                            5. Add Preprocessing

                                                            Alternative 13: 33.5% accurate, 1.0× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-37} \lor \neg \left(z \leq 2 \cdot 10^{-6}\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 -4.2e-37) (not (<= z 2e-6))) (* (- t) -1.0) (/ (* t y) a)))
                                                            double code(double x, double y, double z, double t, double a) {
                                                            	double tmp;
                                                            	if ((z <= -4.2e-37) || !(z <= 2e-6)) {
                                                            		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 <= (-4.2d-37)) .or. (.not. (z <= 2d-6))) 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 <= -4.2e-37) || !(z <= 2e-6)) {
                                                            		tmp = -t * -1.0;
                                                            	} else {
                                                            		tmp = (t * y) / a;
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            def code(x, y, z, t, a):
                                                            	tmp = 0
                                                            	if (z <= -4.2e-37) or not (z <= 2e-6):
                                                            		tmp = -t * -1.0
                                                            	else:
                                                            		tmp = (t * y) / a
                                                            	return tmp
                                                            
                                                            function code(x, y, z, t, a)
                                                            	tmp = 0.0
                                                            	if ((z <= -4.2e-37) || !(z <= 2e-6))
                                                            		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 <= -4.2e-37) || ~((z <= 2e-6)))
                                                            		tmp = -t * -1.0;
                                                            	else
                                                            		tmp = (t * y) / a;
                                                            	end
                                                            	tmp_2 = tmp;
                                                            end
                                                            
                                                            code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.2e-37], N[Not[LessEqual[z, 2e-6]], $MachinePrecision]], N[((-t) * -1.0), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            \mathbf{if}\;z \leq -4.2 \cdot 10^{-37} \lor \neg \left(z \leq 2 \cdot 10^{-6}\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 < -4.2000000000000002e-37 or 1.99999999999999991e-6 < z

                                                              1. Initial program 51.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 \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--.f6456.4

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

                                                                \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
                                                              6. Taylor expanded in y 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 rewrites44.9%

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

                                                                  if -4.2000000000000002e-37 < z < 1.99999999999999991e-6

                                                                  1. Initial program 86.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 \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--.f6444.3

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

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

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

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

                                                                  Alternative 14: 33.6% accurate, 1.0× speedup?

                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{-37}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-6}:\\ \;\;\;\;\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 -5e-37)
                                                                     (fma a (/ t z) t)
                                                                     (if (<= z 2e-6) (/ (* t y) a) (* (- t) -1.0))))
                                                                  double code(double x, double y, double z, double t, double a) {
                                                                  	double tmp;
                                                                  	if (z <= -5e-37) {
                                                                  		tmp = fma(a, (t / z), t);
                                                                  	} else if (z <= 2e-6) {
                                                                  		tmp = (t * y) / a;
                                                                  	} else {
                                                                  		tmp = -t * -1.0;
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  function code(x, y, z, t, a)
                                                                  	tmp = 0.0
                                                                  	if (z <= -5e-37)
                                                                  		tmp = fma(a, Float64(t / z), t);
                                                                  	elseif (z <= 2e-6)
                                                                  		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, -5e-37], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 2e-6], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], N[((-t) * -1.0), $MachinePrecision]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \begin{array}{l}
                                                                  \mathbf{if}\;z \leq -5 \cdot 10^{-37}:\\
                                                                  \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
                                                                  
                                                                  \mathbf{elif}\;z \leq 2 \cdot 10^{-6}:\\
                                                                  \;\;\;\;\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 < -4.9999999999999997e-37

                                                                    1. Initial program 54.7%

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

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

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

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

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

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

                                                                        if -4.9999999999999997e-37 < z < 1.99999999999999991e-6

                                                                        1. Initial program 86.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 \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--.f6444.3

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

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

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

                                                                          if 1.99999999999999991e-6 < z

                                                                          1. Initial program 48.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--.f6452.6

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

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

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

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

                                                                                \[\leadsto \left(-t\right) \cdot -1 \]
                                                                            4. Recombined 3 regimes into one program.
                                                                            5. Add Preprocessing

                                                                            Alternative 15: 24.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 69.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--.f6450.3

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

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

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

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

                                                                                  \[\leadsto \left(-t\right) \cdot -1 \]
                                                                                2. Add Preprocessing

                                                                                Alternative 16: 19.2% 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 69.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 x + \color{blue}{\left(t - x\right)} \]
                                                                                4. Step-by-step derivation
                                                                                  1. lower--.f6420.0

                                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                5. Applied rewrites20.0%

                                                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                6. Add Preprocessing

                                                                                Alternative 17: 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 69.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 x + \color{blue}{\left(t - x\right)} \]
                                                                                4. Step-by-step derivation
                                                                                  1. lower--.f6420.0

                                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                5. Applied rewrites20.0%

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

                                                                                    \[\leadsto x + \left(-x\right) \]
                                                                                  2. Add Preprocessing

                                                                                  Developer Target 1: 83.9% 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 2025017 
                                                                                  (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))))