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

Percentage Accurate: 67.2% → 90.2%
Time: 16.7s
Alternatives: 18
Speedup: 0.6×

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: 67.2% 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: 90.2% accurate, 0.1× 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 -5 \cdot 10^{-248} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{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 -5e-248) (not (<= t_1 0.0)))
     (fma (- t x) (/ (- y z) (- a z)) x)
     (- t (/ (* (- t x) (- y 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 <= -5e-248) || !(t_1 <= 0.0)) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} else {
		tmp = t - (((t - x) * (y - 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 <= -5e-248) || !(t_1 <= 0.0))
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	else
		tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - 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, -5e-248], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $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 -5 \cdot 10^{-248} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{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))) < -5.0000000000000001e-248 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 76.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative76.8%

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

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

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

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

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--99.8%

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

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

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

Alternative 2: 87.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-248}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 10^{+223}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))
        (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_2 -5e-248)
     t_1
     (if (<= t_2 0.0)
       (- t (/ (* (- t x) (- y a)) z))
       (if (<= t_2 1e+223) t_2 t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -5e-248) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t - (((t - x) * (y - a)) / z);
	} else if (t_2 <= 1e+223) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x + ((y - z) * ((t - x) / (a - z)))
    t_2 = x + (((y - z) * (t - x)) / (a - z))
    if (t_2 <= (-5d-248)) then
        tmp = t_1
    else if (t_2 <= 0.0d0) then
        tmp = t - (((t - x) * (y - a)) / z)
    else if (t_2 <= 1d+223) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -5e-248) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t - (((t - x) * (y - a)) / z);
	} else if (t_2 <= 1e+223) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	t_2 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if t_2 <= -5e-248:
		tmp = t_1
	elif t_2 <= 0.0:
		tmp = t - (((t - x) * (y - a)) / z)
	elif t_2 <= 1e+223:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if (t_2 <= -5e-248)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z));
	elseif (t_2 <= 1e+223)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) * ((t - x) / (a - z)));
	t_2 = x + (((y - z) * (t - x)) / (a - z));
	tmp = 0.0;
	if (t_2 <= -5e-248)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = t - (((t - x) * (y - a)) / z);
	elseif (t_2 <= 1e+223)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-248], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+223], t$95$2, t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-248}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\

