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

Percentage Accurate: 68.0% → 88.8%
Time: 12.3s
Alternatives: 18
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 68.0% accurate, 1.0× speedup?

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

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

Alternative 1: 88.8% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 20.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.1999999999999996e170 < z < 2.4e104

      1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

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

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

      if 2.4e104 < z

      1. Initial program 29.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 77.5% accurate, 0.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq -2 \cdot 10^{-267} \lor \neg \left(t\_1 \leq 0 \lor \neg \left(t\_1 \leq 4 \cdot 10^{+305}\right)\right)\right):\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
       (if (or (<= t_1 (- INFINITY))
               (not
                (or (<= t_1 -2e-267)
                    (not (or (<= t_1 0.0) (not (<= t_1 4e+305)))))))
         (fma (- x t) (/ (- y a) z) t)
         (+ x (/ (* (- y z) t) (- a z))))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = x + (((y - z) * (t - x)) / (a - z));
    	double tmp;
    	if ((t_1 <= -((double) INFINITY)) || !((t_1 <= -2e-267) || !((t_1 <= 0.0) || !(t_1 <= 4e+305)))) {
    		tmp = fma((x - t), ((y - a) / z), t);
    	} else {
    		tmp = x + (((y - z) * t) / (a - z));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
    	tmp = 0.0
    	if ((t_1 <= Float64(-Inf)) || !((t_1 <= -2e-267) || !((t_1 <= 0.0) || !(t_1 <= 4e+305))))
    		tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t);
    	else
    		tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z)));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[Or[LessEqual[t$95$1, -2e-267], N[Not[Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 4e+305]], $MachinePrecision]]], $MachinePrecision]]], $MachinePrecision]], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
    \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq -2 \cdot 10^{-267} \lor \neg \left(t\_1 \leq 0 \lor \neg \left(t\_1 \leq 4 \cdot 10^{+305}\right)\right)\right):\\
    \;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or -2e-267 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0 or 3.9999999999999998e305 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

      1. Initial program 30.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2e-267 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 3.9999999999999998e305

        1. Initial program 98.8%

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

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

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

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

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

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

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

      Alternative 3: 76.8% accurate, 0.8× speedup?

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

        1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -3.7e40 < z < 3.7999999999999999e37

          1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 3.7999999999999999e37 < z

          1. Initial program 42.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 77.0% accurate, 0.8× speedup?

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

          1. Initial program 39.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -3.7e40 < z < 3.7999999999999999e37

            1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 5: 76.2% accurate, 0.8× speedup?

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

            1. Initial program 39.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -3.7e40 < z < 3.7999999999999999e37

              1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 74.7% accurate, 0.8× speedup?

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

              1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -1.89999999999999997e-75 < z < 3.7999999999999999e37

                1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 7: 69.2% accurate, 0.9× speedup?

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

                1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

                if -7.9999999999999999e-92 < a < 1.24999999999999998e76

                1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 8: 64.9% accurate, 0.9× speedup?

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

                    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

                      if -3.04999999999999998e34 < a < 1.24999999999999998e76

                      1. Initial program 62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 9: 70.9% accurate, 0.9× speedup?

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

                          1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -3.19999999999999981e40 < z < 1.02e39

                            1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 1.02e39 < z

                            1. Initial program 40.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 10: 53.0% accurate, 0.9× speedup?

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

                                1. Initial program 70.3%

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

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

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

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

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

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

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

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

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

                                  if -7.79999999999999956e-47 < a < 3.1000000000000002e92

                                  1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 11: 45.0% accurate, 0.9× speedup?

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

                                        1. Initial program 48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -2.1999999999999999e-78 < z < 2600

                                              1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 12: 32.6% accurate, 0.9× speedup?

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

                                                  1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -5.5e9 < y < 2.10000000000000018e-40

                                                    1. Initial program 63.0%

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

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

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

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

                                                    if 2.10000000000000018e-40 < y

                                                    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]
                                                    8. Recombined 3 regimes into one program.
                                                    9. Add Preprocessing

                                                    Alternative 13: 31.3% accurate, 0.9× speedup?

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

                                                      1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if -5.6e99 < y < 2.10000000000000018e-40

                                                          1. Initial program 64.0%

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

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

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

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

                                                          if 2.10000000000000018e-40 < y

                                                          1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]
                                                          8. Recombined 3 regimes into one program.
                                                          9. Add Preprocessing

                                                          Alternative 14: 28.4% accurate, 0.9× speedup?

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

                                                            1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                if -9.2000000000000003e178 < y < 2.10000000000000018e-40

                                                                1. Initial program 64.3%

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

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

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

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

                                                                if 2.10000000000000018e-40 < y

                                                                1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]
                                                                8. Recombined 3 regimes into one program.
                                                                9. Add Preprocessing

                                                                Alternative 15: 30.4% accurate, 1.0× speedup?

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

                                                                  1. Initial program 29.9%

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

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

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

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

                                                                  if -2.1e114 < z < 1.1e124

                                                                  1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]
                                                                    2. Taylor expanded in z around 0

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

                                                                        \[\leadsto t \cdot \frac{y}{a} \]
                                                                    4. Recombined 2 regimes into one program.
                                                                    5. Final simplification33.0%

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

                                                                    Alternative 16: 25.9% accurate, 1.0× speedup?

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

                                                                      1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if -9.2000000000000003e178 < y < 2.20000000000000009e-40

                                                                          1. Initial program 64.3%

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

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

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

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

                                                                          if 2.20000000000000009e-40 < y

                                                                          1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]
                                                                            2. Taylor expanded in z around 0

                                                                              \[\leadsto t \cdot \frac{y}{a} \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites35.8%

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

                                                                            Alternative 17: 19.4% accurate, 4.1× speedup?

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

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

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

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

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

                                                                            Alternative 18: 2.8% accurate, 4.8× speedup?

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

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

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

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

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

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

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

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

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

                                                                              Reproduce

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