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

Percentage Accurate: 67.1% → 88.8%
Time: 11.6s
Alternatives: 16
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 88.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+103}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.30000000000000009e103

    1. Initial program 28.5%

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

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

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

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

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

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

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

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

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

      \[\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. 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. mul-1-negN/A

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. 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)} \]
      8. associate-/l*N/A

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

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

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

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

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

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

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

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

    if -3.30000000000000009e103 < z < 1.44999999999999987e136

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

    if 1.44999999999999987e136 < z

    1. Initial program 28.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. 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)} \]
    5. Applied rewrites85.0%

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

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

Alternative 2: 73.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+102}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.4999999999999999e102

    1. Initial program 28.5%

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

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

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

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

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

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

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

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

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

      \[\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. 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. mul-1-negN/A

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. 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)} \]
      8. associate-/l*N/A

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

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

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

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

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

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

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

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

    if -1.4999999999999999e102 < z < -6.2999999999999997e-117

    1. Initial program 82.7%

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

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

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

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

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

    if -6.2999999999999997e-117 < z < 1.41999999999999998e135

    1. Initial program 90.6%

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

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

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

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

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

    if 1.41999999999999998e135 < z

    1. Initial program 28.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. 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)} \]
    5. Applied rewrites85.0%

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

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

Alternative 3: 72.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+84}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.6999999999999999e84

    1. Initial program 28.6%

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

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

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

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

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

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

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

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

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

      \[\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. 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. mul-1-negN/A

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      7. 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)} \]
      8. associate-/l*N/A

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

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

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

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

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

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

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

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

    if -1.6999999999999999e84 < z < 1.41999999999999998e135

    1. Initial program 89.8%

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

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

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

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

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

    if 1.41999999999999998e135 < z

    1. Initial program 28.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right)} + t \]
      6. 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)} \]
    5. Applied rewrites85.0%

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

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

Alternative 4: 72.3% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.9999999999999997e99 or 1.41999999999999998e135 < z

    1. Initial program 28.3%

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

      \[\leadsto \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)} \]
    5. Applied rewrites86.4%

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

    if -7.9999999999999997e99 < z < 1.41999999999999998e135

    1. Initial program 88.4%

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

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

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

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

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

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