\mathbf{elif}\;t\_2 \leq 10^{+223}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -5.0000000000000001e-248 or 1.00000000000000005e223 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 70.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*87.8%

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

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

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

    1. Initial program 4.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--99.8%

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

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

    if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.00000000000000005e223

    1. Initial program 96.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 37.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -3.1 \cdot 10^{+155}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -8.4 \cdot 10^{-128}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-261}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{-211}:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+121}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a))))
   (if (<= a -3.1e+155)
     x
     (if (<= a -8.4e-128)
       t_1
       (if (<= a 1.25e-261)
         t
         (if (<= a 6.5e-211)
           (* y (/ t (- a z)))
           (if (<= a 3.5e+121) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double tmp;
	if (a <= -3.1e+155) {
		tmp = x;
	} else if (a <= -8.4e-128) {
		tmp = t_1;
	} else if (a <= 1.25e-261) {
		tmp = t;
	} else if (a <= 6.5e-211) {
		tmp = y * (t / (a - z));
	} else if (a <= 3.5e+121) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((t - x) / a)
    if (a <= (-3.1d+155)) then
        tmp = x
    else if (a <= (-8.4d-128)) then
        tmp = t_1
    else if (a <= 1.25d-261) then
        tmp = t
    else if (a <= 6.5d-211) then
        tmp = y * (t / (a - z))
    else if (a <= 3.5d+121) then
        tmp = t_1
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double tmp;
	if (a <= -3.1e+155) {
		tmp = x;
	} else if (a <= -8.4e-128) {
		tmp = t_1;
	} else if (a <= 1.25e-261) {
		tmp = t;
	} else if (a <= 6.5e-211) {
		tmp = y * (t / (a - z));
	} else if (a <= 3.5e+121) {
		tmp = t_1;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	tmp = 0
	if a <= -3.1e+155:
		tmp = x
	elif a <= -8.4e-128:
		tmp = t_1
	elif a <= 1.25e-261:
		tmp = t
	elif a <= 6.5e-211:
		tmp = y * (t / (a - z))
	elif a <= 3.5e+121:
		tmp = t_1
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	tmp = 0.0
	if (a <= -3.1e+155)
		tmp = x;
	elseif (a <= -8.4e-128)
		tmp = t_1;
	elseif (a <= 1.25e-261)
		tmp = t;
	elseif (a <= 6.5e-211)
		tmp = Float64(y * Float64(t / Float64(a - z)));
	elseif (a <= 3.5e+121)
		tmp = t_1;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	tmp = 0.0;
	if (a <= -3.1e+155)
		tmp = x;
	elseif (a <= -8.4e-128)
		tmp = t_1;
	elseif (a <= 1.25e-261)
		tmp = t;
	elseif (a <= 6.5e-211)
		tmp = y * (t / (a - z));
	elseif (a <= 3.5e+121)
		tmp = t_1;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.1e+155], x, If[LessEqual[a, -8.4e-128], t$95$1, If[LessEqual[a, 1.25e-261], t, If[LessEqual[a, 6.5e-211], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e+121], t$95$1, x]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{+155}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -8.4 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-261}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 6.5 \cdot 10^{-211}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\

\mathbf{elif}\;a \leq 3.5 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -3.09999999999999989e155 or 3.5e121 < a

    1. Initial program 72.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative72.9%

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

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

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

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

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

      \[\leadsto \color{blue}{x} \]

    if -3.09999999999999989e155 < a < -8.4000000000000004e-128 or 6.4999999999999996e-211 < a < 3.5e121

    1. Initial program 75.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative75.4%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt85.9%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow385.9%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr85.9%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    9. Simplified61.7%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    10. Taylor expanded in a around inf 46.5%

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

    if -8.4000000000000004e-128 < a < 1.24999999999999995e-261

    1. Initial program 68.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative68.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt76.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow376.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr76.3%

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

      \[\leadsto \color{blue}{t} \]

    if 1.24999999999999995e-261 < a < 6.4999999999999996e-211

    1. Initial program 70.8%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative70.8%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt82.4%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    9. Simplified91.2%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    10. Taylor expanded in t around inf 65.3%

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

Alternative 4: 61.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + y \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -2.55 \cdot 10^{-40}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-224}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 2.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{+69}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* y (/ (- t x) a)))))
   (if (<= a -2.55e-40)
     t_2
     (if (<= a 3.9e-224)
       t_1
       (if (<= a 2.5e-57)
         (/ y (/ (- a z) (- t x)))
         (if (<= a 1.3e+69) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + (y * ((t - x) / a));
	double tmp;
	if (a <= -2.55e-40) {
		tmp = t_2;
	} else if (a <= 3.9e-224) {
		tmp = t_1;
	} else if (a <= 2.5e-57) {
		tmp = y / ((a - z) / (t - x));
	} else if (a <= 1.3e+69) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x + (y * ((t - x) / a))
    if (a <= (-2.55d-40)) then
        tmp = t_2
    else if (a <= 3.9d-224) then
        tmp = t_1
    else if (a <= 2.5d-57) then
        tmp = y / ((a - z) / (t - x))
    else if (a <= 1.3d+69) then
        tmp = t_1
    else
        tmp = t_2
    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) / (a - z));
	double t_2 = x + (y * ((t - x) / a));
	double tmp;
	if (a <= -2.55e-40) {
		tmp = t_2;
	} else if (a <= 3.9e-224) {
		tmp = t_1;
	} else if (a <= 2.5e-57) {
		tmp = y / ((a - z) / (t - x));
	} else if (a <= 1.3e+69) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (y * ((t - x) / a))
	tmp = 0
	if a <= -2.55e-40:
		tmp = t_2
	elif a <= 3.9e-224:
		tmp = t_1
	elif a <= 2.5e-57:
		tmp = y / ((a - z) / (t - x))
	elif a <= 1.3e+69:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(y * Float64(Float64(t - x) / a)))
	tmp = 0.0
	if (a <= -2.55e-40)
		tmp = t_2;
	elseif (a <= 3.9e-224)
		tmp = t_1;
	elseif (a <= 2.5e-57)
		tmp = Float64(y / Float64(Float64(a - z) / Float64(t - x)));
	elseif (a <= 1.3e+69)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + (y * ((t - x) / a));
	tmp = 0.0;
	if (a <= -2.55e-40)
		tmp = t_2;
	elseif (a <= 3.9e-224)
		tmp = t_1;
	elseif (a <= 2.5e-57)
		tmp = y / ((a - z) / (t - x));
	elseif (a <= 1.3e+69)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.55e-40], t$95$2, If[LessEqual[a, 3.9e-224], t$95$1, If[LessEqual[a, 2.5e-57], N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e+69], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + y \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -2.55 \cdot 10^{-40}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 3.9 \cdot 10^{-224}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.3 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.55000000000000019e-40 or 1.3000000000000001e69 < a

    1. Initial program 74.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.1%

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 68.2%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified76.0%

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

    if -2.55000000000000019e-40 < a < 3.8999999999999998e-224 or 2.5000000000000001e-57 < a < 1.3000000000000001e69

    1. Initial program 69.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative69.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt80.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow380.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr80.3%

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    8. Step-by-step derivation
      1. div-sub68.4%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    9. Simplified68.4%

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

    if 3.8999999999999998e-224 < a < 2.5000000000000001e-57

    1. Initial program 77.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt80.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow380.9%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr80.9%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    9. Simplified88.6%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    10. Step-by-step derivation
      1. clear-num88.6%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a - z}{t - x}}} \]
      2. un-div-inv88.6%

        \[\leadsto \color{blue}{\frac{y}{\frac{a - z}{t - x}}} \]
    11. Applied egg-rr88.6%

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

