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

Percentage Accurate: 67.5% → 89.4%
Time: 10.9s
Alternatives: 17
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 67.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
    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: 89.4% accurate, 0.3× speedup?

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

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

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

\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.99999999999999998e-244 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 74.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

    1. Initial program 7.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - x}{a \cdot a - z \cdot z}}, \left(a + z\right) \cdot \left(y - z\right), x\right) \]
      13. difference-of-squaresN/A

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t - x}{\left(a + z\right) \cdot \left(a - z\right)}, \left(a + z\right) \cdot \left(y - z\right), x\right)} \]
    5. 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}} \]
    6. Step-by-step derivation
      1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.5% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.79999999999999987e63 or 2.40000000000000013e-54 < z

    1. Initial program 48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.79999999999999987e63 < z < -2.7999999999999999e-137

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

    if -2.7999999999999999e-137 < z < 2.40000000000000013e-54

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+63}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(t, -1, x\right)}{z}, y - a, t\right)\\ \mathbf{elif}\;z \leq -2.8 \cdot 10^{-137}:\\ \;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right) + x\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-54}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(t, -1, x\right)}{z}, y - a, t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 66.4% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.44999999999999997e-38 or 4.5e51 < a

    1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

    if -1.44999999999999997e-38 < a < 6.4999999999999994e-61

    1. Initial program 71.4%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\mathsf{fma}\left(t - x, \color{blue}{-z}, \left(t - x\right) \cdot y\right)}{a - z} \]
      9. lower-*.f6471.4

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

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

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

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

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

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

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

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

        \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot y}}{z} \]
      7. lower--.f6477.9

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

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

    if 6.4999999999999994e-61 < a < 4.5e51

    1. Initial program 85.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - x}{a \cdot a - z \cdot z}}, \left(a + z\right) \cdot \left(y - z\right), x\right) \]
      13. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(y - z\right)} \cdot t}{a - z} \]
      7. lower--.f6473.9

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

      \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot t}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{-38}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-61}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot y}{z}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+51}:\\ \;\;\;\;\frac{\left(z - y\right) \cdot t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.6% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -1.95 \cdot 10^{-305}:\\
\;\;\;\;\frac{z - y}{z} \cdot t\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.0199999999999999e-44 or 1.7e11 < a

    1. Initial program 65.2%

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

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

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

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

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

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

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

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

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

    if -1.0199999999999999e-44 < a < -1.95000000000000013e-305

    1. Initial program 74.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing
    3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - x}{a \cdot a - z \cdot z}}, \left(a + z\right) \cdot \left(y - z\right), x\right) \]
      13. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(y - z\right)} \cdot t}{a - z} \]
      7. lower--.f6460.0

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

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

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

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

      if -1.95000000000000013e-305 < a < 1.7e11

      1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
    10. Recombined 3 regimes into one program.
    11. Final simplification64.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{-44}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \mathbf{elif}\;a \leq -1.95 \cdot 10^{-305}:\\ \;\;\;\;\frac{z - y}{z} \cdot t\\ \mathbf{elif}\;a \leq 170000000000:\\ \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \end{array} \]
    12. Add Preprocessing

    Alternative 5: 70.9% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z - a} \cdot \left(x - t\right)\\ \mathbf{if}\;y \leq -1.85 \cdot 10^{+120}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+91}:\\ \;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right) + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (* (/ y (- z a)) (- x t))))
       (if (<= y -1.85e+120)
         t_1
         (if (<= y 6.8e+91) (+ (* (/ t (- z a)) (- z y)) x) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (y / (z - a)) * (x - t);
    	double tmp;
    	if (y <= -1.85e+120) {
    		tmp = t_1;
    	} else if (y <= 6.8e+91) {
    		tmp = ((t / (z - a)) * (z - y)) + x;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t, a)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: t_1
        real(8) :: tmp
        t_1 = (y / (z - a)) * (x - t)
        if (y <= (-1.85d+120)) then
            tmp = t_1
        else if (y <= 6.8d+91) then
            tmp = ((t / (z - a)) * (z - y)) + x
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double t_1 = (y / (z - a)) * (x - t);
    	double tmp;
    	if (y <= -1.85e+120) {
    		tmp = t_1;
    	} else if (y <= 6.8e+91) {
    		tmp = ((t / (z - a)) * (z - y)) + x;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = (y / (z - a)) * (x - t)
    	tmp = 0
    	if y <= -1.85e+120:
    		tmp = t_1
    	elif y <= 6.8e+91:
    		tmp = ((t / (z - a)) * (z - y)) + x
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(y / Float64(z - a)) * Float64(x - t))
    	tmp = 0.0
    	if (y <= -1.85e+120)
    		tmp = t_1;
    	elseif (y <= 6.8e+91)
    		tmp = Float64(Float64(Float64(t / Float64(z - a)) * Float64(z - y)) + x);
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	t_1 = (y / (z - a)) * (x - t);
    	tmp = 0.0;
    	if (y <= -1.85e+120)
    		tmp = t_1;
    	elseif (y <= 6.8e+91)
    		tmp = ((t / (z - a)) * (z - y)) + x;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.85e+120], t$95$1, If[LessEqual[y, 6.8e+91], N[(N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{y}{z - a} \cdot \left(x - t\right)\\
    \mathbf{if}\;y \leq -1.85 \cdot 10^{+120}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y \leq 6.8 \cdot 10^{+91}:\\
    \;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right) + x\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < -1.85000000000000012e120 or 6.8000000000000002e91 < y

      1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

      if -1.85000000000000012e120 < y < 6.8000000000000002e91

      1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.85 \cdot 10^{+120}:\\ \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+91}:\\ \;\;\;\;\frac{t}{z - a} \cdot \left(z - y\right) + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 73.0% accurate, 0.8× speedup?

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

      1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

      if -1.05999999999999994e27 < a < 1.8e-25

      1. Initial program 70.5%

        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
      2. Add Preprocessing
      3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - x}{a \cdot a - z \cdot z}}, \left(a + z\right) \cdot \left(y - z\right), x\right) \]
        13. difference-of-squaresN/A

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t - x}{\left(a + z\right) \cdot \left(a - z\right)}, \left(a + z\right) \cdot \left(y - z\right), x\right)} \]
      5. 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}} \]
      6. Step-by-step derivation
        1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.06 \cdot 10^{+27}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-25}:\\ \;\;\;\;t - \frac{\left(a - y\right) \cdot \left(x - t\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a}, t - x, x\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 7: 71.7% accurate, 0.8× speedup?

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

      1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

      if -1.30000000000000005e-38 < a < 1.8e-25

      1. Initial program 71.2%

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{\mathsf{fma}\left(t - x, \color{blue}{-z}, \left(t - x\right) \cdot y\right)}{a - z} \]
        9. lower-*.f6471.3

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

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

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

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

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

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

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

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

          \[\leadsto t - \frac{\color{blue}{\left(t - x\right) \cdot y}}{z} \]
        7. lower--.f6476.5

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

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

    Alternative 8: 66.9% accurate, 0.8× speedup?

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

      1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

      if -1.44999999999999997e-38 < a < 3.5000000000000002e23

      1. Initial program 73.5%

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{\mathsf{fma}\left(t - x, \color{blue}{-z}, \left(t - x\right) \cdot y\right)}{a - z} \]
        9. lower-*.f6473.5

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 60.0% accurate, 0.8× speedup?

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

      1. Initial program 68.4%

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

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

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

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

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

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

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

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

          \[\leadsto \left(y - z\right) \cdot \color{blue}{\frac{t}{a - z}} \]
        8. lower--.f6472.2

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

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

      if -1.5999999999999999e-10 < t < 4.80000000000000026e-54

      1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 61.5% accurate, 0.9× speedup?

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

      1. Initial program 34.4%

        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
      2. Add Preprocessing
      3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - x}{a \cdot a - z \cdot z}}, \left(a + z\right) \cdot \left(y - z\right), x\right) \]
        13. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\left(y - z\right)} \cdot t}{a - z} \]
        7. lower--.f6430.8

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

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

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

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

        if -1.3499999999999999e57 < z < 5.5000000000000003e81

        1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

        if 5.5000000000000003e81 < z

        1. Initial program 45.1%

          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
        2. Add Preprocessing
        3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - x}{a \cdot a - z \cdot z}}, \left(a + z\right) \cdot \left(y - z\right), x\right) \]
          13. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\color{blue}{\left(y - z\right)} \cdot t}{a - z} \]
          7. lower--.f6444.1

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

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

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

            \[\leadsto \left(-t\right) \cdot \color{blue}{\frac{z}{a - z}} \]
        10. Recombined 3 regimes into one program.
        11. Final simplification61.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+57}:\\ \;\;\;\;\frac{z - y}{z} \cdot t\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+81}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{z - a} \cdot t\\ \end{array} \]
        12. Add Preprocessing

        Alternative 11: 59.9% accurate, 0.9× speedup?

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

          1. Initial program 37.6%

            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
          2. Add Preprocessing
          3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - x}{a \cdot a - z \cdot z}}, \left(a + z\right) \cdot \left(y - z\right), x\right) \]
            13. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\left(y - z\right)} \cdot t}{a - z} \]
            7. lower--.f6436.6

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

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

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

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

            if -9.0000000000000004e172 < z < 5.5000000000000003e81

            1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{+172}:\\ \;\;\;\;\frac{z}{z - a} \cdot t\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+81}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{z - a} \cdot t\\ \end{array} \]
          12. Add Preprocessing

          Alternative 12: 53.8% accurate, 0.9× speedup?

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

            1. Initial program 28.6%

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

              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
            4. Step-by-step derivation
              1. lower--.f6455.4

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

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

            if -1.70000000000000011e173 < z < 4.7999999999999998e197

            1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+173}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+197}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) + x\\ \end{array} \]
          5. Add Preprocessing

          Alternative 13: 46.2% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) + x\\ \mathbf{if}\;z \leq -1.7 \cdot 10^{+173}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+210}:\\ \;\;\;\;\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 x) x)))
             (if (<= z -1.7e+173) t_1 (if (<= z 4.5e+210) (fma y (/ t a) x) t_1))))
          double code(double x, double y, double z, double t, double a) {
          	double t_1 = (t - x) + x;
          	double tmp;
          	if (z <= -1.7e+173) {
          		tmp = t_1;
          	} else if (z <= 4.5e+210) {
          		tmp = fma(y, (t / a), x);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	t_1 = Float64(Float64(t - x) + x)
          	tmp = 0.0
          	if (z <= -1.7e+173)
          		tmp = t_1;
          	elseif (z <= 4.5e+210)
          		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[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -1.7e+173], t$95$1, If[LessEqual[z, 4.5e+210], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(t - x\right) + x\\
          \mathbf{if}\;z \leq -1.7 \cdot 10^{+173}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;z \leq 4.5 \cdot 10^{+210}:\\
          \;\;\;\;\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 < -1.70000000000000011e173 or 4.50000000000000004e210 < z

            1. Initial program 29.4%

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

              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
            4. Step-by-step derivation
              1. lower--.f6457.4

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

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

            if -1.70000000000000011e173 < z < 4.50000000000000004e210

            1. Initial program 78.9%

              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
            2. Add Preprocessing
            3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - x}{a \cdot a - z \cdot z}}, \left(a + z\right) \cdot \left(y - z\right), x\right) \]
              13. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{+173}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+210}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t - x\right) + x\\ \end{array} \]
            12. Add Preprocessing

            Alternative 14: 27.4% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z} \cdot x\\ \mathbf{if}\;y \leq -6.2 \cdot 10^{+82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+75}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (let* ((t_1 (* (/ y z) x)))
               (if (<= y -6.2e+82) t_1 (if (<= y 3.5e+75) (+ (- t x) x) t_1))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = (y / z) * x;
            	double tmp;
            	if (y <= -6.2e+82) {
            		tmp = t_1;
            	} else if (y <= 3.5e+75) {
            		tmp = (t - x) + x;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t, a)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8) :: t_1
                real(8) :: tmp
                t_1 = (y / z) * x
                if (y <= (-6.2d+82)) then
                    tmp = t_1
                else if (y <= 3.5d+75) then
                    tmp = (t - x) + x
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a) {
            	double t_1 = (y / z) * x;
            	double tmp;
            	if (y <= -6.2e+82) {
            		tmp = t_1;
            	} else if (y <= 3.5e+75) {
            		tmp = (t - x) + x;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a):
            	t_1 = (y / z) * x
            	tmp = 0
            	if y <= -6.2e+82:
            		tmp = t_1
            	elif y <= 3.5e+75:
            		tmp = (t - x) + x
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t, a)
            	t_1 = Float64(Float64(y / z) * x)
            	tmp = 0.0
            	if (y <= -6.2e+82)
            		tmp = t_1;
            	elseif (y <= 3.5e+75)
            		tmp = Float64(Float64(t - x) + x);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a)
            	t_1 = (y / z) * x;
            	tmp = 0.0;
            	if (y <= -6.2e+82)
            		tmp = t_1;
            	elseif (y <= 3.5e+75)
            		tmp = (t - x) + x;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -6.2e+82], t$95$1, If[LessEqual[y, 3.5e+75], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{y}{z} \cdot x\\
            \mathbf{if}\;y \leq -6.2 \cdot 10^{+82}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;y \leq 3.5 \cdot 10^{+75}:\\
            \;\;\;\;\left(t - x\right) + x\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -6.20000000000000065e82 or 3.4999999999999998e75 < y

              1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) + y\right)}\right), \frac{x}{a - z}, x\right) \]
                11. distribute-neg-inN/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}, \frac{x}{a - z}, x\right) \]
                12. unsub-negN/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y}, \frac{x}{a - z}, x\right) \]
                13. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

                    if -6.20000000000000065e82 < y < 3.4999999999999998e75

                    1. Initial program 68.6%

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

                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                    4. Step-by-step derivation
                      1. lower--.f6431.0

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

                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification33.3%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+82}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+75}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 15: 25.8% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{z} \cdot y\\ \mathbf{if}\;x \leq -5.8 \cdot 10^{-98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{+131}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (let* ((t_1 (* (/ x z) y)))
                     (if (<= x -5.8e-98) t_1 (if (<= x 8.5e+131) (+ (- t x) x) t_1))))
                  double code(double x, double y, double z, double t, double a) {
                  	double t_1 = (x / z) * y;
                  	double tmp;
                  	if (x <= -5.8e-98) {
                  		tmp = t_1;
                  	} else if (x <= 8.5e+131) {
                  		tmp = (t - x) + x;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x, y, z, t, a)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8) :: t_1
                      real(8) :: tmp
                      t_1 = (x / z) * y
                      if (x <= (-5.8d-98)) then
                          tmp = t_1
                      else if (x <= 8.5d+131) then
                          tmp = (t - x) + x
                      else
                          tmp = t_1
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a) {
                  	double t_1 = (x / z) * y;
                  	double tmp;
                  	if (x <= -5.8e-98) {
                  		tmp = t_1;
                  	} else if (x <= 8.5e+131) {
                  		tmp = (t - x) + x;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a):
                  	t_1 = (x / z) * y
                  	tmp = 0
                  	if x <= -5.8e-98:
                  		tmp = t_1
                  	elif x <= 8.5e+131:
                  		tmp = (t - x) + x
                  	else:
                  		tmp = t_1
                  	return tmp
                  
                  function code(x, y, z, t, a)
                  	t_1 = Float64(Float64(x / z) * y)
                  	tmp = 0.0
                  	if (x <= -5.8e-98)
                  		tmp = t_1;
                  	elseif (x <= 8.5e+131)
                  		tmp = Float64(Float64(t - x) + x);
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a)
                  	t_1 = (x / z) * y;
                  	tmp = 0.0;
                  	if (x <= -5.8e-98)
                  		tmp = t_1;
                  	elseif (x <= 8.5e+131)
                  		tmp = (t - x) + x;
                  	else
                  		tmp = t_1;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[x, -5.8e-98], t$95$1, If[LessEqual[x, 8.5e+131], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \frac{x}{z} \cdot y\\
                  \mathbf{if}\;x \leq -5.8 \cdot 10^{-98}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;x \leq 8.5 \cdot 10^{+131}:\\
                  \;\;\;\;\left(t - x\right) + x\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < -5.8e-98 or 8.50000000000000063e131 < x

                    1. Initial program 63.5%

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) + y\right)}\right), \frac{x}{a - z}, x\right) \]
                      11. distribute-neg-inN/A

                        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}, \frac{x}{a - z}, x\right) \]
                      12. unsub-negN/A

                        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y}, \frac{x}{a - z}, x\right) \]
                      13. remove-double-negN/A

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

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

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

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

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

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

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

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

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

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

                          if -5.8e-98 < x < 8.50000000000000063e131

                          1. Initial program 73.3%

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

                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                          4. Step-by-step derivation
                            1. lower--.f6430.4

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

                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                        3. Recombined 2 regimes into one program.
                        4. Final simplification32.5%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5.8 \cdot 10^{-98}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{+131}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 16: 19.4% accurate, 4.1× speedup?

                        \[\begin{array}{l} \\ \left(t - x\right) + x \end{array} \]
                        (FPCore (x y z t a) :precision binary64 (+ (- t x) x))
                        double code(double x, double y, double z, double t, double a) {
                        	return (t - x) + x;
                        }
                        
                        real(8) function code(x, y, z, t, a)
                            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 - x) + x
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a) {
                        	return (t - x) + x;
                        }
                        
                        def code(x, y, z, t, a):
                        	return (t - x) + x
                        
                        function code(x, y, z, t, a)
                        	return Float64(Float64(t - x) + x)
                        end
                        
                        function tmp = code(x, y, z, t, a)
                        	tmp = (t - x) + x;
                        end
                        
                        code[x_, y_, z_, t_, a_] := N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        \left(t - x\right) + x
                        \end{array}
                        
                        Derivation
                        1. Initial program 68.8%

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

                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                        4. Step-by-step derivation
                          1. lower--.f6421.6

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

                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                        6. Final simplification21.6%

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

                        Alternative 17: 2.7% accurate, 29.0× speedup?

                        \[\begin{array}{l} \\ 0 \end{array} \]
                        (FPCore (x y z t a) :precision binary64 0.0)
                        double code(double x, double y, double z, double t, double a) {
                        	return 0.0;
                        }
                        
                        real(8) function code(x, y, z, t, a)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8), intent (in) :: a
                            code = 0.0d0
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a) {
                        	return 0.0;
                        }
                        
                        def code(x, y, z, t, a):
                        	return 0.0
                        
                        function code(x, y, z, t, a)
                        	return 0.0
                        end
                        
                        function tmp = code(x, y, z, t, a)
                        	tmp = 0.0;
                        end
                        
                        code[x_, y_, z_, t_, a_] := 0.0
                        
                        \begin{array}{l}
                        
                        \\
                        0
                        \end{array}
                        
                        Derivation
                        1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) + y\right)}\right), \frac{x}{a - z}, x\right) \]
                          11. distribute-neg-inN/A

                            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}, \frac{x}{a - z}, x\right) \]
                          12. unsub-negN/A

                            \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(z\right)\right)\right)\right) - y}, \frac{x}{a - z}, x\right) \]
                          13. remove-double-negN/A

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

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

                            \[\leadsto \mathsf{fma}\left(z - y, \color{blue}{\frac{x}{a - z}}, x\right) \]
                          16. lower--.f6440.7

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

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

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

                            \[\leadsto 0 \]
                          2. Add Preprocessing

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

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (let* ((t_1 (- t (* (/ y z) (- t x)))))
                             (if (< z -1.2536131056095036e+188)
                               t_1
                               (if (< z 4.446702369113811e+64)
                                 (+ x (/ (- y z) (/ (- a z) (- t x))))
                                 t_1))))
                          double code(double x, double y, double z, double t, double a) {
                          	double t_1 = t - ((y / z) * (t - x));
                          	double tmp;
                          	if (z < -1.2536131056095036e+188) {
                          		tmp = t_1;
                          	} else if (z < 4.446702369113811e+64) {
                          		tmp = x + ((y - z) / ((a - z) / (t - x)));
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          real(8) function code(x, y, z, t, a)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8) :: t_1
                              real(8) :: tmp
                              t_1 = t - ((y / z) * (t - x))
                              if (z < (-1.2536131056095036d+188)) then
                                  tmp = t_1
                              else if (z < 4.446702369113811d+64) then
                                  tmp = x + ((y - z) / ((a - z) / (t - x)))
                              else
                                  tmp = t_1
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a) {
                          	double t_1 = t - ((y / z) * (t - x));
                          	double tmp;
                          	if (z < -1.2536131056095036e+188) {
                          		tmp = t_1;
                          	} else if (z < 4.446702369113811e+64) {
                          		tmp = x + ((y - z) / ((a - z) / (t - x)));
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	t_1 = t - ((y / z) * (t - x))
                          	tmp = 0
                          	if z < -1.2536131056095036e+188:
                          		tmp = t_1
                          	elif z < 4.446702369113811e+64:
                          		tmp = x + ((y - z) / ((a - z) / (t - x)))
                          	else:
                          		tmp = t_1
                          	return tmp
                          
                          function code(x, y, z, t, a)
                          	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
                          	tmp = 0.0
                          	if (z < -1.2536131056095036e+188)
                          		tmp = t_1;
                          	elseif (z < 4.446702369113811e+64)
                          		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
                          	else
                          		tmp = t_1;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a)
                          	t_1 = t - ((y / z) * (t - x));
                          	tmp = 0.0;
                          	if (z < -1.2536131056095036e+188)
                          		tmp = t_1;
                          	elseif (z < 4.446702369113811e+64)
                          		tmp = x + ((y - z) / ((a - z) / (t - x)));
                          	else
                          		tmp = t_1;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
                          \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
                          \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          

                          Reproduce

                          ?
                          herbie shell --seed 2024263 
                          (FPCore (x y z t a)
                            :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
                            :precision binary64
                          
                            :alt
                            (! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
                          
                            (+ x (/ (* (- y z) (- t x)) (- a z))))