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

Percentage Accurate: 68.0% → 91.4%
Time: 4.3s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 68.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 91.4% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, t, x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

    1. Initial program 5.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 rewrites98.9%

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

      \[\leadsto -1 \cdot \left(x \cdot \left(\frac{a}{z} - \frac{y}{z}\right)\right) + t \]
    6. Step-by-step derivation
      1. 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--.f6499.0

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

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

Alternative 2: 89.1% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+298}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999996e-300 or 9.9999999999999996e297 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 63.0%

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

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

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

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

    1. Initial program 5.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 rewrites98.9%

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

      \[\leadsto -1 \cdot \left(x \cdot \left(\frac{a}{z} - \frac{y}{z}\right)\right) + t \]
    6. Step-by-step derivation
      1. 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--.f6499.0

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

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

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

    1. Initial program 96.9%

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

Alternative 3: 87.1% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 72.9%

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

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

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

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

    1. Initial program 5.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 rewrites98.9%

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

      \[\leadsto -1 \cdot \left(x \cdot \left(\frac{a}{z} - \frac{y}{z}\right)\right) + t \]
    6. Step-by-step derivation
      1. 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--.f6499.0

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

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

Alternative 4: 74.7% 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 -3.5 \cdot 10^{+110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-112}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)\\ \mathbf{elif}\;z \leq 4.2:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, 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 -3.5e+110)
     t_1
     (if (<= z -1.65e-112)
       (fma (/ (- y z) (- a z)) t x)
       (if (<= z 4.2) (fma (- t x) (/ (- y z) a) 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 <= -3.5e+110) {
		tmp = t_1;
	} else if (z <= -1.65e-112) {
		tmp = fma(((y - z) / (a - z)), t, x);
	} else if (z <= 4.2) {
		tmp = fma((t - x), ((y - z) / a), 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 <= -3.5e+110)
		tmp = t_1;
	elseif (z <= -1.65e-112)
		tmp = fma(Float64(Float64(y - z) / Float64(a - z)), t, x);
	elseif (z <= 4.2)
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), 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, -3.5e+110], t$95$1, If[LessEqual[z, -1.65e-112], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t + x), $MachinePrecision], If[LessEqual[z, 4.2], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $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 -3.5 \cdot 10^{+110}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.4999999999999999e110 or 4.20000000000000018 < z

    1. Initial program 40.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 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--.f6470.3

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

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

    if -3.4999999999999999e110 < z < -1.65e-112

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, t, x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)\right) \]
      10. *-commutativeN/A

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, t, \frac{y}{z} \cdot x\right) \]
    6. Step-by-step derivation
      1. lower-/.f6460.7

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

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

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

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

      if -1.65e-112 < z < 4.20000000000000018

      1. Initial program 90.6%

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

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

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

    Alternative 5: 69.8% accurate, 0.7× speedup?

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

      1. Initial program 45.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.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 \frac{x \cdot \left(y - a\right)}{z} + t \]
      6. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

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

      if -0.016 < z < -1.65e-112

      1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, t, x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)\right) \]
        10. *-commutativeN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, t, \frac{y}{z} \cdot x\right) \]
      6. Step-by-step derivation
        1. lower-/.f6454.7

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

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

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

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

        if -1.65e-112 < z < 4.20000000000000018

        1. Initial program 90.6%

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

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

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

      Alternative 6: 68.7% accurate, 0.7× speedup?

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

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

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

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

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

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

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

        if -1.45000000000000007e91 < z < -1.70000000000000003e-60

        1. Initial program 77.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 rewrites56.4%

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

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

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

        if -1.70000000000000003e-60 < z < 4.20000000000000018

        1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

      Alternative 7: 66.4% accurate, 0.7× speedup?

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

        1. Initial program 42.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 rewrites61.3%

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

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

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

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

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

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

        if -1.45000000000000007e91 < z < -1.70000000000000003e-60

        1. Initial program 77.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 rewrites56.4%

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

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

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

        if -1.70000000000000003e-60 < z < 4.0999999999999999e-12

        1. Initial program 90.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--.f6476.1

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

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

      Alternative 8: 65.4% accurate, 0.9× speedup?

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

        1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto t - \frac{y \cdot \left(t - x\right)}{\color{blue}{z}} \]
          2. 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--.f6456.9

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

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

        if -1.70000000000000003e-60 < z < 7.5e-12

        1. Initial program 90.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--.f6476.1

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

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

      Alternative 9: 64.8% accurate, 0.9× speedup?

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

        1. Initial program 49.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 rewrites60.9%

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

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

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

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

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

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

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

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

          if -2.99999999999999981e-31 < z < 6.60000000000000053e30

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

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

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

          if 6.60000000000000053e30 < z

          1. Initial program 41.2%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, t, x \cdot \left(1 + -1 \cdot \frac{y - z}{a - z}\right)\right) \]
            10. *-commutativeN/A

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, t, \frac{y}{z} \cdot x\right) \]
          6. Step-by-step derivation
            1. lower-/.f6476.9

              \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, t, \frac{y}{z} \cdot x\right) \]
          7. Applied rewrites76.9%

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

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

              \[\leadsto \mathsf{fma}\left(1, t, \frac{y}{z} \cdot x\right) \]
          10. Recombined 3 regimes into one program.
          11. Add Preprocessing

          Alternative 10: 63.6% accurate, 0.9× speedup?

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

            1. Initial program 45.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.3%

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

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

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

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

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

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

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

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

              if -2.99999999999999981e-31 < z < 6.60000000000000053e30

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

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

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

            Alternative 11: 55.3% accurate, 1.0× speedup?

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

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

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

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

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

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

                if -2.5000000000000001e75 < a < 1.5e-11

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

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

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

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

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

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

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

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

                  if 1.5e-11 < a

                  1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\frac{-\left(y - z\right)}{a - z} + 1\right) \cdot x \]
                    10. lift--.f6452.7

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

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

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

                      \[\leadsto \left(1 - \frac{y}{a}\right) \cdot x \]
                    2. lower-/.f6449.9

                      \[\leadsto \left(1 - \frac{y}{a}\right) \cdot x \]
                  7. Applied rewrites49.9%

                    \[\leadsto \left(1 - \frac{y}{a}\right) \cdot x \]
                10. Recombined 3 regimes into one program.
                11. Add Preprocessing

                Alternative 12: 55.0% accurate, 1.0× speedup?

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

                  1. Initial program 49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto t \cdot \left(1 - \frac{y}{z}\right) \]
                    3. lift-/.f6450.0

                      \[\leadsto t \cdot \left(1 - \frac{y}{z}\right) \]
                  10. Applied rewrites50.0%

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

                  if -8.6000000000000007e-61 < z < 7.49999999999999934e-5

                  1. Initial program 90.3%

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

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

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

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

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

                  Alternative 13: 51.2% accurate, 1.1× speedup?

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

                    1. Initial program 43.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 rewrites43.3%

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

                      if -0.042999999999999997 < z < 1.98e31

                      1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

                      Alternative 14: 37.7% accurate, 2.1× speedup?

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

                        1. Initial program 68.4%

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

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

                          if -1.7000000000000001e87 < a < 1.5e-11

                          1. Initial program 67.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 rewrites32.9%

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

                          Alternative 15: 25.0% accurate, 17.9× speedup?

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

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

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

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

                            Reproduce

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