Alternative 5: 61.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + y \cdot \frac{t - x}{a}\\ \mathbf{if}\;a \leq -5.2 \cdot 10^{-40}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-225}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-58}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{+67}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* y (/ (- t x) a)))))
   (if (<= a -5.2e-40)
     t_2
     (if (<= a 3.9e-225)
       t_1
       (if (<= a 1.4e-58)
         (* y (/ (- t x) (- a z)))
         (if (<= a 3.2e+67) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + (y * ((t - x) / a));
	double tmp;
	if (a <= -5.2e-40) {
		tmp = t_2;
	} else if (a <= 3.9e-225) {
		tmp = t_1;
	} else if (a <= 1.4e-58) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 3.2e+67) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x + (y * ((t - x) / a))
    if (a <= (-5.2d-40)) then
        tmp = t_2
    else if (a <= 3.9d-225) then
        tmp = t_1
    else if (a <= 1.4d-58) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 3.2d+67) then
        tmp = t_1
    else
        tmp = t_2
    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) / (a - z));
	double t_2 = x + (y * ((t - x) / a));
	double tmp;
	if (a <= -5.2e-40) {
		tmp = t_2;
	} else if (a <= 3.9e-225) {
		tmp = t_1;
	} else if (a <= 1.4e-58) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 3.2e+67) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (y * ((t - x) / a))
	tmp = 0
	if a <= -5.2e-40:
		tmp = t_2
	elif a <= 3.9e-225:
		tmp = t_1
	elif a <= 1.4e-58:
		tmp = y * ((t - x) / (a - z))
	elif a <= 3.2e+67:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(y * Float64(Float64(t - x) / a)))
	tmp = 0.0
	if (a <= -5.2e-40)
		tmp = t_2;
	elseif (a <= 3.9e-225)
		tmp = t_1;
	elseif (a <= 1.4e-58)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 3.2e+67)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + (y * ((t - x) / a));
	tmp = 0.0;
	if (a <= -5.2e-40)
		tmp = t_2;
	elseif (a <= 3.9e-225)
		tmp = t_1;
	elseif (a <= 1.4e-58)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 3.2e+67)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.2e-40], t$95$2, If[LessEqual[a, 3.9e-225], t$95$1, If[LessEqual[a, 1.4e-58], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+67], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + y \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -5.2 \cdot 10^{-40}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 3.9 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 3.2 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.2000000000000003e-40 or 3.19999999999999983e67 < a

    1. Initial program 74.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.1%

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 68.2%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified76.0%

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

    if -5.2000000000000003e-40 < a < 3.9e-225 or 1.4e-58 < a < 3.19999999999999983e67

    1. Initial program 69.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative69.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt80.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow380.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr80.3%

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    8. Step-by-step derivation
      1. div-sub68.4%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    9. Simplified68.4%

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

    if 3.9e-225 < a < 1.4e-58

    1. Initial program 77.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt80.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow380.9%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr80.9%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    9. Simplified88.6%

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

Alternative 6: 61.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + t \cdot \frac{y - z}{a}\\ \mathbf{if}\;a \leq -1.05 \cdot 10^{-35}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 1.28 \cdot 10^{-225}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.9 \cdot 10^{-52}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 7.6 \cdot 10^{+69}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* t (/ (- y z) a)))))
   (if (<= a -1.05e-35)
     t_2
     (if (<= a 1.28e-225)
       t_1
       (if (<= a 3.9e-52)
         (* y (/ (- t x) (- a z)))
         (if (<= a 7.6e+69) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + (t * ((y - z) / a));
	double tmp;
	if (a <= -1.05e-35) {
		tmp = t_2;
	} else if (a <= 1.28e-225) {
		tmp = t_1;
	} else if (a <= 3.9e-52) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 7.6e+69) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x + (t * ((y - z) / a))
    if (a <= (-1.05d-35)) then
        tmp = t_2
    else if (a <= 1.28d-225) then
        tmp = t_1
    else if (a <= 3.9d-52) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 7.6d+69) then
        tmp = t_1
    else
        tmp = t_2
    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) / (a - z));
	double t_2 = x + (t * ((y - z) / a));
	double tmp;
	if (a <= -1.05e-35) {
		tmp = t_2;
	} else if (a <= 1.28e-225) {
		tmp = t_1;
	} else if (a <= 3.9e-52) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 7.6e+69) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (t * ((y - z) / a))
	tmp = 0
	if a <= -1.05e-35:
		tmp = t_2
	elif a <= 1.28e-225:
		tmp = t_1
	elif a <= 3.9e-52:
		tmp = y * ((t - x) / (a - z))
	elif a <= 7.6e+69:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(t * Float64(Float64(y - z) / a)))
	tmp = 0.0
	if (a <= -1.05e-35)
		tmp = t_2;
	elseif (a <= 1.28e-225)
		tmp = t_1;
	elseif (a <= 3.9e-52)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 7.6e+69)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + (t * ((y - z) / a));
	tmp = 0.0;
	if (a <= -1.05e-35)
		tmp = t_2;
	elseif (a <= 1.28e-225)
		tmp = t_1;
	elseif (a <= 3.9e-52)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 7.6e+69)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.05e-35], t$95$2, If[LessEqual[a, 1.28e-225], t$95$1, If[LessEqual[a, 3.9e-52], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.6e+69], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + t \cdot \frac{y - z}{a}\\
\mathbf{if}\;a \leq -1.05 \cdot 10^{-35}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 1.28 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 7.6 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.05e-35 or 7.60000000000000055e69 < a

    1. Initial program 74.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.1%

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 70.4%

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified78.3%

      \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Taylor expanded in a around inf 68.4%

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a}} \]
    10. Simplified72.4%

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

    if -1.05e-35 < a < 1.27999999999999993e-225 or 3.90000000000000018e-52 < a < 7.60000000000000055e69

    1. Initial program 69.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative69.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt80.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow380.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr80.3%

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    8. Step-by-step derivation
      1. div-sub68.4%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    9. Simplified68.4%

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

    if 1.27999999999999993e-225 < a < 3.90000000000000018e-52

    1. Initial program 77.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt80.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow380.9%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr80.9%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    9. Simplified88.6%

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

