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

Percentage Accurate: 67.1% → 86.7%
Time: 4.7s
Alternatives: 13
Speedup: 0.7×

Specification

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

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

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

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

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 13 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: 67.1% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 86.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-293}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 28.7%

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

      \[\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. lower-*.f64N/A

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.0000000000000001e-293 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 4.0000000000000001e292

    1. Initial program 96.7%

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

    if 4.0000000000000001e292 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 28.7%

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

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

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

Alternative 2: 85.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \left(x \cdot \frac{a - y}{z}\right) + t\\ \mathbf{if}\;z \leq -1.35 \cdot 10^{+241}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+153}:\\ \;\;\;\;\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 (+ (* -1.0 (* x (/ (- a y) z))) t)))
   (if (<= z -1.35e+241)
     t_1
     (if (<= z 8.5e+153) (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 = (-1.0 * (x * ((a - y) / z))) + t;
	double tmp;
	if (z <= -1.35e+241) {
		tmp = t_1;
	} else if (z <= 8.5e+153) {
		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(-1.0 * Float64(x * Float64(Float64(a - y) / z))) + t)
	tmp = 0.0
	if (z <= -1.35e+241)
		tmp = t_1;
	elseif (z <= 8.5e+153)
		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[(-1.0 * N[(x * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -1.35e+241], t$95$1, If[LessEqual[z, 8.5e+153], 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 := -1 \cdot \left(x \cdot \frac{a - y}{z}\right) + t\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+241}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{+153}:\\
\;\;\;\;\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.34999999999999986e241 or 8.49999999999999935e153 < z

    1. Initial program 27.3%

      \[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 rewrites66.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. lower-*.f64N/A

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

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

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

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

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

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

    if -1.34999999999999986e241 < z < 8.49999999999999935e153

    1. Initial program 76.1%

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

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

      \[\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 3: 75.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -1.35 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 5.6 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.7999999999999998e39 or 5.5999999999999997e153 < z

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

      \[\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. lower-*.f64N/A

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

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

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

        \[\leadsto -1 \cdot \left(x \cdot \frac{a - y}{z}\right) + t \]
      5. lower--.f6474.2

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

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

    if -3.7999999999999998e39 < z < -1.3499999999999999e-158 or 8.8000000000000001e-51 < z < 5.5999999999999997e153

    1. Initial program 75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.3499999999999999e-158 < z < 8.8000000000000001e-51

      1. Initial program 89.9%

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

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

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

    Alternative 4: 69.9% accurate, 0.7× speedup?

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

      1. Initial program 67.1%

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

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

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

      if -3.2e11 < a < -1.4199999999999999e-136

      1. Initial program 66.7%

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

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

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

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

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

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

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

          \[\leadsto \frac{\left(t - x\right) \cdot y}{a - z} \]
        7. lift--.f6444.7

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

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

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

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

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

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

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

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

          \[\leadsto \frac{t - x}{a - z} \cdot \color{blue}{y} \]
        8. lower-*.f64N/A

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

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

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

          \[\leadsto \frac{t - x}{a - z} \cdot y \]
      6. Applied rewrites47.8%

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

      if -1.4199999999999999e-136 < a < 5.5000000000000003e73

      1. Initial program 67.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 rewrites70.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. lower-/.f64N/A

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

          \[\leadsto t - \frac{y \cdot \left(t - x\right)}{z} \]
        4. lift--.f6467.4

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

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

    Alternative 5: 66.4% accurate, 0.7× speedup?

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

      1. Initial program 67.3%

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

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

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

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

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

          if -4e11 < a < -1.4199999999999999e-136

          1. Initial program 66.7%

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(t - x\right) \cdot y}{a - z} \]
            7. lift--.f6444.7

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

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

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

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

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

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

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

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

              \[\leadsto \frac{t - x}{a - z} \cdot \color{blue}{y} \]
            8. lower-*.f64N/A

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

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

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

              \[\leadsto \frac{t - x}{a - z} \cdot y \]
          6. Applied rewrites47.8%

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

          if -1.4199999999999999e-136 < a < 5.5000000000000003e73

          1. Initial program 67.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 rewrites70.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. lower-/.f64N/A

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

              \[\leadsto t - \frac{y \cdot \left(t - x\right)}{z} \]
            4. lift--.f6467.4

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

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

          if 5.5000000000000003e73 < a

          1. Initial program 66.8%

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

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

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

        Alternative 6: 65.8% accurate, 0.7× speedup?

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

          1. Initial program 67.1%

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

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

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

          if -3.8e11 < a < -1.4199999999999999e-136

          1. Initial program 66.7%

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(t - x\right) \cdot y}{a - z} \]
            7. lift--.f6444.7

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

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

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

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

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

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

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

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

              \[\leadsto \frac{t - x}{a - z} \cdot \color{blue}{y} \]
            8. lower-*.f64N/A

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

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

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

              \[\leadsto \frac{t - x}{a - z} \cdot y \]
          6. Applied rewrites47.8%

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

          if -1.4199999999999999e-136 < a < 5.5000000000000003e73

          1. Initial program 67.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 rewrites70.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. lower-/.f64N/A

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

              \[\leadsto t - \frac{y \cdot \left(t - x\right)}{z} \]
            4. lift--.f6467.4

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

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

        Alternative 7: 65.7% accurate, 0.7× speedup?

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

          1. Initial program 67.1%

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

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

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

          if -3.8e11 < a < -1.4199999999999999e-136

          1. Initial program 66.7%

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(t - x\right) \cdot y}{a - z} \]
            7. lift--.f6444.7

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

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

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

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

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

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

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

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

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

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

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

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

          if -1.4199999999999999e-136 < a < 5.5000000000000003e73

          1. Initial program 67.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 rewrites70.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. lower-/.f64N/A

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

              \[\leadsto t - \frac{y \cdot \left(t - x\right)}{z} \]
            4. lift--.f6467.4

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

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

        Alternative 8: 63.8% accurate, 0.9× speedup?

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

          1. Initial program 67.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--.f6468.6

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

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

          if -1.02e11 < a < 5.5000000000000003e73

          1. Initial program 67.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 rewrites68.8%

            \[\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. lower-/.f64N/A

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

              \[\leadsto t - \frac{y \cdot \left(t - x\right)}{z} \]
            4. lift--.f6464.8

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

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

        Alternative 9: 59.2% accurate, 0.9× speedup?

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

          1. Initial program 41.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 rewrites61.9%

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

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

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

              \[\leadsto \frac{a \cdot \left(t - x\right)}{z} + t \]
            3. lift--.f6450.1

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

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

            \[\leadsto \frac{a \cdot t}{z} + t \]
          9. Step-by-step derivation
            1. lower-*.f6443.9

              \[\leadsto \frac{a \cdot t}{z} + t \]
          10. Applied rewrites43.9%

            \[\leadsto \frac{a \cdot t}{z} + t \]

          if -2.64999999999999989e39 < z < 9.99999999999999998e97

          1. Initial program 85.5%

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

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

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

          if 9.99999999999999998e97 < z

          1. Initial program 35.3%

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

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

          Alternative 10: 49.4% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3600000000000:\\ \;\;\;\;\frac{a \cdot t}{z} + t\\ \mathbf{elif}\;z \leq 0.00185:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+99}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (<= z -3600000000000.0)
             (+ (/ (* a t) z) t)
             (if (<= z 0.00185)
               (+ x (/ (* y t) a))
               (if (<= z 5.4e+99) (* y (/ (- x t) z)) t))))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (z <= -3600000000000.0) {
          		tmp = ((a * t) / z) + t;
          	} else if (z <= 0.00185) {
          		tmp = x + ((y * t) / a);
          	} else if (z <= 5.4e+99) {
          		tmp = y * ((x - t) / 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 <= (-3600000000000.0d0)) then
                  tmp = ((a * t) / z) + t
              else if (z <= 0.00185d0) then
                  tmp = x + ((y * t) / a)
              else if (z <= 5.4d+99) then
                  tmp = y * ((x - t) / 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 <= -3600000000000.0) {
          		tmp = ((a * t) / z) + t;
          	} else if (z <= 0.00185) {
          		tmp = x + ((y * t) / a);
          	} else if (z <= 5.4e+99) {
          		tmp = y * ((x - t) / z);
          	} else {
          		tmp = t;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a):
          	tmp = 0
          	if z <= -3600000000000.0:
          		tmp = ((a * t) / z) + t
          	elif z <= 0.00185:
          		tmp = x + ((y * t) / a)
          	elif z <= 5.4e+99:
          		tmp = y * ((x - t) / z)
          	else:
          		tmp = t
          	return tmp
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (z <= -3600000000000.0)
          		tmp = Float64(Float64(Float64(a * t) / z) + t);
          	elseif (z <= 0.00185)
          		tmp = Float64(x + Float64(Float64(y * t) / a));
          	elseif (z <= 5.4e+99)
          		tmp = Float64(y * Float64(Float64(x - t) / z));
          	else
          		tmp = t;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	tmp = 0.0;
          	if (z <= -3600000000000.0)
          		tmp = ((a * t) / z) + t;
          	elseif (z <= 0.00185)
          		tmp = x + ((y * t) / a);
          	elseif (z <= 5.4e+99)
          		tmp = y * ((x - t) / z);
          	else
          		tmp = t;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3600000000000.0], N[(N[(N[(a * t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 0.00185], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+99], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -3600000000000:\\
          \;\;\;\;\frac{a \cdot t}{z} + t\\
          
          \mathbf{elif}\;z \leq 0.00185:\\
          \;\;\;\;x + \frac{y \cdot t}{a}\\
          
          \mathbf{elif}\;z \leq 5.4 \cdot 10^{+99}:\\
          \;\;\;\;y \cdot \frac{x - t}{z}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if z < -3.6e12

            1. Initial program 43.8%

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

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

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

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

                \[\leadsto \frac{a \cdot \left(t - x\right)}{z} + t \]
              3. lift--.f6448.1

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

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

              \[\leadsto \frac{a \cdot t}{z} + t \]
            9. Step-by-step derivation
              1. lower-*.f6442.0

                \[\leadsto \frac{a \cdot t}{z} + t \]
            10. Applied rewrites42.0%

              \[\leadsto \frac{a \cdot t}{z} + t \]

            if -3.6e12 < z < 0.0018500000000000001

            1. Initial program 88.3%

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

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

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

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

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

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

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

                  if 0.0018500000000000001 < z < 5.39999999999999978e99

                  1. Initial program 72.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 rewrites55.2%

                    \[\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. lower-*.f64N/A

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

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

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

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

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

                  if 5.39999999999999978e99 < z

                  1. Initial program 34.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 rewrites51.8%

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

                  Alternative 11: 38.9% accurate, 1.0× speedup?

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

                    1. Initial program 68.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 rewrites45.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. lower-*.f64N/A

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

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

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

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

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

                    if -2.80000000000000012e-79 < y < 7.2e45

                    1. Initial program 65.8%

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

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

                    Alternative 12: 36.9% accurate, 2.1× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3600000000000:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (if (<= z -3600000000000.0) t (if (<= z 1.18e+81) x t)))
                    double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if (z <= -3600000000000.0) {
                    		tmp = t;
                    	} else if (z <= 1.18e+81) {
                    		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 <= (-3600000000000.0d0)) then
                            tmp = t
                        else if (z <= 1.18d+81) 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 <= -3600000000000.0) {
                    		tmp = t;
                    	} else if (z <= 1.18e+81) {
                    		tmp = x;
                    	} else {
                    		tmp = t;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a):
                    	tmp = 0
                    	if z <= -3600000000000.0:
                    		tmp = t
                    	elif z <= 1.18e+81:
                    		tmp = x
                    	else:
                    		tmp = t
                    	return tmp
                    
                    function code(x, y, z, t, a)
                    	tmp = 0.0
                    	if (z <= -3600000000000.0)
                    		tmp = t;
                    	elseif (z <= 1.18e+81)
                    		tmp = x;
                    	else
                    		tmp = t;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a)
                    	tmp = 0.0;
                    	if (z <= -3600000000000.0)
                    		tmp = t;
                    	elseif (z <= 1.18e+81)
                    		tmp = x;
                    	else
                    		tmp = t;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3600000000000.0], t, If[LessEqual[z, 1.18e+81], x, t]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;z \leq -3600000000000:\\
                    \;\;\;\;t\\
                    
                    \mathbf{elif}\;z \leq 1.18 \cdot 10^{+81}:\\
                    \;\;\;\;x\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -3.6e12 or 1.17999999999999995e81 < z

                      1. Initial program 40.6%

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

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

                        if -3.6e12 < z < 1.17999999999999995e81

                        1. Initial program 86.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 rewrites32.8%

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

                        Alternative 13: 25.4% 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 67.1%

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

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

                          Reproduce

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