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

Percentage Accurate: 68.6% → 77.9%
Time: 9.0s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 68.6% 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: 77.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.000122 \lor \neg \left(a \leq 4.6 \cdot 10^{+31}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, \frac{t}{x} - 1, 1\right) \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.21999999999999997e-4 or 4.5999999999999999e31 < a

    1. Initial program 73.5%

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

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

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

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

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

    if -1.21999999999999997e-4 < a < 4.5999999999999999e31

    1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 42.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq -2.5 \cdot 10^{+49} \lor \neg \left(a \leq 3.1 \cdot 10^{+42}\right):\\
\;\;\;\;\frac{t - x}{a} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.3e141

    1. Initial program 80.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--.f6483.0

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

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

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

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

      if -1.3e141 < a < -2.5000000000000002e49 or 3.1000000000000002e42 < a

      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 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--.f6484.1

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

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

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

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

        if -2.5000000000000002e49 < a < 3.1000000000000002e42

        1. Initial program 58.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{+141}:\\ \;\;\;\;\frac{t \cdot \left(y - z\right)}{a}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{+49} \lor \neg \left(a \leq 3.1 \cdot 10^{+42}\right):\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, t\right)\\ \end{array} \]
          6. Add Preprocessing

          Alternative 3: 75.7% accurate, 0.8× speedup?

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

            1. Initial program 73.5%

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

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

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

            if -1.45e-4 < a < 3e32

            1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 4: 72.8% accurate, 0.8× speedup?

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

            1. Initial program 73.5%

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

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

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

            if -1.21999999999999997e-4 < a < 2.6000000000000002e32

            1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{x - t}{z}, \color{blue}{y}, t\right) \]
            11. Recombined 2 regimes into one program.
            12. Final simplification83.8%

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

            Alternative 5: 69.0% accurate, 0.9× speedup?

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

              1. Initial program 73.5%

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

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

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

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

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

                if -2.02000000000000004e-4 < a < 1.35000000000000001e35

                1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 6: 63.1% accurate, 0.9× speedup?

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

                  1. Initial program 73.5%

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

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

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

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

                      \[\leadsto x + \frac{\color{blue}{\left(t - x\right) \cdot y}}{a} \]
                    4. lower--.f6462.5

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

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

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

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

                    if -2.02000000000000004e-4 < a < 1.49999999999999995e35

                    1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 7: 68.7% accurate, 0.9× speedup?

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

                      1. Initial program 78.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--.f6483.2

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

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

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

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

                        if -2.02000000000000004e-4 < a < 2.6000000000000002e32

                        1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 2.6000000000000002e32 < a

                          1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

                        Alternative 8: 56.3% accurate, 0.9× speedup?

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

                          1. Initial program 73.5%

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

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

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

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

                              \[\leadsto x + \frac{\color{blue}{\left(t - x\right) \cdot y}}{a} \]
                            4. lower--.f6462.5

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

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

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

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

                            if -1.9000000000000001e-4 < a < 1.49999999999999995e35

                            1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 9: 49.1% accurate, 0.9× speedup?

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

                                1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -5.50000000000000021e22 < z < 2.50000000000000014e-129

                                    1. Initial program 86.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 10: 48.5% accurate, 0.9× speedup?

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

                                      1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -5.50000000000000021e22 < z < 2.50000000000000014e-129

                                          1. Initial program 86.0%

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

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

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

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

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

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

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

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

                                          Alternative 11: 26.8% accurate, 1.0× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.45 \cdot 10^{-38} \lor \neg \left(x \leq 1.9 \cdot 10^{+45}\right):\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right)\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a)
                                           :precision binary64
                                           (if (or (<= x -1.45e-38) (not (<= x 1.9e+45))) (* x (/ y z)) (+ x (- t x))))
                                          double code(double x, double y, double z, double t, double a) {
                                          	double tmp;
                                          	if ((x <= -1.45e-38) || !(x <= 1.9e+45)) {
                                          		tmp = x * (y / z);
                                          	} else {
                                          		tmp = x + (t - x);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          real(8) function code(x, y, z, t, a)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              real(8), intent (in) :: z
                                              real(8), intent (in) :: t
                                              real(8), intent (in) :: a
                                              real(8) :: tmp
                                              if ((x <= (-1.45d-38)) .or. (.not. (x <= 1.9d+45))) then
                                                  tmp = x * (y / z)
                                              else
                                                  tmp = x + (t - x)
                                              end if
                                              code = tmp
                                          end function
                                          
                                          public static double code(double x, double y, double z, double t, double a) {
                                          	double tmp;
                                          	if ((x <= -1.45e-38) || !(x <= 1.9e+45)) {
                                          		tmp = x * (y / z);
                                          	} else {
                                          		tmp = x + (t - x);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x, y, z, t, a):
                                          	tmp = 0
                                          	if (x <= -1.45e-38) or not (x <= 1.9e+45):
                                          		tmp = x * (y / z)
                                          	else:
                                          		tmp = x + (t - x)
                                          	return tmp
                                          
                                          function code(x, y, z, t, a)
                                          	tmp = 0.0
                                          	if ((x <= -1.45e-38) || !(x <= 1.9e+45))
                                          		tmp = Float64(x * Float64(y / z));
                                          	else
                                          		tmp = Float64(x + Float64(t - x));
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(x, y, z, t, a)
                                          	tmp = 0.0;
                                          	if ((x <= -1.45e-38) || ~((x <= 1.9e+45)))
                                          		tmp = x * (y / z);
                                          	else
                                          		tmp = x + (t - x);
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.45e-38], N[Not[LessEqual[x, 1.9e+45]], $MachinePrecision]], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;x \leq -1.45 \cdot 10^{-38} \lor \neg \left(x \leq 1.9 \cdot 10^{+45}\right):\\
                                          \;\;\;\;x \cdot \frac{y}{z}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;x + \left(t - x\right)\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if x < -1.44999999999999997e-38 or 1.9000000000000001e45 < x

                                            1. Initial program 54.7%

                                              \[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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                            4. Applied rewrites34.1%

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

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

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

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

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

                                                if -1.44999999999999997e-38 < x < 1.9000000000000001e45

                                                1. Initial program 75.2%

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

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

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

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

                                              Alternative 12: 40.4% accurate, 1.1× speedup?

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

                                                1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if 1.8999999999999998e103 < y

                                                    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \frac{x - t}{z} \cdot \color{blue}{y} \]
                                                    11. Recombined 2 regimes into one program.
                                                    12. Add Preprocessing

                                                    Alternative 13: 39.1% accurate, 1.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 14: 18.5% 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 65.0%

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

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

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

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

                                                        Alternative 15: 2.8% accurate, 4.8× speedup?

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

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

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

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

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

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

                                                            \[\leadsto x + \left(-x\right) \]
                                                          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 2024329 
                                                          (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))))