Alternative 7: 58.2% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ t_2 := x + t \cdot \frac{y}{a}\\ \mathbf{if}\;a \leq -2.25 \cdot 10^{-36}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{-225}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{-53}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{+69}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* t (/ y a)))))
   (if (<= a -2.25e-36)
     t_2
     (if (<= a 4.5e-225)
       t_1
       (if (<= a 3.1e-53)
         (* y (/ (- t x) (- a z)))
         (if (<= a 1.6e+69) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t * ((y - z) / (a - z));
	double t_2 = x + (t * (y / a));
	double tmp;
	if (a <= -2.25e-36) {
		tmp = t_2;
	} else if (a <= 4.5e-225) {
		tmp = t_1;
	} else if (a <= 3.1e-53) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 1.6e+69) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = t * ((y - z) / (a - z))
    t_2 = x + (t * (y / a))
    if (a <= (-2.25d-36)) then
        tmp = t_2
    else if (a <= 4.5d-225) then
        tmp = t_1
    else if (a <= 3.1d-53) then
        tmp = y * ((t - x) / (a - z))
    else if (a <= 1.6d+69) then
        tmp = t_1
    else
        tmp = t_2
    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) / (a - z));
	double t_2 = x + (t * (y / a));
	double tmp;
	if (a <= -2.25e-36) {
		tmp = t_2;
	} else if (a <= 4.5e-225) {
		tmp = t_1;
	} else if (a <= 3.1e-53) {
		tmp = y * ((t - x) / (a - z));
	} else if (a <= 1.6e+69) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t * ((y - z) / (a - z))
	t_2 = x + (t * (y / a))
	tmp = 0
	if a <= -2.25e-36:
		tmp = t_2
	elif a <= 4.5e-225:
		tmp = t_1
	elif a <= 3.1e-53:
		tmp = y * ((t - x) / (a - z))
	elif a <= 1.6e+69:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z)))
	t_2 = Float64(x + Float64(t * Float64(y / a)))
	tmp = 0.0
	if (a <= -2.25e-36)
		tmp = t_2;
	elseif (a <= 4.5e-225)
		tmp = t_1;
	elseif (a <= 3.1e-53)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (a <= 1.6e+69)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t * ((y - z) / (a - z));
	t_2 = x + (t * (y / a));
	tmp = 0.0;
	if (a <= -2.25e-36)
		tmp = t_2;
	elseif (a <= 4.5e-225)
		tmp = t_1;
	elseif (a <= 3.1e-53)
		tmp = y * ((t - x) / (a - z));
	elseif (a <= 1.6e+69)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.25e-36], t$95$2, If[LessEqual[a, 4.5e-225], t$95$1, If[LessEqual[a, 3.1e-53], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+69], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -2.25 \cdot 10^{-36}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.6 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.25000000000000012e-36 or 1.59999999999999992e69 < a

    1. Initial program 74.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*89.1%

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 70.4%

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified78.3%

      \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Taylor expanded in z around 0 64.1%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. associate-/l*67.2%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified67.2%

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

    if -2.25000000000000012e-36 < a < 4.5e-225 or 3.10000000000000015e-53 < a < 1.59999999999999992e69

    1. Initial program 69.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative69.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt80.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow380.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr80.3%

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    8. Step-by-step derivation
      1. div-sub68.4%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    9. Simplified68.4%

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

    if 4.5e-225 < a < 3.10000000000000015e-53

    1. Initial program 77.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt80.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow380.9%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr80.9%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    9. Simplified88.6%

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

Alternative 8: 82.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.25 \cdot 10^{+252}:\\ \;\;\;\;t - \left(x - t\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+225}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{t - x}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.25e+252)
   (- t (* (- x t) (/ a z)))
   (if (<= z 1.35e+225)
     (+ x (* (- y z) (/ (- t x) (- a z))))
     (+ t (* a (/ (- t x) z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.25e+252) {
		tmp = t - ((x - t) * (a / z));
	} else if (z <= 1.35e+225) {
		tmp = x + ((y - z) * ((t - x) / (a - z)));
	} else {
		tmp = t + (a * ((t - x) / 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 (z <= (-3.25d+252)) then
        tmp = t - ((x - t) * (a / z))
    else if (z <= 1.35d+225) then
        tmp = x + ((y - z) * ((t - x) / (a - z)))
    else
        tmp = t + (a * ((t - x) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.25e+252) {
		tmp = t - ((x - t) * (a / z));
	} else if (z <= 1.35e+225) {
		tmp = x + ((y - z) * ((t - x) / (a - z)));
	} else {
		tmp = t + (a * ((t - x) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.25e+252:
		tmp = t - ((x - t) * (a / z))
	elif z <= 1.35e+225:
		tmp = x + ((y - z) * ((t - x) / (a - z)))
	else:
		tmp = t + (a * ((t - x) / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.25e+252)
		tmp = Float64(t - Float64(Float64(x - t) * Float64(a / z)));
	elseif (z <= 1.35e+225)
		tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))));
	else
		tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.25e+252)
		tmp = t - ((x - t) * (a / z));
	elseif (z <= 1.35e+225)
		tmp = x + ((y - z) * ((t - x) / (a - z)));
	else
		tmp = t + (a * ((t - x) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.25e+252], N[(t - N[(N[(x - t), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+225], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\


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

    1. Initial program 11.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative11.5%

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

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

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

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

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

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

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

        \[\leadsto x + \left(-\color{blue}{z \cdot \frac{t - x}{a - z}}\right) \]
      3. distribute-lft-neg-out43.5%

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

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

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

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{a \cdot x - a \cdot t}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg39.8%

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

        \[\leadsto \color{blue}{t - \frac{a \cdot x - a \cdot t}{z}} \]
      3. distribute-lft-out--41.2%

        \[\leadsto t - \frac{\color{blue}{a \cdot \left(x - t\right)}}{z} \]
    10. Simplified41.2%

      \[\leadsto \color{blue}{t - \frac{a \cdot \left(x - t\right)}{z}} \]
    11. Step-by-step derivation
      1. *-commutative41.2%

        \[\leadsto t - \frac{\color{blue}{\left(x - t\right) \cdot a}}{z} \]
      2. *-un-lft-identity41.2%

        \[\leadsto t - \frac{\left(x - t\right) \cdot a}{\color{blue}{1 \cdot z}} \]
      3. times-frac74.3%

        \[\leadsto t - \color{blue}{\frac{x - t}{1} \cdot \frac{a}{z}} \]
    12. Applied egg-rr74.3%

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

    if -3.25e252 < z < 1.3499999999999999e225

    1. Initial program 78.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*87.4%

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

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

    if 1.3499999999999999e225 < z

    1. Initial program 36.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative36.1%

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

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

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

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

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

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

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

        \[\leadsto x + \left(-\color{blue}{z \cdot \frac{t - x}{a - z}}\right) \]
      3. distribute-lft-neg-out46.3%

        \[\leadsto x + \color{blue}{\left(-z\right) \cdot \frac{t - x}{a - z}} \]
      4. +-commutative46.3%

        \[\leadsto \color{blue}{\left(-z\right) \cdot \frac{t - x}{a - z} + x} \]
      5. *-commutative46.3%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(-z\right)} + x \]
      6. fma-define46.0%

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

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

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t - x}{z}} \]
    10. Simplified88.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.25 \cdot 10^{+252}:\\ \;\;\;\;t - \left(x - t\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+225}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t + a \cdot \frac{t - x}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 35.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.1 \cdot 10^{-35}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{-262}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 3.1 \cdot 10^{+121}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -1.1e-35)
   x
   (if (<= a 1.9e-262) t (if (<= a 3.1e+121) (* t (/ y (- a z))) x))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.1e-35) {
		tmp = x;
	} else if (a <= 1.9e-262) {
		tmp = t;
	} else if (a <= 3.1e+121) {
		tmp = t * (y / (a - z));
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-1.1d-35)) then
        tmp = x
    else if (a <= 1.9d-262) then
        tmp = t
    else if (a <= 3.1d+121) then
        tmp = t * (y / (a - z))
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -1.1e-35) {
		tmp = x;
	} else if (a <= 1.9e-262) {
		tmp = t;
	} else if (a <= 3.1e+121) {
		tmp = t * (y / (a - z));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -1.1e-35:
		tmp = x
	elif a <= 1.9e-262:
		tmp = t
	elif a <= 3.1e+121:
		tmp = t * (y / (a - z))
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -1.1e-35)
		tmp = x;
	elseif (a <= 1.9e-262)
		tmp = t;
	elseif (a <= 3.1e+121)
		tmp = Float64(t * Float64(y / Float64(a - z)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -1.1e-35)
		tmp = x;
	elseif (a <= 1.9e-262)
		tmp = t;
	elseif (a <= 3.1e+121)
		tmp = t * (y / (a - z));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.1e-35], x, If[LessEqual[a, 1.9e-262], t, If[LessEqual[a, 3.1e+121], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-35}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.9 \cdot 10^{-262}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 3.1 \cdot 10^{+121}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.09999999999999997e-35 or 3.10000000000000008e121 < a

    1. Initial program 73.5%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative73.5%

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

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

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

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

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

      \[\leadsto \color{blue}{x} \]

    if -1.09999999999999997e-35 < a < 1.9000000000000001e-262

    1. Initial program 67.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative67.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt74.7%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow374.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr74.8%

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

      \[\leadsto \color{blue}{t} \]

    if 1.9000000000000001e-262 < a < 3.10000000000000008e121

    1. Initial program 77.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative77.1%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt88.0%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr88.1%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    9. Simplified74.0%

      \[\leadsto \color{blue}{y \cdot \frac{t - x}{a - z}} \]
    10. Taylor expanded in t around inf 37.4%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    11. Step-by-step derivation
      1. associate-/l*42.5%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a - z}} \]
    12. Simplified42.5%

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

