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

Percentage Accurate: 68.5% → 85.3%
Time: 4.5s
Alternatives: 15
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}

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

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

Initial Program: 68.5% 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: 85.3% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.10000000000000002e203 or 1.35e95 < z

    1. Initial program 32.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000002e203 < z < 1.35e95

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 74.4% accurate, 0.6× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.1200000000000001e170 or 4.50000000000000001e111 < z

    1. Initial program 31.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1200000000000001e170 < z < -3.9999999999999999e-140

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.9999999999999999e-140 < z < 4.2000000000000002e-75

      1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

      if 4.2000000000000002e-75 < z < 4.50000000000000001e111

      1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 73.7% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-x\right) \cdot \frac{a - y}{z} + t\\ \mathbf{if}\;z \leq -1.12 \cdot 10^{+170}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4 \cdot 10^{-140}:\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-24}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+203}:\\ \;\;\;\;t - \frac{t - x}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (+ (* (- x) (/ (- a y) z)) t)))
       (if (<= z -1.12e+170)
         t_1
         (if (<= z -4e-140)
           (fma (- y z) (/ t (- a z)) x)
           (if (<= z 3.6e-24)
             (fma (- t x) (/ (- y z) a) x)
             (if (<= z 1.35e+203) (- t (* (/ (- t x) z) y)) t_1))))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (-x * ((a - y) / z)) + t;
    	double tmp;
    	if (z <= -1.12e+170) {
    		tmp = t_1;
    	} else if (z <= -4e-140) {
    		tmp = fma((y - z), (t / (a - z)), x);
    	} else if (z <= 3.6e-24) {
    		tmp = fma((t - x), ((y - z) / a), x);
    	} else if (z <= 1.35e+203) {
    		tmp = t - (((t - x) / z) * y);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(Float64(-x) * Float64(Float64(a - y) / z)) + t)
    	tmp = 0.0
    	if (z <= -1.12e+170)
    		tmp = t_1;
    	elseif (z <= -4e-140)
    		tmp = fma(Float64(y - z), Float64(t / Float64(a - z)), x);
    	elseif (z <= 3.6e-24)
    		tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x);
    	elseif (z <= 1.35e+203)
    		tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * y));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-x) * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.12e+170], t$95$1, If[LessEqual[z, -4e-140], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 3.6e-24], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.35e+203], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(-x\right) \cdot \frac{a - y}{z} + t\\
    \mathbf{if}\;z \leq -1.12 \cdot 10^{+170}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq -4 \cdot 10^{-140}:\\
    \;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\
    
    \mathbf{elif}\;z \leq 3.6 \cdot 10^{-24}:\\
    \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
    
    \mathbf{elif}\;z \leq 1.35 \cdot 10^{+203}:\\
    \;\;\;\;t - \frac{t - x}{z} \cdot y\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if z < -1.1200000000000001e170 or 1.35e203 < z

      1. Initial program 27.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(-x\right) \cdot \frac{a - y}{z} + t \]
        7. lower--.f6484.0

          \[\leadsto \left(-x\right) \cdot \frac{a - y}{z} + t \]
      7. Applied rewrites84.0%

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

      if -1.1200000000000001e170 < z < -3.9999999999999999e-140

      1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -3.9999999999999999e-140 < z < 3.6000000000000001e-24

        1. Initial program 90.7%

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

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

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

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

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

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

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

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

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

        if 3.6000000000000001e-24 < z < 1.35e203

        1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto t - y \cdot \frac{t - x}{\color{blue}{z}} \]
          3. sub-divN/A

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

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

            \[\leadsto t - \left(\frac{t}{z} - \frac{x}{z}\right) \cdot y \]
          6. sub-divN/A

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
          7. lower-/.f64N/A

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
          8. lift--.f6458.9

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
        7. Applied rewrites58.9%

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

      Alternative 4: 72.9% accurate, 0.7× speedup?

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

        1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto t - y \cdot \frac{t - x}{\color{blue}{z}} \]
          3. sub-divN/A

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

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

            \[\leadsto t - \left(\frac{t}{z} - \frac{x}{z}\right) \cdot y \]
          6. sub-divN/A

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
          7. lower-/.f64N/A

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
          8. lift--.f6464.3

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
        7. Applied rewrites64.3%

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

        if -1.09999999999999997e33 < z < 3.6000000000000001e-24

        1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

        if 1.35e203 < z

        1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(-x\right) \cdot \frac{a - y}{z} + t \]
        7. Applied rewrites62.6%

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

      Alternative 5: 69.3% accurate, 0.7× speedup?

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

        1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto t - y \cdot \frac{t - x}{\color{blue}{z}} \]
          3. sub-divN/A

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

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

            \[\leadsto t - \left(\frac{t}{z} - \frac{x}{z}\right) \cdot y \]
          6. sub-divN/A

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
          7. lower-/.f64N/A

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
          8. lift--.f6461.8

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
        7. Applied rewrites61.8%

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

        if -7.6000000000000006e32 < z < 4.2000000000000002e-75

        1. Initial program 89.6%

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

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

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

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

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

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

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

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

        if 1.35e203 < z

        1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(-x\right) \cdot \frac{a - y}{z} + t \]
        7. Applied rewrites59.8%

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

      Alternative 6: 68.8% accurate, 0.9× speedup?

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

        1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto t - y \cdot \frac{t - x}{\color{blue}{z}} \]
          3. sub-divN/A

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

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

            \[\leadsto t - \left(\frac{t}{z} - \frac{x}{z}\right) \cdot y \]
          6. sub-divN/A

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
          7. lower-/.f64N/A

            \[\leadsto t - \frac{t - x}{z} \cdot y \]
          8. lift--.f6464.5

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

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

        if -7.6000000000000006e32 < z < 4.2000000000000002e-75

        1. Initial program 89.6%

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

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

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

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

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

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

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

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

      Alternative 7: 63.8% accurate, 0.8× speedup?

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

        1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x \cdot y}{z} + t \]
        9. Step-by-step derivation
          1. associate-/l*N/A

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

            \[\leadsto x \cdot \frac{y}{z} + t \]
          3. lower-/.f6463.2

            \[\leadsto x \cdot \frac{y}{z} + t \]
        10. Applied rewrites63.2%

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

        if -1.2e33 < z < 4.2000000000000002e-75

        1. Initial program 89.6%

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

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

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

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

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

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

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

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

        if 4.2000000000000002e-75 < z < 2.8999999999999998e93

        1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{x}{z} - \frac{t}{z}\right) \cdot y \]
          3. sub-divN/A

            \[\leadsto \frac{x - t}{z} \cdot y \]
          4. lower-/.f64N/A

            \[\leadsto \frac{x - t}{z} \cdot y \]
          5. lower--.f6431.9

            \[\leadsto \frac{x - t}{z} \cdot y \]
        7. Applied rewrites31.9%

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

      Alternative 8: 58.8% accurate, 0.8× speedup?

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

        1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{x \cdot y}{z} + t \]
        9. Step-by-step derivation
          1. associate-/l*N/A

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

            \[\leadsto x \cdot \frac{y}{z} + t \]
          3. lower-/.f6463.2

            \[\leadsto x \cdot \frac{y}{z} + t \]
        10. Applied rewrites63.2%

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

        if -1.2e33 < z < 4.2000000000000002e-75

        1. Initial program 89.6%

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)} \]
        5. Step-by-step derivation
          1. lift-fma.f64N/A

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

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

            \[\leadsto y \cdot \frac{t - x}{a} + x \]
          4. associate-*r/N/A

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

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

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

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

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

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

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

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

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

          if 4.2000000000000002e-75 < z < 2.8999999999999998e93

          1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\frac{x}{z} - \frac{t}{z}\right) \cdot y \]
            3. sub-divN/A

              \[\leadsto \frac{x - t}{z} \cdot y \]
            4. lower-/.f64N/A

              \[\leadsto \frac{x - t}{z} \cdot y \]
            5. lower--.f6431.9

              \[\leadsto \frac{x - t}{z} \cdot y \]
          7. Applied rewrites31.9%

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

        Alternative 9: 53.6% accurate, 0.8× speedup?

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

          1. Initial program 40.7%

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

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

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

            if -2.2999999999999998e35 < z < 4.2000000000000002e-75

            1. Initial program 89.6%

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)} \]
            5. Step-by-step derivation
              1. lift-fma.f64N/A

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

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

                \[\leadsto y \cdot \frac{t - x}{a} + x \]
              4. associate-*r/N/A

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

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

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

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

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

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

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

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

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

              if 4.2000000000000002e-75 < z < 5.0000000000000001e93

              1. Initial program 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\frac{x}{z} - \frac{t}{z}\right) \cdot y \]
                3. sub-divN/A

                  \[\leadsto \frac{x - t}{z} \cdot y \]
                4. lower-/.f64N/A

                  \[\leadsto \frac{x - t}{z} \cdot y \]
                5. lower--.f6431.9

                  \[\leadsto \frac{x - t}{z} \cdot y \]
              7. Applied rewrites31.9%

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

            Alternative 10: 52.6% accurate, 1.1× speedup?

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

              1. Initial program 40.9%

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

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

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

                if -2.2999999999999998e35 < z < 4.3e83

                1. Initial program 87.0%

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)} \]
                5. Step-by-step derivation
                  1. lift-fma.f64N/A

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

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

                    \[\leadsto y \cdot \frac{t - x}{a} + x \]
                  4. associate-*r/N/A

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

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

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

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

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

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

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

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

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

                Alternative 11: 52.5% accurate, 1.1× speedup?

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

                  1. Initial program 40.9%

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

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

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

                    if -2.2999999999999998e35 < z < 4.00000000000000012e83

                    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

                    Alternative 12: 38.6% accurate, 1.0× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+35}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-148}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+79}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (if (<= z -2.3e+35)
                       t
                       (if (<= z 2.6e-148) x (if (<= z 7.5e+79) (* (/ x z) y) t))))
                    double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if (z <= -2.3e+35) {
                    		tmp = t;
                    	} else if (z <= 2.6e-148) {
                    		tmp = x;
                    	} else if (z <= 7.5e+79) {
                    		tmp = (x / z) * y;
                    	} else {
                    		tmp = t;
                    	}
                    	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 <= (-2.3d+35)) then
                            tmp = t
                        else if (z <= 2.6d-148) then
                            tmp = x
                        else if (z <= 7.5d+79) then
                            tmp = (x / z) * y
                        else
                            tmp = t
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if (z <= -2.3e+35) {
                    		tmp = t;
                    	} else if (z <= 2.6e-148) {
                    		tmp = x;
                    	} else if (z <= 7.5e+79) {
                    		tmp = (x / z) * y;
                    	} else {
                    		tmp = t;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a):
                    	tmp = 0
                    	if z <= -2.3e+35:
                    		tmp = t
                    	elif z <= 2.6e-148:
                    		tmp = x
                    	elif z <= 7.5e+79:
                    		tmp = (x / z) * y
                    	else:
                    		tmp = t
                    	return tmp
                    
                    function code(x, y, z, t, a)
                    	tmp = 0.0
                    	if (z <= -2.3e+35)
                    		tmp = t;
                    	elseif (z <= 2.6e-148)
                    		tmp = x;
                    	elseif (z <= 7.5e+79)
                    		tmp = Float64(Float64(x / z) * y);
                    	else
                    		tmp = t;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a)
                    	tmp = 0.0;
                    	if (z <= -2.3e+35)
                    		tmp = t;
                    	elseif (z <= 2.6e-148)
                    		tmp = x;
                    	elseif (z <= 7.5e+79)
                    		tmp = (x / z) * y;
                    	else
                    		tmp = t;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+35], t, If[LessEqual[z, 2.6e-148], x, If[LessEqual[z, 7.5e+79], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], t]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;z \leq -2.3 \cdot 10^{+35}:\\
                    \;\;\;\;t\\
                    
                    \mathbf{elif}\;z \leq 2.6 \cdot 10^{-148}:\\
                    \;\;\;\;x\\
                    
                    \mathbf{elif}\;z \leq 7.5 \cdot 10^{+79}:\\
                    \;\;\;\;\frac{x}{z} \cdot y\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if z < -2.2999999999999998e35 or 7.49999999999999967e79 < z

                      1. Initial program 41.0%

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

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

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

                        if -2.2999999999999998e35 < z < 2.60000000000000008e-148

                        1. Initial program 89.7%

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

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

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

                          if 2.60000000000000008e-148 < z < 7.49999999999999967e79

                          1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(\frac{x}{z} - \frac{t}{z}\right) \cdot y \]
                            3. sub-divN/A

                              \[\leadsto \frac{x - t}{z} \cdot y \]
                            4. lower-/.f64N/A

                              \[\leadsto \frac{x - t}{z} \cdot y \]
                            5. lower--.f6428.7

                              \[\leadsto \frac{x - t}{z} \cdot y \]
                          7. Applied rewrites28.7%

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

                            \[\leadsto \frac{x}{z} \cdot y \]
                          9. Step-by-step derivation
                            1. Applied rewrites17.9%

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

                          Alternative 13: 36.7% accurate, 1.0× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+35}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{-148}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+79}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (<= z -2.3e+35)
                             t
                             (if (<= z 2.6e-148) x (if (<= z 7.5e+79) (/ (* x y) z) t))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (z <= -2.3e+35) {
                          		tmp = t;
                          	} else if (z <= 2.6e-148) {
                          		tmp = x;
                          	} else if (z <= 7.5e+79) {
                          		tmp = (x * y) / z;
                          	} else {
                          		tmp = t;
                          	}
                          	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 <= (-2.3d+35)) then
                                  tmp = t
                              else if (z <= 2.6d-148) then
                                  tmp = x
                              else if (z <= 7.5d+79) then
                                  tmp = (x * y) / z
                              else
                                  tmp = t
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (z <= -2.3e+35) {
                          		tmp = t;
                          	} else if (z <= 2.6e-148) {
                          		tmp = x;
                          	} else if (z <= 7.5e+79) {
                          		tmp = (x * y) / z;
                          	} else {
                          		tmp = t;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	tmp = 0
                          	if z <= -2.3e+35:
                          		tmp = t
                          	elif z <= 2.6e-148:
                          		tmp = x
                          	elif z <= 7.5e+79:
                          		tmp = (x * y) / z
                          	else:
                          		tmp = t
                          	return tmp
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if (z <= -2.3e+35)
                          		tmp = t;
                          	elseif (z <= 2.6e-148)
                          		tmp = x;
                          	elseif (z <= 7.5e+79)
                          		tmp = Float64(Float64(x * y) / z);
                          	else
                          		tmp = t;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a)
                          	tmp = 0.0;
                          	if (z <= -2.3e+35)
                          		tmp = t;
                          	elseif (z <= 2.6e-148)
                          		tmp = x;
                          	elseif (z <= 7.5e+79)
                          		tmp = (x * y) / z;
                          	else
                          		tmp = t;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+35], t, If[LessEqual[z, 2.6e-148], x, If[LessEqual[z, 7.5e+79], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], t]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;z \leq -2.3 \cdot 10^{+35}:\\
                          \;\;\;\;t\\
                          
                          \mathbf{elif}\;z \leq 2.6 \cdot 10^{-148}:\\
                          \;\;\;\;x\\
                          
                          \mathbf{elif}\;z \leq 7.5 \cdot 10^{+79}:\\
                          \;\;\;\;\frac{x \cdot y}{z}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if z < -2.2999999999999998e35 or 7.49999999999999967e79 < z

                            1. Initial program 41.0%

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

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

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

                              if -2.2999999999999998e35 < z < 2.60000000000000008e-148

                              1. Initial program 89.7%

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

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

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

                                if 2.60000000000000008e-148 < z < 7.49999999999999967e79

                                1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(\frac{x}{z} - \frac{t}{z}\right) \cdot y \]
                                  3. sub-divN/A

                                    \[\leadsto \frac{x - t}{z} \cdot y \]
                                  4. lower-/.f64N/A

                                    \[\leadsto \frac{x - t}{z} \cdot y \]
                                  5. lower--.f6428.7

                                    \[\leadsto \frac{x - t}{z} \cdot y \]
                                7. Applied rewrites28.7%

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

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

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

                                    \[\leadsto \frac{x \cdot y}{z} \]
                                10. Applied rewrites18.5%

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

                              Alternative 14: 36.6% accurate, 2.1× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+35}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 22000000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
                              (FPCore (x y z t a)
                               :precision binary64
                               (if (<= z -2.3e+35) t (if (<= z 22000000000000.0) x t)))
                              double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if (z <= -2.3e+35) {
                              		tmp = t;
                              	} else if (z <= 22000000000000.0) {
                              		tmp = x;
                              	} else {
                              		tmp = t;
                              	}
                              	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 <= (-2.3d+35)) then
                                      tmp = t
                                  else if (z <= 22000000000000.0d0) then
                                      tmp = x
                                  else
                                      tmp = t
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if (z <= -2.3e+35) {
                              		tmp = t;
                              	} else if (z <= 22000000000000.0) {
                              		tmp = x;
                              	} else {
                              		tmp = t;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a):
                              	tmp = 0
                              	if z <= -2.3e+35:
                              		tmp = t
                              	elif z <= 22000000000000.0:
                              		tmp = x
                              	else:
                              		tmp = t
                              	return tmp
                              
                              function code(x, y, z, t, a)
                              	tmp = 0.0
                              	if (z <= -2.3e+35)
                              		tmp = t;
                              	elseif (z <= 22000000000000.0)
                              		tmp = x;
                              	else
                              		tmp = t;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a)
                              	tmp = 0.0;
                              	if (z <= -2.3e+35)
                              		tmp = t;
                              	elseif (z <= 22000000000000.0)
                              		tmp = x;
                              	else
                              		tmp = t;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+35], t, If[LessEqual[z, 22000000000000.0], x, t]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;z \leq -2.3 \cdot 10^{+35}:\\
                              \;\;\;\;t\\
                              
                              \mathbf{elif}\;z \leq 22000000000000:\\
                              \;\;\;\;x\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if z < -2.2999999999999998e35 or 2.2e13 < z

                                1. Initial program 44.7%

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

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

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

                                  if -2.2999999999999998e35 < z < 2.2e13

                                  1. Initial program 89.0%

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

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

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

                                  Alternative 15: 25.1% accurate, 17.9× speedup?

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

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

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

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

                                    Reproduce

                                    ?
                                    herbie shell --seed 2025120 
                                    (FPCore (x y z t a)
                                      :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
                                      :precision binary64
                                      (+ x (/ (* (- y z) (- t x)) (- a z))))