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

Percentage Accurate: 68.4% → 90.7%
Time: 13.3s
Alternatives: 20
Speedup: 0.8×

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 20 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.4% 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: 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 -1 \cdot 10^{-307} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{\mathsf{fma}\left(-x, z - a, \left(z - a\right) \cdot y\right)}{t}\\ \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 -1e-307) (not (<= t_1 0.0)))
     (fma (/ (- z t) (- a t)) (- y x) x)
     (- y (/ (fma (- x) (- z a) (* (- z a) y)) t)))))
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 <= -1e-307) || !(t_1 <= 0.0)) {
		tmp = fma(((z - t) / (a - t)), (y - x), x);
	} else {
		tmp = y - (fma(-x, (z - a), ((z - a) * y)) / t);
	}
	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 <= -1e-307) || !(t_1 <= 0.0))
		tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x);
	else
		tmp = Float64(y - Float64(fma(Float64(-x), Float64(z - a), Float64(Float64(z - a) * y)) / t));
	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, -1e-307], 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[(y - N[(N[((-x) * N[(z - a), $MachinePrecision] + N[(N[(z - a), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $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 -1 \cdot 10^{-307} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\

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


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

    1. Initial program 74.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-/.f6492.4

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

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

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

    1. Initial program 4.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-/.f644.3

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

      \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-307} \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}:\\ \;\;\;\;y - \frac{\mathsf{fma}\left(-x, z - a, \left(z - a\right) \cdot y\right)}{t}\\ \end{array} \]
    12. Add Preprocessing

    Alternative 2: 90.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 -1 \cdot 10^{-307} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\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 -1e-307) (not (<= t_1 0.0)))
         (fma (/ (- z t) (- a t)) (- y x) x)
         (- y (* (/ (- y x) t) (- z a))))))
    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 <= -1e-307) || !(t_1 <= 0.0)) {
    		tmp = fma(((z - t) / (a - t)), (y - x), x);
    	} else {
    		tmp = y - (((y - x) / t) * (z - a));
    	}
    	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 <= -1e-307) || !(t_1 <= 0.0))
    		tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x);
    	else
    		tmp = Float64(y - Float64(Float64(Float64(y - x) / t) * Float64(z - a)));
    	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, -1e-307], 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[(y - N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $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 -1 \cdot 10^{-307} \lor \neg \left(t\_1 \leq 0\right):\\
    \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\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))) < -9.99999999999999909e-308 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

      1. Initial program 74.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-/.f6492.4

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

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

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

      1. Initial program 4.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-/.f644.3

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

        \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -1 \cdot 10^{-307} \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}:\\ \;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 3: 61.4% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y - x\right) \cdot \frac{z}{a - t}\\ t_2 := \left(-y\right) \cdot \frac{z - t}{t}\\ \mathbf{if}\;t \leq -1.55 \cdot 10^{+121}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1500000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-180}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (* (- y x) (/ z (- a t)))) (t_2 (* (- y) (/ (- z t) t))))
       (if (<= t -1.55e+121)
         t_2
         (if (<= t -1500000.0)
           t_1
           (if (<= t 8.5e-180)
             (fma (/ z a) (- y x) x)
             (if (<= t 5.5e+104) t_1 t_2))))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (y - x) * (z / (a - t));
    	double t_2 = -y * ((z - t) / t);
    	double tmp;
    	if (t <= -1.55e+121) {
    		tmp = t_2;
    	} else if (t <= -1500000.0) {
    		tmp = t_1;
    	} else if (t <= 8.5e-180) {
    		tmp = fma((z / a), (y - x), x);
    	} else if (t <= 5.5e+104) {
    		tmp = t_1;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(y - x) * Float64(z / Float64(a - t)))
    	t_2 = Float64(Float64(-y) * Float64(Float64(z - t) / t))
    	tmp = 0.0
    	if (t <= -1.55e+121)
    		tmp = t_2;
    	elseif (t <= -1500000.0)
    		tmp = t_1;
    	elseif (t <= 8.5e-180)
    		tmp = fma(Float64(z / a), Float64(y - x), x);
    	elseif (t <= 5.5e+104)
    		tmp = t_1;
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-y) * N[(N[(z - t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+121], t$95$2, If[LessEqual[t, -1500000.0], t$95$1, If[LessEqual[t, 8.5e-180], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 5.5e+104], t$95$1, t$95$2]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(y - x\right) \cdot \frac{z}{a - t}\\
    t_2 := \left(-y\right) \cdot \frac{z - t}{t}\\
    \mathbf{if}\;t \leq -1.55 \cdot 10^{+121}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t \leq -1500000:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 8.5 \cdot 10^{-180}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
    
    \mathbf{elif}\;t \leq 5.5 \cdot 10^{+104}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -1.55000000000000004e121 or 5.50000000000000017e104 < t

      1. Initial program 33.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-/.f6467.9

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

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

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

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

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

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

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

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

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

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

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

        if -1.55000000000000004e121 < t < -1.5e6 or 8.4999999999999993e-180 < t < 5.50000000000000017e104

        1. Initial program 81.0%

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

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

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

        if -1.5e6 < t < 8.4999999999999993e-180

        1. Initial program 93.9%

          \[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.8

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

          \[\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-/.f6482.1

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

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

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

      Alternative 4: 63.0% accurate, 0.7× speedup?

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

        1. Initial program 38.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-/.f6470.4

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

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

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

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

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

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

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

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

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

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

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

          if -1.55000000000000004e121 < t < -1.5e6

          1. Initial program 74.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--.f6456.3

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

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

          if -1.5e6 < t < 4.8000000000000004e-28

          1. Initial program 92.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-/.f6498.2

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

            \[\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-/.f6477.0

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

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

          if 4.8000000000000004e-28 < t

          1. Initial program 48.5%

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

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

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

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

        Alternative 5: 76.2% accurate, 0.8× speedup?

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

          1. Initial program 41.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-/.f6471.3

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

            \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -9.50000000000000041e117 < t < 2e30

          1. Initial program 89.7%

            \[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--.f6482.4

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

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

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

        Alternative 6: 75.8% accurate, 0.8× speedup?

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

          1. Initial program 49.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-/.f6475.4

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

            \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -0.320000000000000007 < t < 3.1e-24

          1. Initial program 92.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-/.f6498.2

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

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

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

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

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

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

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

        Alternative 7: 55.5% accurate, 0.8× speedup?

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

          1. Initial program 33.1%

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

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

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

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

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

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

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

            if -4.2e118 < t < 4600

            1. Initial program 90.0%

              \[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)} \]

            if 4600 < t < 6.5e118

            1. Initial program 73.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-/.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 \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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x \cdot \color{blue}{\frac{z - a}{t}} \]
            10. Recombined 3 regimes into one program.
            11. Final simplification59.0%

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

            Alternative 8: 48.4% accurate, 0.8× speedup?

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

              1. Initial program 33.4%

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

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

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

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

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

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

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

                if -7.99999999999999955e119 < t < 3e3

                1. Initial program 89.4%

                  \[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.1

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

                  \[\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 rewrites62.5%

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

                  if 3e3 < t < 6.5e118

                  1. Initial program 73.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-/.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 \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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto x \cdot \color{blue}{\frac{z - a}{t}} \]
                  10. Recombined 3 regimes into one program.
                  11. Final simplification56.4%

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

                  Alternative 9: 70.5% accurate, 0.8× speedup?

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

                    1. Initial program 70.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-/.f6493.6

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

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

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

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

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

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

                    if -6.2e18 < a < 5.2000000000000003e36

                    1. Initial program 68.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-/.f6480.1

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

                      \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 10: 70.1% accurate, 0.8× speedup?

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

                      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 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--.f6476.3

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

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

                      if -6.2e18 < a < 5.2000000000000003e36

                      1. Initial program 68.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-/.f6480.1

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

                        \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 11: 66.6% accurate, 0.8× speedup?

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

                        1. Initial program 70.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-/.f6493.6

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

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

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

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

                        if -4.8e19 < a < 5.2000000000000003e36

                        1. Initial program 68.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-/.f6480.1

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

                          \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 12: 34.3% accurate, 0.8× speedup?

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

                          1. Initial program 41.2%

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

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

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

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

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

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

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

                            if -4.8e118 < t < 4.59999999999999991e-303

                            1. Initial program 91.7%

                              \[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--.f6466.6

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

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

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

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

                                \[\leadsto 1 \cdot x \]
                              3. Step-by-step derivation
                                1. Applied rewrites45.3%

                                  \[\leadsto 1 \cdot x \]

                                if 4.59999999999999991e-303 < t < 2.5e29

                                1. Initial program 87.1%

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

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

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

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

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

                                    \[\leadsto 1 \cdot x \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites25.1%

                                      \[\leadsto 1 \cdot x \]
                                    2. Taylor expanded in x around 0

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

                                        \[\leadsto y \cdot \color{blue}{\frac{z}{a}} \]
                                    4. Recombined 3 regimes into one program.
                                    5. Add Preprocessing

                                    Alternative 13: 32.5% accurate, 0.8× speedup?

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

                                      1. Initial program 41.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-/.f6471.3

                                          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z - t}{a - t}}, y - x, x\right) \]
                                      4. Applied rewrites71.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 rewrites38.0%

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

                                        if -6.5e118 < t < 4.59999999999999991e-303

                                        1. Initial program 91.7%

                                          \[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--.f6466.6

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

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

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

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

                                            \[\leadsto 1 \cdot x \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites45.3%

                                              \[\leadsto 1 \cdot x \]

                                            if 4.59999999999999991e-303 < t < 4.1000000000000003e29

                                            1. Initial program 87.1%

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

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

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

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

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

                                                \[\leadsto 1 \cdot x \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites25.1%

                                                  \[\leadsto 1 \cdot x \]
                                                2. Taylor expanded in x around 0

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

                                                    \[\leadsto y \cdot \color{blue}{\frac{z}{a}} \]
                                                4. Recombined 3 regimes into one program.
                                                5. Add Preprocessing

                                                Alternative 14: 62.1% accurate, 0.9× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+118} \lor \neg \left(t \leq 1.2 \cdot 10^{-23}\right):\\ \;\;\;\;\left(-y\right) \cdot \frac{z - t}{t}\\ \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 -3e+118) (not (<= t 1.2e-23)))
                                                   (* (- y) (/ (- z t) t))
                                                   (fma (/ z a) (- y x) x)))
                                                double code(double x, double y, double z, double t, double a) {
                                                	double tmp;
                                                	if ((t <= -3e+118) || !(t <= 1.2e-23)) {
                                                		tmp = -y * ((z - t) / t);
                                                	} else {
                                                		tmp = fma((z / a), (y - x), x);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(x, y, z, t, a)
                                                	tmp = 0.0
                                                	if ((t <= -3e+118) || !(t <= 1.2e-23))
                                                		tmp = Float64(Float64(-y) * Float64(Float64(z - t) / t));
                                                	else
                                                		tmp = fma(Float64(z / a), Float64(y - x), x);
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3e+118], N[Not[LessEqual[t, 1.2e-23]], $MachinePrecision]], N[((-y) * N[(N[(z - t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;t \leq -3 \cdot 10^{+118} \lor \neg \left(t \leq 1.2 \cdot 10^{-23}\right):\\
                                                \;\;\;\;\left(-y\right) \cdot \frac{z - t}{t}\\
                                                
                                                \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 < -3e118 or 1.19999999999999998e-23 < t

                                                  1. Initial program 44.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-/.f6473.8

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

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

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

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

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

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

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

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

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

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

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

                                                    if -3e118 < t < 1.19999999999999998e-23

                                                    1. Initial program 90.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-/.f6496.3

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

                                                      \[\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-/.f6471.4

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

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

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

                                                  Alternative 15: 63.6% accurate, 0.9× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+118} \lor \neg \left(t \leq 2.05 \cdot 10^{+30}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\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 -6.5e+118) (not (<= t 2.05e+30)))
                                                     (fma a (/ (- y x) t) y)
                                                     (fma (/ z a) (- y x) x)))
                                                  double code(double x, double y, double z, double t, double a) {
                                                  	double tmp;
                                                  	if ((t <= -6.5e+118) || !(t <= 2.05e+30)) {
                                                  		tmp = fma(a, ((y - x) / t), y);
                                                  	} else {
                                                  		tmp = fma((z / a), (y - x), x);
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(x, y, z, t, a)
                                                  	tmp = 0.0
                                                  	if ((t <= -6.5e+118) || !(t <= 2.05e+30))
                                                  		tmp = fma(a, Float64(Float64(y - x) / t), y);
                                                  	else
                                                  		tmp = fma(Float64(z / a), Float64(y - x), x);
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e+118], N[Not[LessEqual[t, 2.05e+30]], $MachinePrecision]], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;t \leq -6.5 \cdot 10^{+118} \lor \neg \left(t \leq 2.05 \cdot 10^{+30}\right):\\
                                                  \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\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 < -6.5e118 or 2.05000000000000003e30 < t

                                                    1. Initial program 41.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-/.f6471.3

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

                                                      \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if -6.5e118 < t < 2.05000000000000003e30

                                                      1. Initial program 89.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-/.f6496.6

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

                                                        \[\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-/.f6469.4

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

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

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

                                                    Alternative 16: 62.5% accurate, 0.9× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+118} \lor \neg \left(t \leq 2.05 \cdot 10^{+30}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\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 -3e+118) (not (<= t 2.05e+30)))
                                                       (fma a (/ (- y x) t) y)
                                                       (fma (/ (- y x) a) z x)))
                                                    double code(double x, double y, double z, double t, double a) {
                                                    	double tmp;
                                                    	if ((t <= -3e+118) || !(t <= 2.05e+30)) {
                                                    		tmp = fma(a, ((y - x) / t), y);
                                                    	} else {
                                                    		tmp = fma(((y - x) / a), z, x);
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    function code(x, y, z, t, a)
                                                    	tmp = 0.0
                                                    	if ((t <= -3e+118) || !(t <= 2.05e+30))
                                                    		tmp = fma(a, Float64(Float64(y - x) / t), y);
                                                    	else
                                                    		tmp = fma(Float64(Float64(y - x) / a), z, x);
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3e+118], N[Not[LessEqual[t, 2.05e+30]], $MachinePrecision]], N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;t \leq -3 \cdot 10^{+118} \lor \neg \left(t \leq 2.05 \cdot 10^{+30}\right):\\
                                                    \;\;\;\;\mathsf{fma}\left(a, \frac{y - x}{t}, y\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 < -3e118 or 2.05000000000000003e30 < t

                                                      1. Initial program 41.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-/.f6471.3

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

                                                        \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if -3e118 < t < 2.05000000000000003e30

                                                        1. Initial program 89.7%

                                                          \[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--.f6466.0

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

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

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

                                                      Alternative 17: 48.9% accurate, 1.0× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8 \cdot 10^{+119} \lor \neg \left(t \leq 2.2 \cdot 10^{+30}\right):\\ \;\;\;\;\frac{y}{x} \cdot x\\ \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 -8e+119) (not (<= t 2.2e+30))) (* (/ y x) x) (fma (/ y a) z x)))
                                                      double code(double x, double y, double z, double t, double a) {
                                                      	double tmp;
                                                      	if ((t <= -8e+119) || !(t <= 2.2e+30)) {
                                                      		tmp = (y / x) * x;
                                                      	} else {
                                                      		tmp = fma((y / a), z, x);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(x, y, z, t, a)
                                                      	tmp = 0.0
                                                      	if ((t <= -8e+119) || !(t <= 2.2e+30))
                                                      		tmp = Float64(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, -8e+119], N[Not[LessEqual[t, 2.2e+30]], $MachinePrecision]], N[(N[(y / x), $MachinePrecision] * x), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;t \leq -8 \cdot 10^{+119} \lor \neg \left(t \leq 2.2 \cdot 10^{+30}\right):\\
                                                      \;\;\;\;\frac{y}{x} \cdot x\\
                                                      
                                                      \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 < -7.99999999999999955e119 or 2.2e30 < t

                                                        1. Initial program 41.5%

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

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

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

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

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

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

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

                                                          if -7.99999999999999955e119 < t < 2.2e30

                                                          1. Initial program 89.1%

                                                            \[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--.f6465.6

                                                              \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{y - x}}{a}, z, x\right) \]
                                                          5. Applied rewrites65.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 rewrites61.2%

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

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

                                                          Alternative 18: 32.9% accurate, 1.3× speedup?

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

                                                            1. Initial program 43.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-/.f6473.3

                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z - t}{a - t}}, y - x, x\right) \]
                                                            4. Applied rewrites73.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 rewrites36.5%

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

                                                              if -6.5e118 < t < 7.5e-12

                                                              1. Initial program 90.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--.f6468.2

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

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

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

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

                                                                  \[\leadsto 1 \cdot x \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites37.7%

                                                                    \[\leadsto 1 \cdot x \]
                                                                4. Recombined 2 regimes into one program.
                                                                5. Final simplification37.2%

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+118} \lor \neg \left(t \leq 7.5 \cdot 10^{-12}\right):\\ \;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
                                                                6. Add Preprocessing

                                                                Alternative 19: 25.2% accurate, 4.8× speedup?

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

                                                                  \[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--.f6443.4

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

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

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

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

                                                                    \[\leadsto 1 \cdot x \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites25.3%

                                                                      \[\leadsto 1 \cdot x \]
                                                                    2. Add Preprocessing

                                                                    Alternative 20: 2.8% accurate, 29.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto 0 \]
                                                                      2. Add Preprocessing

                                                                      Developer Target 1: 86.6% 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 2024337 
                                                                      (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))))