Alternative 10: 36.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.65 \cdot 10^{-37}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{-262}:\\ \;\;\;\;t\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{-54}:\\ \;\;\;\;x \cdot \frac{y}{z}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{+68}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -3.65e-37)
   x
   (if (<= a 2.25e-262)
     t
     (if (<= a 1.25e-54) (* x (/ y z)) (if (<= a 1.85e+68) t x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.65e-37) {
		tmp = x;
	} else if (a <= 2.25e-262) {
		tmp = t;
	} else if (a <= 1.25e-54) {
		tmp = x * (y / z);
	} else if (a <= 1.85e+68) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-3.65d-37)) then
        tmp = x
    else if (a <= 2.25d-262) then
        tmp = t
    else if (a <= 1.25d-54) then
        tmp = x * (y / z)
    else if (a <= 1.85d+68) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -3.65e-37) {
		tmp = x;
	} else if (a <= 2.25e-262) {
		tmp = t;
	} else if (a <= 1.25e-54) {
		tmp = x * (y / z);
	} else if (a <= 1.85e+68) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -3.65e-37:
		tmp = x
	elif a <= 2.25e-262:
		tmp = t
	elif a <= 1.25e-54:
		tmp = x * (y / z)
	elif a <= 1.85e+68:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -3.65e-37)
		tmp = x;
	elseif (a <= 2.25e-262)
		tmp = t;
	elseif (a <= 1.25e-54)
		tmp = Float64(x * Float64(y / z));
	elseif (a <= 1.85e+68)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -3.65e-37)
		tmp = x;
	elseif (a <= 2.25e-262)
		tmp = t;
	elseif (a <= 1.25e-54)
		tmp = x * (y / z);
	elseif (a <= 1.85e+68)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.65e-37], x, If[LessEqual[a, 2.25e-262], t, If[LessEqual[a, 1.25e-54], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.85e+68], t, x]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.65 \cdot 10^{-37}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.25 \cdot 10^{-262}:\\
\;\;\;\;t\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{-54}:\\
\;\;\;\;x \cdot \frac{y}{z}\\

