Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.6% → 95.3%
Time: 8.0s
Alternatives: 16
Speedup: 0.3×

Specification

?
\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 80.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 95.3% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, 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. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 88.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 95.3% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, 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. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.1% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.80000000000000004e-27 or 9.5000000000000008e31 < a

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.80000000000000004e-27 < a < -4.50000000000000024e-192

    1. Initial program 72.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6469.0

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

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

    if -4.50000000000000024e-192 < a < 9.5000000000000008e31

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 64.7% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.80000000000000004e-27 or 1.05e32 < a

    1. Initial program 88.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{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. *-commutativeN/A

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

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

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

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

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

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

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

    if -4.80000000000000004e-27 < a < -4.50000000000000024e-192

    1. Initial program 72.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6469.0

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

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

    if -4.50000000000000024e-192 < a < 1.05e32

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

Alternative 5: 60.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.4e-27

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4e-27 < a < -4.50000000000000024e-192

    1. Initial program 74.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6470.7

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

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

    if -4.50000000000000024e-192 < a < 3e48

    1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

    if 3e48 < a

    1. Initial program 85.6%

      \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6470.4

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

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

Alternative 6: 75.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+30} \lor \neg \left(z \leq 1.05 \cdot 10^{+34}\right):\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4499999999999999e30 or 1.05000000000000009e34 < z

    1. Initial program 60.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, 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. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4499999999999999e30 < z < 1.05000000000000009e34

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+30} \lor \neg \left(z \leq 1.05 \cdot 10^{+34}\right):\\
\;\;\;\;\mathsf{fma}\left(-\left(t - x\right), \frac{y - a}{z}, t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4499999999999999e30 or 1.05000000000000009e34 < z

    1. Initial program 60.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{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. distribute-rgt-out--N/A

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

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

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

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

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

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

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

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

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

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

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

    if -1.4499999999999999e30 < z < 1.05000000000000009e34

    1. Initial program 91.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 61.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.4e-27

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4e-27 < a < 6.9999999999999993e-24

    1. Initial program 64.4%

      \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6454.6

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

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

    if 6.9999999999999993e-24 < a

    1. Initial program 85.9%

      \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6467.1

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

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

Alternative 9: 57.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+52} \lor \neg \left(z \leq 1.4 \cdot 10^{+124}\right):\\
\;\;\;\;\frac{t}{x} \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.9e52 or 1.4e124 < z

    1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{x} \cdot x \]

      if -2.9e52 < z < 1.4e124

      1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 56.8% accurate, 0.9× speedup?

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

      1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{t}{x} \cdot x \]

        if -2.9e52 < z < 1.4e124

        1. Initial program 90.6%

          \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6471.5

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

          \[\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 -2.9 \cdot 10^{+52} \lor \neg \left(z \leq 1.4 \cdot 10^{+124}\right):\\ \;\;\;\;\frac{t}{x} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \end{array} \]
      12. Add Preprocessing

      Alternative 11: 50.3% accurate, 0.9× speedup?

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

        1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{t}{x} \cdot x \]

          if -2.9e52 < z < 7.59999999999999989e123

          1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+52} \lor \neg \left(z \leq 7.6 \cdot 10^{+123}\right):\\ \;\;\;\;\frac{t}{x} \cdot x\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
            6. Add Preprocessing

            Alternative 12: 34.4% accurate, 0.9× speedup?

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

              1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{t}{x} \cdot x \]

                if -3.6000000000000001e-39 < z < 2.49999999999999994e122

                1. Initial program 90.6%

                  \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6458.4

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{-39} \lor \neg \left(z \leq 2.5 \cdot 10^{+122}\right):\\ \;\;\;\;\frac{t}{x} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \]
                10. Add Preprocessing

                Alternative 13: 23.4% accurate, 1.0× speedup?

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

                  1. Initial program 81.6%

                    \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6427.4

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

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

                  if -3.50000000000000025e-198 < t < 4.70000000000000003e-94

                  1. Initial program 65.1%

                    \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6449.3

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

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

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

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

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

                        \[\leadsto \frac{x \cdot y}{z} \]
                    4. Recombined 2 regimes into one program.
                    5. Final simplification28.8%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{-198} \lor \neg \left(t \leq 4.7 \cdot 10^{-94}\right):\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array} \]
                    6. Add Preprocessing

                    Alternative 14: 23.7% accurate, 1.0× speedup?

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

                      1. Initial program 80.4%

                        \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6428.6

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

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

                      if -3.50000000000000025e-198 < t < 5.79999999999999973e-102

                      1. Initial program 65.8%

                        \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6450.4

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

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

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

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

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

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

                          if 5.79999999999999973e-102 < t

                          1. Initial program 81.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{t}{x} \cdot x \]
                          10. Recombined 3 regimes into one program.
                          11. Final simplification30.4%

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

                          Alternative 15: 19.1% accurate, 4.1× speedup?

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

                            \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6420.3

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

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

                          Alternative 16: 2.8% accurate, 4.8× speedup?

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

                            \[x + \left(y - z\right) \cdot \frac{t - x}{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--.f6420.3

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

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

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

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

                            Reproduce

                            ?
                            herbie shell --seed 2024326 
                            (FPCore (x y z t a)
                              :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
                              :precision binary64
                              (+ x (* (- y z) (/ (- t x) (- a z)))))