Alternative 5: 69.0% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.9999999999999997e99 or 1.41999999999999998e135 < z

    1. Initial program 28.3%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{y - z}{z}\right), x\right) \]
      7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-1 \cdot x, \frac{\color{blue}{z - y}}{z}, x\right) \]
    7. Step-by-step derivation
      1. Applied rewrites10.3%

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

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

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

        if -7.9999999999999997e99 < z < 1.41999999999999998e135

        1. Initial program 88.4%

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

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

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

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

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

      Alternative 6: 68.9% accurate, 0.9× speedup?

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

        1. Initial program 37.2%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{y - z}{z}\right), x\right) \]
          7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -7.9999999999999997e99 < z < 2.19999999999999986e28

            1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 67.8% accurate, 0.9× speedup?

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

            1. Initial program 37.2%

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{y - z}{z}\right), x\right) \]
              7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -7.9999999999999997e99 < z < 2.19999999999999986e28

                1. Initial program 89.9%

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

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

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

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

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

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

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

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

              Alternative 8: 62.9% accurate, 0.9× speedup?

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

                1. Initial program 74.1%

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{z}{a - z}\right), x\right) \]
                  8. distribute-neg-frac2N/A

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

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

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

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

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

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

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

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

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

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

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

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

                    if -2.8999999999999998e69 < a < 4.3499999999999998e99

                    1. Initial program 67.5%

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{y - z}{z}\right), x\right) \]
                      7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 9: 61.9% accurate, 0.9× speedup?

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

                        1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot x}, \frac{y}{a}, x\right) \]
                        9. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(x\right)}, \frac{y}{a}, x\right) \]
                          2. lower-neg.f6455.8

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

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

                        if -2.54999999999999999e69 < a < 2.5000000000000001e-4

                        1. Initial program 68.2%

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{y - z}{z}\right), x\right) \]
                          7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(-1 \cdot x, \frac{\color{blue}{z - y}}{z}, x\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites19.0%

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

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

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

                          Alternative 10: 55.5% accurate, 0.9× speedup?

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

                            1. Initial program 36.5%

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{y - z}{z}\right), x\right) \]
                              7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -2.59999999999999992e81 < z < 2.19999999999999986e28

                                  1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot x}, \frac{y}{a}, x\right) \]
                                  9. Step-by-step derivation
                                    1. mul-1-negN/A

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(x\right)}, \frac{y}{a}, x\right) \]
                                    2. lower-neg.f6455.8

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

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

                                Alternative 11: 51.7% accurate, 1.0× speedup?

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

                                  1. Initial program 71.9%

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{z}{a - z}\right), x\right) \]
                                    8. distribute-neg-frac2N/A

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(t - x, \frac{z}{\color{blue}{z + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
                                    15. lower-neg.f6467.5

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

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

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

                                      \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot z}{z - a}} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites49.6%

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

                                        \[\leadsto x + \frac{x \cdot z}{\color{blue}{a}} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites49.0%

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

                                        if -2.8999999999999998e69 < a < 2.59999999999999977e-4

                                        1. Initial program 68.2%

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{y - z}{z}\right), x\right) \]
                                          7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(-1 \cdot x, \frac{\color{blue}{z - y}}{z}, x\right) \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites19.0%

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

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

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

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

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

                                            Alternative 12: 26.7% accurate, 1.0× speedup?

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

                                              1. Initial program 61.6%

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{y - z}{z}\right), x\right) \]
                                                7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if -3.80000000000000004e40 < x < 1.7500000000000001e-62

                                                  1. Initial program 80.8%

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

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

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

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

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

                                                Alternative 13: 26.4% accurate, 1.0× speedup?

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

                                                  1. Initial program 61.6%

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{y - z}{z}\right), x\right) \]
                                                    7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if -3.80000000000000004e40 < x < 1.7500000000000001e-62

                                                      1. Initial program 80.8%

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

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

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

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

                                                    Alternative 14: 40.2% accurate, 1.6× speedup?

                                                    \[\begin{array}{l} \\ \mathsf{fma}\left(y, \frac{x}{z}, t\right) \end{array} \]
                                                    (FPCore (x y z t a) :precision binary64 (fma y (/ x z) t))
                                                    double code(double x, double y, double z, double t, double a) {
                                                    	return fma(y, (x / z), t);
                                                    }
                                                    
                                                    function code(x, y, z, t, a)
                                                    	return fma(y, Float64(x / z), t)
                                                    end
                                                    
                                                    code[x_, y_, z_, t_, a_] := N[(y * N[(x / z), $MachinePrecision] + t), $MachinePrecision]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \mathsf{fma}\left(y, \frac{x}{z}, t\right)
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Initial program 69.9%

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

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

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

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

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{y - z}{z}\right), x\right) \]
                                                      7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(-1 \cdot x, \frac{\color{blue}{z - y}}{z}, x\right) \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites13.3%

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

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

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

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

                                                            \[\leadsto \mathsf{fma}\left(y, \frac{x}{z}, t\right) \]
                                                          2. Add Preprocessing

                                                          Alternative 15: 19.3% 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 69.9%

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

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

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

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

                                                          Alternative 16: 2.8% accurate, 29.0× speedup?

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \mathsf{neg}\left(\frac{z}{a - z}\right), x\right) \]
                                                            8. distribute-neg-frac2N/A

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

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

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

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

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

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

                                                              \[\leadsto \mathsf{fma}\left(t - x, \frac{z}{\color{blue}{z + \left(\mathsf{neg}\left(a\right)\right)}}, x\right) \]
                                                            15. lower-neg.f6447.4

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

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

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

                                                              \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot z}{z - a}} \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites28.8%

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

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

                                                                  \[\leadsto 0 \]
                                                                2. Add Preprocessing

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

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

                                                                Reproduce

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