\mathbf{elif}\;a \leq 1.85 \cdot 10^{+68}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.6499999999999998e-37 or 1.84999999999999999e68 < a

    1. Initial program 74.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative74.6%

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

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

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

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

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

      \[\leadsto \color{blue}{x} \]

    if -3.6499999999999998e-37 < a < 2.24999999999999999e-262 or 1.25000000000000004e-54 < a < 1.84999999999999999e68

    1. Initial program 69.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt80.0%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow379.9%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr79.9%

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

      \[\leadsto \color{blue}{t} \]

    if 2.24999999999999999e-262 < a < 1.25000000000000004e-54

    1. Initial program 76.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative76.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt81.5%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow381.7%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    9. Simplified88.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot y}{a - z}} \]
    11. Step-by-step derivation
      1. mul-1-neg55.3%

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

        \[\leadsto -\color{blue}{x \cdot \frac{y}{a - z}} \]
      3. distribute-lft-neg-in57.6%

        \[\leadsto \color{blue}{\left(-x\right) \cdot \frac{y}{a - z}} \]
    12. Simplified57.6%

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}} \]
    14. Step-by-step derivation
      1. associate-/l*48.1%

        \[\leadsto \color{blue}{x \cdot \frac{y}{z}} \]
    15. Simplified48.1%

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

