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

Percentage Accurate: 68.5% → 91.1%
Time: 9.6s
Alternatives: 18
Speedup: 0.7×

Specification

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

\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\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 18 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 91.1% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.7% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 75.4%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 62.2% accurate, 0.5× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if a < -9.1999999999999995e-43

    1. Initial program 71.6%

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

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

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

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

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

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

    if -9.1999999999999995e-43 < a < -5.3999999999999999e-227

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

    if -5.3999999999999999e-227 < a < 3.7000000000000001e-205

    1. Initial program 69.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot \frac{z - t}{t}}, y - x, x\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

    if 3.7000000000000001e-205 < a < 3.7000000000000002e-28

    1. Initial program 74.5%

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

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

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

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

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

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

    if 3.7000000000000002e-28 < a < 2.6999999999999998e139

    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

    if 2.6999999999999998e139 < a

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.2 \cdot 10^{-43}:\\ \;\;\;\;x + \frac{\left(z - t\right) \cdot y}{a - t}\\ \mathbf{elif}\;a \leq -5.4 \cdot 10^{-227}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-205}:\\ \;\;\;\;\mathsf{fma}\left(\frac{-\left(z - t\right)}{t}, y - x, x\right)\\ \mathbf{elif}\;a \leq 3.7 \cdot 10^{-28}:\\ \;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a - t}\\ \mathbf{elif}\;a \leq 2.7 \cdot 10^{+139}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 42.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;x \leq 2.8 \cdot 10^{-299}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\

\mathbf{elif}\;x \leq 6.2 \cdot 10^{-212}:\\
\;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -2.4000000000000001e-163 or 5.8e17 < x

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

      if -2.4000000000000001e-163 < x < 2.8000000000000001e-299

      1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 2.8000000000000001e-299 < x < 6.20000000000000011e-212

        1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
        6. Step-by-step derivation
          1. Applied rewrites68.2%

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

          if 6.20000000000000011e-212 < x < 5.8e17

          1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{y}{a}, z, x\right) \]
          8. Recombined 4 regimes into one program.
          9. Final simplification52.4%

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

          Alternative 5: 60.6% accurate, 0.7× speedup?

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

            1. Initial program 71.6%

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

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

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

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

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

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

            if -9.1999999999999995e-43 < a < 1.65000000000000009e-9

            1. Initial program 70.3%

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

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

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

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

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

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

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

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

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

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

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

            if 1.65000000000000009e-9 < a < 2.6999999999999998e139

            1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

            if 2.6999999999999998e139 < a

            1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 62.6% accurate, 0.7× speedup?

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

            1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

            if -6.5999999999999998e24 < a < 1.65000000000000009e-9

            1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

            if 1.65000000000000009e-9 < a < 2.6999999999999998e139

            1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

            if 2.6999999999999998e139 < a

            1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 62.3% accurate, 0.7× speedup?

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

            1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

            if -6.5999999999999998e24 < a < 1.65000000000000009e-9

            1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

            if 1.65000000000000009e-9 < a < 2.6999999999999998e139

            1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 59.9% accurate, 0.7× speedup?

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

            1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.99999999999999991e35 < a < 1.65000000000000009e-9

              1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

              if 1.65000000000000009e-9 < a < 3.2000000000000001e139

              1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

            Alternative 9: 71.0% accurate, 0.7× speedup?

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

              1. Initial program 72.2%

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

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

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

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

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

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

              if -2.40000000000000006e-73 < a < 1.09999999999999993e81

              1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 1.09999999999999993e81 < a

              1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

            Alternative 10: 41.7% accurate, 0.8× speedup?

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

              1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

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

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

                if -2.5000000000000001e-173 < x < 6.20000000000000011e-212

                1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                6. Step-by-step derivation
                  1. Applied rewrites47.4%

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

                  if 6.20000000000000011e-212 < x < 5.8e17

                  1. Initial program 69.9%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{y}{a}, z, x\right) \]
                  8. Recombined 3 regimes into one program.
                  9. Final simplification50.8%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.5 \cdot 10^{-173}:\\ \;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a}, x\right)\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{-212}:\\ \;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+17}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a}, x\right)\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 11: 60.2% accurate, 0.8× speedup?

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

                    1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

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

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

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

                      if -2.99999999999999991e35 < a < 1.05000000000000003e76

                      1. Initial program 70.2%

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 12: 56.6% accurate, 0.9× speedup?

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

                      1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                      6. Step-by-step derivation
                        1. Applied rewrites44.8%

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

                        if -3.7999999999999998e120 < t < 1.80000000000000011e160

                        1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 13: 55.3% accurate, 0.9× speedup?

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

                        1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                        6. Step-by-step derivation
                          1. Applied rewrites44.8%

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

                          if -3.7999999999999998e120 < t < 1.80000000000000011e160

                          1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

                        Alternative 14: 51.2% accurate, 0.9× speedup?

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

                          1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                          6. Step-by-step derivation
                            1. Applied rewrites44.2%

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

                            if -5.7999999999999998e121 < t < 3.2999999999999999e155

                            1. Initial program 80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 15: 48.0% accurate, 1.0× speedup?

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

                              1. Initial program 46.6%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                              6. Step-by-step derivation
                                1. Applied rewrites41.9%

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

                                if -5.7999999999999998e121 < t < 1.5999999999999999e83

                                1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\frac{y}{a}, z, x\right) \]
                                8. Recombined 2 regimes into one program.
                                9. Final simplification49.0%

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

                                Alternative 16: 30.7% accurate, 1.0× speedup?

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

                                  1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites38.5%

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

                                    if -8.2000000000000003e40 < t < 2.05e98

                                    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{z}{a} \cdot y \]
                                      3. Recombined 2 regimes into one program.
                                      4. Final simplification32.7%

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

                                      Alternative 17: 29.8% accurate, 1.0× speedup?

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

                                        1. Initial program 51.3%

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites38.6%

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

                                          if -6.1999999999999995e40 < t < 5.99999999999999948e79

                                          1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{y \cdot z}{\color{blue}{a}} \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites25.6%

                                                \[\leadsto z \cdot \frac{y}{\color{blue}{a}} \]
                                            3. Recombined 2 regimes into one program.
                                            4. Final simplification30.7%

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

                                            Alternative 18: 19.4% accurate, 2.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                                            6. Step-by-step derivation
                                              1. Applied rewrites18.3%

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                                              2. Add Preprocessing

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

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

                                              Reproduce

                                              ?
                                              herbie shell --seed 2024320 
                                              (FPCore (x y z t a)
                                                :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                                :precision binary64
                                              
                                                :alt
                                                (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
                                              
                                                (+ x (/ (* (- y x) (- z t)) (- a t))))