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

Percentage Accurate: 66.9% → 82.6%
Time: 12.8s
Alternatives: 16
Speedup: 0.9×

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 16 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: 66.9% 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: 82.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+45} \lor \neg \left(z \leq 2.1 \cdot 10^{+69}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-\left(t - x\right)}{z}, y - a, t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.75e45 or 2.10000000000000015e69 < z

    1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      11. fp-cancel-sign-sub-invN/A

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

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

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

    if -2.75e45 < z < 2.10000000000000015e69

    1. Initial program 88.3%

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

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

Alternative 2: 45.1% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq 1.6 \cdot 10^{-196}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\

\mathbf{elif}\;a \leq 1.4 \cdot 10^{-69}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6.4 \cdot 10^{+91}:\\
\;\;\;\;\frac{t - x}{a} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.3e21 or 6.39999999999999979e91 < a

    1. Initial program 66.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.3e21 < a < 1.6e-196

      1. Initial program 63.8%

        \[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. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

          \[\leadsto t - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
        11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

        if 1.6e-196 < a < 1.3999999999999999e-69

        1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + -1 \cdot \color{blue}{x} \]
          3. Step-by-step derivation
            1. Applied rewrites3.1%

              \[\leadsto 0 \cdot x \]
            2. Taylor expanded in z around inf

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

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

              if 1.3999999999999999e-69 < a < 6.39999999999999979e91

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{t - x}{a} \cdot \color{blue}{y} \]
              11. Recombined 4 regimes into one program.
              12. Final simplification55.6%

                \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{+21}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{a}, z, x\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-196}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-69}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{+91}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{a}, z, x\right)\\ \end{array} \]
              13. Add Preprocessing

              Alternative 3: 41.7% accurate, 0.6× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x, \frac{z}{a - z}, x\right)\\ \mathbf{if}\;a \leq -5.5 \cdot 10^{+22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-196}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-69}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+154}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (let* ((t_1 (fma x (/ z (- a z)) x)))
                 (if (<= a -5.5e+22)
                   t_1
                   (if (<= a 1.6e-196)
                     (* (/ (- x t) z) y)
                     (if (<= a 1.4e-69) t (if (<= a 3.9e+154) (* (/ (- t x) a) y) t_1))))))
              double code(double x, double y, double z, double t, double a) {
              	double t_1 = fma(x, (z / (a - z)), x);
              	double tmp;
              	if (a <= -5.5e+22) {
              		tmp = t_1;
              	} else if (a <= 1.6e-196) {
              		tmp = ((x - t) / z) * y;
              	} else if (a <= 1.4e-69) {
              		tmp = t;
              	} else if (a <= 3.9e+154) {
              		tmp = ((t - x) / a) * y;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a)
              	t_1 = fma(x, Float64(z / Float64(a - z)), x)
              	tmp = 0.0
              	if (a <= -5.5e+22)
              		tmp = t_1;
              	elseif (a <= 1.6e-196)
              		tmp = Float64(Float64(Float64(x - t) / z) * y);
              	elseif (a <= 1.4e-69)
              		tmp = t;
              	elseif (a <= 3.9e+154)
              		tmp = Float64(Float64(Float64(t - x) / a) * y);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -5.5e+22], t$95$1, If[LessEqual[a, 1.6e-196], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 1.4e-69], t, If[LessEqual[a, 3.9e+154], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \mathsf{fma}\left(x, \frac{z}{a - z}, x\right)\\
              \mathbf{if}\;a \leq -5.5 \cdot 10^{+22}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;a \leq 1.6 \cdot 10^{-196}:\\
              \;\;\;\;\frac{x - t}{z} \cdot y\\
              
              \mathbf{elif}\;a \leq 1.4 \cdot 10^{-69}:\\
              \;\;\;\;t\\
              
              \mathbf{elif}\;a \leq 3.9 \cdot 10^{+154}:\\
              \;\;\;\;\frac{t - x}{a} \cdot y\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if a < -5.50000000000000021e22 or 3.9000000000000003e154 < a

                1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -5.50000000000000021e22 < a < 1.6e-196

                  1. Initial program 63.8%

                    \[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. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

                      \[\leadsto t - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                    11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                    if 1.6e-196 < a < 1.3999999999999999e-69

                    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                      3. Step-by-step derivation
                        1. Applied rewrites3.1%

                          \[\leadsto 0 \cdot x \]
                        2. Taylor expanded in z around inf

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

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

                          if 1.3999999999999999e-69 < a < 3.9000000000000003e154

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+22}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{z}{a - z}, x\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-196}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-69}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+154}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{z}{a - z}, x\right)\\ \end{array} \]
                          13. Add Preprocessing

                          Alternative 4: 41.3% accurate, 0.7× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x, \frac{z}{a}, x\right)\\ \mathbf{if}\;a \leq -5.5 \cdot 10^{+22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-196}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-69}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+154}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (let* ((t_1 (fma x (/ z a) x)))
                             (if (<= a -5.5e+22)
                               t_1
                               (if (<= a 1.6e-196)
                                 (* (/ (- x t) z) y)
                                 (if (<= a 1.4e-69) t (if (<= a 3.9e+154) (* (/ (- t x) a) y) t_1))))))
                          double code(double x, double y, double z, double t, double a) {
                          	double t_1 = fma(x, (z / a), x);
                          	double tmp;
                          	if (a <= -5.5e+22) {
                          		tmp = t_1;
                          	} else if (a <= 1.6e-196) {
                          		tmp = ((x - t) / z) * y;
                          	} else if (a <= 1.4e-69) {
                          		tmp = t;
                          	} else if (a <= 3.9e+154) {
                          		tmp = ((t - x) / a) * y;
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	t_1 = fma(x, Float64(z / a), x)
                          	tmp = 0.0
                          	if (a <= -5.5e+22)
                          		tmp = t_1;
                          	elseif (a <= 1.6e-196)
                          		tmp = Float64(Float64(Float64(x - t) / z) * y);
                          	elseif (a <= 1.4e-69)
                          		tmp = t;
                          	elseif (a <= 3.9e+154)
                          		tmp = Float64(Float64(Float64(t - x) / a) * y);
                          	else
                          		tmp = t_1;
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -5.5e+22], t$95$1, If[LessEqual[a, 1.6e-196], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 1.4e-69], t, If[LessEqual[a, 3.9e+154], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \mathsf{fma}\left(x, \frac{z}{a}, x\right)\\
                          \mathbf{if}\;a \leq -5.5 \cdot 10^{+22}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;a \leq 1.6 \cdot 10^{-196}:\\
                          \;\;\;\;\frac{x - t}{z} \cdot y\\
                          
                          \mathbf{elif}\;a \leq 1.4 \cdot 10^{-69}:\\
                          \;\;\;\;t\\
                          
                          \mathbf{elif}\;a \leq 3.9 \cdot 10^{+154}:\\
                          \;\;\;\;\frac{t - x}{a} \cdot y\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 4 regimes
                          2. if a < -5.50000000000000021e22 or 3.9000000000000003e154 < a

                            1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -5.50000000000000021e22 < a < 1.6e-196

                                1. Initial program 63.8%

                                  \[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. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

                                    \[\leadsto t - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                  11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                                  if 1.6e-196 < a < 1.3999999999999999e-69

                                  1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites3.1%

                                        \[\leadsto 0 \cdot x \]
                                      2. Taylor expanded in z around inf

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

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

                                        if 1.3999999999999999e-69 < a < 3.9000000000000003e154

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \frac{t - x}{a} \cdot \color{blue}{y} \]
                                        11. Recombined 4 regimes into one program.
                                        12. Final simplification51.7%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+22}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{z}{a}, x\right)\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-196}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-69}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{+154}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{z}{a}, x\right)\\ \end{array} \]
                                        13. Add Preprocessing

                                        Alternative 5: 75.9% accurate, 0.8× speedup?

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

                                          1. Initial program 36.3%

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

                                            \[\leadsto \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. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

                                              \[\leadsto t - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                            11. fp-cancel-sign-sub-invN/A

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

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

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

                                          if -3700 < z < 2.0500000000000001e65

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 6: 39.7% accurate, 0.8× speedup?

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

                                          1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -3.69999999999999977e45 < a < 1.61999999999999995e-52

                                              1. Initial program 62.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if 1.61999999999999995e-52 < a < 3.9000000000000003e154

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

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

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

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

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

                                                  Alternative 7: 42.0% accurate, 0.8× speedup?

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

                                                    1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if -225 < z < 1.0999999999999999e-165

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if 1.0999999999999999e-165 < z < 82000

                                                          1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto x + \color{blue}{\frac{x \cdot z}{a - z}} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites48.4%

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

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

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

                                                              if 82000 < z

                                                              1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto x + \color{blue}{\frac{x \cdot z}{a - z}} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites12.5%

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

                                                                  \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites2.6%

                                                                    \[\leadsto 0 \cdot x \]
                                                                  2. Taylor expanded in z around inf

                                                                    \[\leadsto \left(x + -1 \cdot x\right) - \color{blue}{-1 \cdot t} \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites36.5%

                                                                      \[\leadsto 0 + \color{blue}{t} \]
                                                                  4. Recombined 4 regimes into one program.
                                                                  5. Final simplification45.8%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -225:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-165}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{elif}\;z \leq 82000:\\ \;\;\;\;\mathsf{fma}\left(x, \frac{z}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
                                                                  6. Add Preprocessing

                                                                  Alternative 8: 71.9% accurate, 0.8× speedup?

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

                                                                    1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto t - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                      11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                                                                      if -11500 < z < 2.0500000000000001e65

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      if 2.0500000000000001e65 < z

                                                                      1. Initial program 23.6%

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

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

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto t - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                        11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                                                                      Alternative 9: 62.7% accurate, 0.9× speedup?

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

                                                                        1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if -3.69999999999999977e45 < a < 4.6999999999999998e61

                                                                          1. Initial program 63.5%

                                                                            \[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. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto t - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                            11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

                                                                          Alternative 10: 70.0% accurate, 0.9× speedup?

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

                                                                            1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto t - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                              11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                                                                              if -7e3 < z < 2.80000000000000001e39

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                if 2.80000000000000001e39 < z

                                                                                1. Initial program 27.9%

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

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

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

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

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

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

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

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

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

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

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

                                                                                    \[\leadsto t - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                  11. fp-cancel-sign-sub-invN/A

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

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

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

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

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

                                                                                Alternative 11: 40.9% accurate, 1.0× speedup?

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

                                                                                  1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                      if -3.69999999999999977e45 < a < 1.3e41

                                                                                      1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        Alternative 12: 36.2% accurate, 1.0× speedup?

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

                                                                                          1. Initial program 42.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            \[\leadsto x + \color{blue}{\frac{x \cdot z}{a - z}} \]
                                                                                          7. Step-by-step derivation
                                                                                            1. Applied rewrites11.7%

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

                                                                                              \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites3.0%

                                                                                                \[\leadsto 0 \cdot x \]
                                                                                              2. Taylor expanded in z around inf

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

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

                                                                                                if -36 < z < 72000

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                  Alternative 13: 34.4% accurate, 1.0× speedup?

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

                                                                                                    1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                      \[\leadsto x + \color{blue}{\frac{x \cdot z}{a - z}} \]
                                                                                                    7. Step-by-step derivation
                                                                                                      1. Applied rewrites12.9%

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

                                                                                                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites3.0%

                                                                                                          \[\leadsto 0 \cdot x \]
                                                                                                        2. Taylor expanded in z around inf

                                                                                                          \[\leadsto \left(x + -1 \cdot x\right) - \color{blue}{-1 \cdot t} \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites39.2%

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

                                                                                                          if -43 < z < 1.7e-5

                                                                                                          1. Initial program 89.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--.f6442.0

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

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

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

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

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

                                                                                                          Alternative 14: 36.3% accurate, 1.0× speedup?

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

                                                                                                            1. Initial program 43.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                if -0.73999999999999999 < z < 72000

                                                                                                                1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                    if 72000 < z

                                                                                                                    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                      \[\leadsto x + \color{blue}{\frac{x \cdot z}{a - z}} \]
                                                                                                                    7. Step-by-step derivation
                                                                                                                      1. Applied rewrites12.5%

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

                                                                                                                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. Applied rewrites2.6%

                                                                                                                          \[\leadsto 0 \cdot x \]
                                                                                                                        2. Taylor expanded in z around inf

                                                                                                                          \[\leadsto \left(x + -1 \cdot x\right) - \color{blue}{-1 \cdot t} \]
                                                                                                                        3. Step-by-step derivation
                                                                                                                          1. Applied rewrites36.5%

                                                                                                                            \[\leadsto 0 + \color{blue}{t} \]
                                                                                                                        4. Recombined 3 regimes into one program.
                                                                                                                        5. Final simplification37.5%

                                                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.74:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{elif}\;z \leq 72000:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \]
                                                                                                                        6. Add Preprocessing

                                                                                                                        Alternative 15: 25.0% accurate, 29.0× speedup?

                                                                                                                        \[\begin{array}{l} \\ t \end{array} \]
                                                                                                                        (FPCore (x y z t a) :precision binary64 t)
                                                                                                                        double code(double x, double y, double z, double t, double a) {
                                                                                                                        	return t;
                                                                                                                        }
                                                                                                                        
                                                                                                                        module fmin_fmax_functions
                                                                                                                            implicit none
                                                                                                                            private
                                                                                                                            public fmax
                                                                                                                            public fmin
                                                                                                                        
                                                                                                                            interface fmax
                                                                                                                                module procedure fmax88
                                                                                                                                module procedure fmax44
                                                                                                                                module procedure fmax84
                                                                                                                                module procedure fmax48
                                                                                                                            end interface
                                                                                                                            interface fmin
                                                                                                                                module procedure fmin88
                                                                                                                                module procedure fmin44
                                                                                                                                module procedure fmin84
                                                                                                                                module procedure fmin48
                                                                                                                            end interface
                                                                                                                        contains
                                                                                                                            real(8) function fmax88(x, y) result (res)
                                                                                                                                real(8), intent (in) :: x
                                                                                                                                real(8), intent (in) :: y
                                                                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                            end function
                                                                                                                            real(4) function fmax44(x, y) result (res)
                                                                                                                                real(4), intent (in) :: x
                                                                                                                                real(4), intent (in) :: y
                                                                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                            end function
                                                                                                                            real(8) function fmax84(x, y) result(res)
                                                                                                                                real(8), intent (in) :: x
                                                                                                                                real(4), intent (in) :: y
                                                                                                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                            end function
                                                                                                                            real(8) function fmax48(x, y) result(res)
                                                                                                                                real(4), intent (in) :: x
                                                                                                                                real(8), intent (in) :: y
                                                                                                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                            end function
                                                                                                                            real(8) function fmin88(x, y) result (res)
                                                                                                                                real(8), intent (in) :: x
                                                                                                                                real(8), intent (in) :: y
                                                                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                            end function
                                                                                                                            real(4) function fmin44(x, y) result (res)
                                                                                                                                real(4), intent (in) :: x
                                                                                                                                real(4), intent (in) :: y
                                                                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                            end function
                                                                                                                            real(8) function fmin84(x, y) result(res)
                                                                                                                                real(8), intent (in) :: x
                                                                                                                                real(4), intent (in) :: y
                                                                                                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                            end function
                                                                                                                            real(8) function fmin48(x, y) result(res)
                                                                                                                                real(4), intent (in) :: x
                                                                                                                                real(8), intent (in) :: y
                                                                                                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                            end function
                                                                                                                        end module
                                                                                                                        
                                                                                                                        real(8) function code(x, y, z, t, a)
                                                                                                                        use fmin_fmax_functions
                                                                                                                            real(8), intent (in) :: x
                                                                                                                            real(8), intent (in) :: y
                                                                                                                            real(8), intent (in) :: z
                                                                                                                            real(8), intent (in) :: t
                                                                                                                            real(8), intent (in) :: a
                                                                                                                            code = t
                                                                                                                        end function
                                                                                                                        
                                                                                                                        public static double code(double x, double y, double z, double t, double a) {
                                                                                                                        	return t;
                                                                                                                        }
                                                                                                                        
                                                                                                                        def code(x, y, z, t, a):
                                                                                                                        	return t
                                                                                                                        
                                                                                                                        function code(x, y, z, t, a)
                                                                                                                        	return t
                                                                                                                        end
                                                                                                                        
                                                                                                                        function tmp = code(x, y, z, t, a)
                                                                                                                        	tmp = t;
                                                                                                                        end
                                                                                                                        
                                                                                                                        code[x_, y_, z_, t_, a_] := t
                                                                                                                        
                                                                                                                        \begin{array}{l}
                                                                                                                        
                                                                                                                        \\
                                                                                                                        t
                                                                                                                        \end{array}
                                                                                                                        
                                                                                                                        Derivation
                                                                                                                        1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                          \[\leadsto x + \color{blue}{\frac{x \cdot z}{a - z}} \]
                                                                                                                        7. Step-by-step derivation
                                                                                                                          1. Applied rewrites23.4%

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

                                                                                                                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                                                                                          3. Step-by-step derivation
                                                                                                                            1. Applied rewrites2.9%

                                                                                                                              \[\leadsto 0 \cdot x \]
                                                                                                                            2. Taylor expanded in z around inf

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

                                                                                                                                \[\leadsto 0 + \color{blue}{t} \]
                                                                                                                              2. Final simplification23.4%

                                                                                                                                \[\leadsto t \]
                                                                                                                              3. Add Preprocessing

                                                                                                                              Alternative 16: 2.8% accurate, 29.0× speedup?

                                                                                                                              \[\begin{array}{l} \\ 0 \end{array} \]
                                                                                                                              (FPCore (x y z t a) :precision binary64 0.0)
                                                                                                                              double code(double x, double y, double z, double t, double a) {
                                                                                                                              	return 0.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 = 0.0d0
                                                                                                                              end function
                                                                                                                              
                                                                                                                              public static double code(double x, double y, double z, double t, double a) {
                                                                                                                              	return 0.0;
                                                                                                                              }
                                                                                                                              
                                                                                                                              def code(x, y, z, t, a):
                                                                                                                              	return 0.0
                                                                                                                              
                                                                                                                              function code(x, y, z, t, a)
                                                                                                                              	return 0.0
                                                                                                                              end
                                                                                                                              
                                                                                                                              function tmp = code(x, y, z, t, a)
                                                                                                                              	tmp = 0.0;
                                                                                                                              end
                                                                                                                              
                                                                                                                              code[x_, y_, z_, t_, a_] := 0.0
                                                                                                                              
                                                                                                                              \begin{array}{l}
                                                                                                                              
                                                                                                                              \\
                                                                                                                              0
                                                                                                                              \end{array}
                                                                                                                              
                                                                                                                              Derivation
                                                                                                                              1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                \[\leadsto x + \color{blue}{\frac{x \cdot z}{a - z}} \]
                                                                                                                              7. Step-by-step derivation
                                                                                                                                1. Applied rewrites23.4%

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

                                                                                                                                  \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                                                                                                3. Step-by-step derivation
                                                                                                                                  1. Applied rewrites2.9%

                                                                                                                                    \[\leadsto 0 \cdot x \]
                                                                                                                                  2. Taylor expanded in x around 0

                                                                                                                                    \[\leadsto 0 \]
                                                                                                                                  3. Step-by-step derivation
                                                                                                                                    1. Applied rewrites2.9%

                                                                                                                                      \[\leadsto 0 \]
                                                                                                                                    2. Add Preprocessing

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

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

                                                                                                                                    Reproduce

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