Alternative 11: 73.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+115} \lor \neg \left(y \leq 2.4 \cdot 10^{+90}\right):\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -5.8e+115) (not (<= y 2.4e+90)))
   (* y (/ (- t x) (- a z)))
   (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -5.8e+115) || !(y <= 2.4e+90)) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = x + (t * ((y - z) / (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.8d+115)) .or. (.not. (y <= 2.4d+90))) then
        tmp = y * ((t - x) / (a - z))
    else
        tmp = x + (t * ((y - z) / (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.8e+115) || !(y <= 2.4e+90)) {
		tmp = y * ((t - x) / (a - z));
	} else {
		tmp = x + (t * ((y - z) / (a - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -5.8e+115) or not (y <= 2.4e+90):
		tmp = y * ((t - x) / (a - z))
	else:
		tmp = x + (t * ((y - z) / (a - z)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -5.8e+115) || !(y <= 2.4e+90))
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	else
		tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((y <= -5.8e+115) || ~((y <= 2.4e+90)))
		tmp = y * ((t - x) / (a - z));
	else
		tmp = x + (t * ((y - z) / (a - z)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.8e+115], N[Not[LessEqual[y, 2.4e+90]], $MachinePrecision]], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+115} \lor \neg \left(y \leq 2.4 \cdot 10^{+90}\right):\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.80000000000000009e115 or 2.4000000000000001e90 < y

    1. Initial program 78.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative78.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt90.4%

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    9. Simplified82.6%

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

    if -5.80000000000000009e115 < y < 2.4000000000000001e90

    1. Initial program 70.4%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*80.6%

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 64.1%

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified73.1%

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

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

Alternative 12: 73.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+116}:\\ \;\;\;\;y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;y \leq 19000000000:\\ \;\;\;\;x + t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= y -5.6e+116)
   (* y (/ (- t x) (- a z)))
   (if (<= y 19000000000.0)
     (+ x (* t (/ (- y z) (- a z))))
     (+ x (/ y (/ (- a z) (- t x)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -5.6e+116) {
		tmp = y * ((t - x) / (a - z));
	} else if (y <= 19000000000.0) {
		tmp = x + (t * ((y - z) / (a - z)));
	} else {
		tmp = x + (y / ((a - z) / (t - x)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (y <= (-5.6d+116)) then
        tmp = y * ((t - x) / (a - z))
    else if (y <= 19000000000.0d0) then
        tmp = x + (t * ((y - z) / (a - z)))
    else
        tmp = x + (y / ((a - z) / (t - x)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (y <= -5.6e+116) {
		tmp = y * ((t - x) / (a - z));
	} else if (y <= 19000000000.0) {
		tmp = x + (t * ((y - z) / (a - z)));
	} else {
		tmp = x + (y / ((a - z) / (t - x)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if y <= -5.6e+116:
		tmp = y * ((t - x) / (a - z))
	elif y <= 19000000000.0:
		tmp = x + (t * ((y - z) / (a - z)))
	else:
		tmp = x + (y / ((a - z) / (t - x)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (y <= -5.6e+116)
		tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z)));
	elseif (y <= 19000000000.0)
		tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z))));
	else
		tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (y <= -5.6e+116)
		tmp = y * ((t - x) / (a - z));
	elseif (y <= 19000000000.0)
		tmp = x + (t * ((y - z) / (a - z)));
	else
		tmp = x + (y / ((a - z) / (t - x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.6e+116], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 19000000000.0], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+116}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;y \leq 19000000000:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.60000000000000009e116

    1. Initial program 73.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative73.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt89.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow389.8%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr89.8%

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

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

        \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
    9. Simplified87.5%

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

    if -5.60000000000000009e116 < y < 1.9e10

    1. Initial program 69.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*79.4%

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 63.4%

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified72.9%

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

    if 1.9e10 < y

    1. Initial program 81.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*91.4%

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num91.4%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    6. Applied egg-rr91.2%

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    7. Taylor expanded in y around inf 87.1%

      \[\leadsto x + \frac{\color{blue}{y}}{\frac{a - z}{t - x}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 60.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -7.4 \cdot 10^{-19} \lor \neg \left(x \leq 2.3 \cdot 10^{+45}\right):\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= x -7.4e-19) (not (<= x 2.3e+45)))
   (- x (* x (/ y a)))
   (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -7.4e-19) || !(x <= 2.3e+45)) {
		tmp = x - (x * (y / a));
	} else {
		tmp = t * ((y - z) / (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 ((x <= (-7.4d-19)) .or. (.not. (x <= 2.3d+45))) then
        tmp = x - (x * (y / a))
    else
        tmp = t * ((y - z) / (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 ((x <= -7.4e-19) || !(x <= 2.3e+45)) {
		tmp = x - (x * (y / a));
	} else {
		tmp = t * ((y - z) / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (x <= -7.4e-19) or not (x <= 2.3e+45):
		tmp = x - (x * (y / a))
	else:
		tmp = t * ((y - z) / (a - z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((x <= -7.4e-19) || !(x <= 2.3e+45))
		tmp = Float64(x - Float64(x * Float64(y / a)));
	else
		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((x <= -7.4e-19) || ~((x <= 2.3e+45)))
		tmp = x - (x * (y / a));
	else
		tmp = t * ((y - z) / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -7.4e-19], N[Not[LessEqual[x, 2.3e+45]], $MachinePrecision]], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.4 \cdot 10^{-19} \lor \neg \left(x \leq 2.3 \cdot 10^{+45}\right):\\
\;\;\;\;x - x \cdot \frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.40000000000000011e-19 or 2.30000000000000012e45 < x

    1. Initial program 64.3%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative64.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt82.5%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{x \cdot \frac{y - z}{a - z}} \]
    9. Simplified65.8%

      \[\leadsto \color{blue}{x - x \cdot \frac{y - z}{a - z}} \]
    10. Taylor expanded in z around 0 53.2%

      \[\leadsto x - \color{blue}{\frac{x \cdot y}{a}} \]
    11. Step-by-step derivation
      1. associate-/l*58.9%

        \[\leadsto x - \color{blue}{x \cdot \frac{y}{a}} \]
    12. Simplified58.9%

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

    if -7.40000000000000011e-19 < x < 2.30000000000000012e45

    1. Initial program 82.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative82.2%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt88.2%

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
      2. pow388.3%

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr88.3%

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    8. Step-by-step derivation
      1. div-sub70.8%

        \[\leadsto t \cdot \color{blue}{\frac{y - z}{a - z}} \]
    9. Simplified70.8%

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

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

Alternative 14: 54.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1200000000 \lor \neg \left(z \leq 8 \cdot 10^{+128}\right):\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1200000000.0) (not (<= z 8e+128)))
   (- t (/ (* x a) z))
   (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1200000000.0) || !(z <= 8e+128)) {
		tmp = t - ((x * a) / z);
	} else {
		tmp = x + (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 <= (-1200000000.0d0)) .or. (.not. (z <= 8d+128))) then
        tmp = t - ((x * a) / z)
    else
        tmp = x + (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 <= -1200000000.0) || !(z <= 8e+128)) {
		tmp = t - ((x * a) / z);
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1200000000.0) or not (z <= 8e+128):
		tmp = t - ((x * a) / z)
	else:
		tmp = x + (t * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1200000000.0) || !(z <= 8e+128))
		tmp = Float64(t - Float64(Float64(x * a) / z));
	else
		tmp = Float64(x + Float64(t * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1200000000.0) || ~((z <= 8e+128)))
		tmp = t - ((x * a) / z);
	else
		tmp = x + (t * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1200000000.0], N[Not[LessEqual[z, 8e+128]], $MachinePrecision]], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1200000000 \lor \neg \left(z \leq 8 \cdot 10^{+128}\right):\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2e9 or 8.0000000000000006e128 < z

    1. Initial program 39.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative39.2%

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

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

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

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

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

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

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

        \[\leadsto x + \left(-\color{blue}{z \cdot \frac{t - x}{a - z}}\right) \]
      3. distribute-lft-neg-out42.6%

        \[\leadsto x + \color{blue}{\left(-z\right) \cdot \frac{t - x}{a - z}} \]
      4. +-commutative42.6%

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

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(-z\right)} + x \]
      6. fma-define42.7%

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{a \cdot x - a \cdot t}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg49.7%

        \[\leadsto t + \color{blue}{\left(-\frac{a \cdot x - a \cdot t}{z}\right)} \]
      2. unsub-neg49.7%

        \[\leadsto \color{blue}{t - \frac{a \cdot x - a \cdot t}{z}} \]
      3. distribute-lft-out--50.1%

        \[\leadsto t - \frac{\color{blue}{a \cdot \left(x - t\right)}}{z} \]
    10. Simplified50.1%

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

      \[\leadsto t - \frac{\color{blue}{a \cdot x}}{z} \]
    12. Step-by-step derivation
      1. *-commutative48.9%

        \[\leadsto t - \frac{\color{blue}{x \cdot a}}{z} \]
    13. Simplified48.9%

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

    if -1.2e9 < z < 8.0000000000000006e128

    1. Initial program 91.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*93.5%

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 71.9%

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified74.1%

      \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Taylor expanded in z around 0 57.1%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. associate-/l*60.8%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified60.8%

      \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.5%

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

Alternative 15: 52.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.4 \cdot 10^{+53}:\\ \;\;\;\;t + a \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+128}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5.4e+53)
   (+ t (* a (/ t z)))
   (if (<= z 9e+128) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.4e+53) {
		tmp = t + (a * (t / z));
	} else if (z <= 9e+128) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-5.4d+53)) then
        tmp = t + (a * (t / z))
    else if (z <= 9d+128) then
        tmp = x + (t * (y / a))
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.4e+53) {
		tmp = t + (a * (t / z));
	} else if (z <= 9e+128) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5.4e+53:
		tmp = t + (a * (t / z))
	elif z <= 9e+128:
		tmp = x + (t * (y / a))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5.4e+53)
		tmp = Float64(t + Float64(a * Float64(t / z)));
	elseif (z <= 9e+128)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5.4e+53)
		tmp = t + (a * (t / z));
	elseif (z <= 9e+128)
		tmp = x + (t * (y / a));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.4e+53], N[(t + N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+128], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+53}:\\
\;\;\;\;t + a \cdot \frac{t}{z}\\

\mathbf{elif}\;z \leq 9 \cdot 10^{+128}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


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

    1. Initial program 33.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative33.6%

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

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

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

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

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

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

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

        \[\leadsto x + \left(-\color{blue}{z \cdot \frac{t - x}{a - z}}\right) \]
      3. distribute-lft-neg-out44.9%

        \[\leadsto x + \color{blue}{\left(-z\right) \cdot \frac{t - x}{a - z}} \]
      4. +-commutative44.9%

        \[\leadsto \color{blue}{\left(-z\right) \cdot \frac{t - x}{a - z} + x} \]
      5. *-commutative44.9%

        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(-z\right)} + x \]
      6. fma-define45.0%

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

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

      \[\leadsto \color{blue}{t + -1 \cdot \frac{a \cdot x - a \cdot t}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg48.7%

        \[\leadsto t + \color{blue}{\left(-\frac{a \cdot x - a \cdot t}{z}\right)} \]
      2. unsub-neg48.7%

        \[\leadsto \color{blue}{t - \frac{a \cdot x - a \cdot t}{z}} \]
      3. distribute-lft-out--49.3%

        \[\leadsto t - \frac{\color{blue}{a \cdot \left(x - t\right)}}{z} \]
    10. Simplified49.3%

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{a \cdot t}{z}} \]
    12. Step-by-step derivation
      1. sub-neg43.2%

        \[\leadsto \color{blue}{t + \left(--1 \cdot \frac{a \cdot t}{z}\right)} \]
      2. mul-1-neg43.2%

        \[\leadsto t + \left(-\color{blue}{\left(-\frac{a \cdot t}{z}\right)}\right) \]
      3. remove-double-neg43.2%

        \[\leadsto t + \color{blue}{\frac{a \cdot t}{z}} \]
      4. associate-/l*46.2%

        \[\leadsto t + \color{blue}{a \cdot \frac{t}{z}} \]
    13. Simplified46.2%

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

    if -5.40000000000000039e53 < z < 9.0000000000000003e128

    1. Initial program 91.0%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. associate-/l*92.6%

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 70.7%

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

        \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    7. Simplified72.8%

      \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
    8. Taylor expanded in z around 0 55.5%

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. associate-/l*59.0%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified59.0%

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

    if 9.0000000000000003e128 < z

    1. Initial program 37.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt72.2%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
    6. Applied egg-rr72.1%

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 16: 36.8% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{-39}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{+68}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -9.5e-39) x (if (<= a 2.6e+68) t x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -9.5e-39) {
		tmp = x;
	} else if (a <= 2.6e+68) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= (-9.5d-39)) then
        tmp = x
    else if (a <= 2.6d+68) then
        tmp = t
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -9.5e-39) {
		tmp = x;
	} else if (a <= 2.6e+68) {
		tmp = t;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -9.5e-39:
		tmp = x
	elif a <= 2.6e+68:
		tmp = t
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -9.5e-39)
		tmp = x;
	elseif (a <= 2.6e+68)
		tmp = t;
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -9.5e-39)
		tmp = x;
	elseif (a <= 2.6e+68)
		tmp = t;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e-39], x, If[LessEqual[a, 2.6e+68], t, x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{-39}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.6 \cdot 10^{+68}:\\
\;\;\;\;t\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -9.4999999999999999e-39 or 2.5999999999999998e68 < a

    1. Initial program 74.6%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative74.6%

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

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

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

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

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

      \[\leadsto \color{blue}{x} \]

    if -9.4999999999999999e-39 < a < 2.5999999999999998e68

    1. Initial program 71.9%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative71.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrt80.4%

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

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

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

      \[\leadsto \color{blue}{t} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 25.0% accurate, 13.0× speedup?

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

\\
t
\end{array}
Derivation
  1. Initial program 73.1%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. +-commutative73.1%

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. add-cube-cbrt85.3%

      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
    2. pow385.3%

      \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
  6. Applied egg-rr85.3%

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

    \[\leadsto \color{blue}{t} \]
  8. Add Preprocessing

Alternative 18: 2.8% accurate, 13.0× speedup?

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

\\
0
\end{array}
Derivation
  1. Initial program 73.1%

    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
  2. Step-by-step derivation
    1. +-commutative73.1%

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. add-cube-cbrt85.3%

      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}\right) \cdot \sqrt[3]{t - x}}, \frac{y - z}{a - z}, x\right) \]
    2. pow385.3%

      \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{t - x}\right)}^{3}}, \frac{y - z}{a - z}, x\right) \]
  6. Applied egg-rr85.3%

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

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

      \[\leadsto x + \color{blue}{\left(-\frac{x \cdot \left(y - z\right)}{a - z}\right)} \]
    2. unsub-neg42.4%

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

      \[\leadsto x - \color{blue}{x \cdot \frac{y - z}{a - z}} \]
  9. Simplified46.8%

    \[\leadsto \color{blue}{x - x \cdot \frac{y - z}{a - z}} \]
  10. Taylor expanded in z around inf 2.7%

    \[\leadsto x - x \cdot \color{blue}{1} \]
  11. Taylor expanded in x around 0 2.7%

    \[\leadsto \color{blue}{0} \]
  12. Add Preprocessing

Developer Target 1: 83.6% 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 2024170 
(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))))