Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A

Percentage Accurate: 85.7% → 98.7%
Time: 9.8s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

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

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

Alternative 1: 98.7% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+210}:\\
\;\;\;\;x + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -4e177

    1. Initial program 37.2%

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

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

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

    if -4e177 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 4.9999999999999998e210

    1. Initial program 99.8%

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

    if 4.9999999999999998e210 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 50.5%

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

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

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

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

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

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

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

Alternative 2: 98.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(y - z\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+177} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+226}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -4e177 or 1.99999999999999992e226 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 42.2%

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

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

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

    if -4e177 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 1.99999999999999992e226

    1. Initial program 99.8%

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

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

Alternative 3: 76.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := x - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+156}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq -1.85 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 8.5 \cdot 10^{-66}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

\mathbf{elif}\;z \leq 1.95 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.09999999999999981e156 or 1.65000000000000007e44 < z

    1. Initial program 75.4%

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

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

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

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

    if -2.09999999999999981e156 < z < -1.85e53 or 8.49999999999999966e-66 < z < 1.95e39

    1. Initial program 92.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    10. Simplified79.5%

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

    if -1.85e53 < z < 8.49999999999999966e-66

    1. Initial program 95.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. +-commutative68.3%

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

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
      3. *-commutative70.3%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} + x \]
    9. Simplified70.3%

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

    if 1.95e39 < z < 1.65000000000000007e44

    1. Initial program 69.1%

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

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. +-commutative69.1%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified99.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+156}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -1.85 \cdot 10^{+53}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-66}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+39}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+44}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.65 \cdot 10^{+156}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+52}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-89}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+37}:\\ \;\;\;\;x - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq 1.66 \cdot 10^{+44}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.65e+156)
   (+ x t)
   (if (<= z -7.2e+52)
     (- x (* t (/ y z)))
     (if (<= z 1.55e-89)
       (+ x (* y (/ t a)))
       (if (<= z 3.7e+37)
         (- x (/ (* t y) z))
         (if (<= z 1.66e+44) (+ x (* t (/ y a))) (+ x t)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.65e+156) {
		tmp = x + t;
	} else if (z <= -7.2e+52) {
		tmp = x - (t * (y / z));
	} else if (z <= 1.55e-89) {
		tmp = x + (y * (t / a));
	} else if (z <= 3.7e+37) {
		tmp = x - ((t * y) / z);
	} else if (z <= 1.66e+44) {
		tmp = x + (t * (y / a));
	} else {
		tmp = x + 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 <= (-2.65d+156)) then
        tmp = x + t
    else if (z <= (-7.2d+52)) then
        tmp = x - (t * (y / z))
    else if (z <= 1.55d-89) then
        tmp = x + (y * (t / a))
    else if (z <= 3.7d+37) then
        tmp = x - ((t * y) / z)
    else if (z <= 1.66d+44) then
        tmp = x + (t * (y / a))
    else
        tmp = x + 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 <= -2.65e+156) {
		tmp = x + t;
	} else if (z <= -7.2e+52) {
		tmp = x - (t * (y / z));
	} else if (z <= 1.55e-89) {
		tmp = x + (y * (t / a));
	} else if (z <= 3.7e+37) {
		tmp = x - ((t * y) / z);
	} else if (z <= 1.66e+44) {
		tmp = x + (t * (y / a));
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.65e+156:
		tmp = x + t
	elif z <= -7.2e+52:
		tmp = x - (t * (y / z))
	elif z <= 1.55e-89:
		tmp = x + (y * (t / a))
	elif z <= 3.7e+37:
		tmp = x - ((t * y) / z)
	elif z <= 1.66e+44:
		tmp = x + (t * (y / a))
	else:
		tmp = x + t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.65e+156)
		tmp = Float64(x + t);
	elseif (z <= -7.2e+52)
		tmp = Float64(x - Float64(t * Float64(y / z)));
	elseif (z <= 1.55e-89)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif (z <= 3.7e+37)
		tmp = Float64(x - Float64(Float64(t * y) / z));
	elseif (z <= 1.66e+44)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	else
		tmp = Float64(x + t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.65e+156)
		tmp = x + t;
	elseif (z <= -7.2e+52)
		tmp = x - (t * (y / z));
	elseif (z <= 1.55e-89)
		tmp = x + (y * (t / a));
	elseif (z <= 3.7e+37)
		tmp = x - ((t * y) / z);
	elseif (z <= 1.66e+44)
		tmp = x + (t * (y / a));
	else
		tmp = x + t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.65e+156], N[(x + t), $MachinePrecision], If[LessEqual[z, -7.2e+52], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-89], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+37], N[(x - N[(N[(t * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.66e+44], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.65 \cdot 10^{+156}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;z \leq 1.55 \cdot 10^{-89}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

\mathbf{elif}\;z \leq 3.7 \cdot 10^{+37}:\\
\;\;\;\;x - \frac{t \cdot y}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -2.6499999999999999e156 or 1.65999999999999992e44 < z

    1. Initial program 75.4%

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

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

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

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

    if -2.6499999999999999e156 < z < -7.2e52

    1. Initial program 86.3%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y - z}{z}} \]
    7. Simplified85.2%

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

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

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

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

    if -7.2e52 < z < 1.54999999999999998e-89

    1. Initial program 95.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. +-commutative68.5%

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

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

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

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

    if 1.54999999999999998e-89 < z < 3.6999999999999999e37

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

    if 3.6999999999999999e37 < z < 1.65999999999999992e44

    1. Initial program 69.1%

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

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. +-commutative69.1%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified99.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.65 \cdot 10^{+156}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{+52}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-89}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+37}:\\ \;\;\;\;x - \frac{t \cdot y}{z}\\ \mathbf{elif}\;z \leq 1.66 \cdot 10^{+44}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(t - t \cdot \frac{y}{z}\right)\\ \mathbf{if}\;z \leq -1.85 \cdot 10^{+53}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-29}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-50} \lor \neg \left(z \leq 3 \cdot 10^{-43}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t \cdot y}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (- t (* t (/ y z))))))
   (if (<= z -1.85e+53)
     t_1
     (if (<= z -1.45e-29)
       (+ x (* (- y z) (/ t a)))
       (if (or (<= z -4.5e-50) (not (<= z 3e-43)))
         t_1
         (+ x (/ (* t y) (- a z))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t - (t * (y / z)));
	double tmp;
	if (z <= -1.85e+53) {
		tmp = t_1;
	} else if (z <= -1.45e-29) {
		tmp = x + ((y - z) * (t / a));
	} else if ((z <= -4.5e-50) || !(z <= 3e-43)) {
		tmp = t_1;
	} else {
		tmp = x + ((t * y) / (a - z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (t - (t * (y / z)))
    if (z <= (-1.85d+53)) then
        tmp = t_1
    else if (z <= (-1.45d-29)) then
        tmp = x + ((y - z) * (t / a))
    else if ((z <= (-4.5d-50)) .or. (.not. (z <= 3d-43))) then
        tmp = t_1
    else
        tmp = x + ((t * y) / (a - z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t - (t * (y / z)));
	double tmp;
	if (z <= -1.85e+53) {
		tmp = t_1;
	} else if (z <= -1.45e-29) {
		tmp = x + ((y - z) * (t / a));
	} else if ((z <= -4.5e-50) || !(z <= 3e-43)) {
		tmp = t_1;
	} else {
		tmp = x + ((t * y) / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t - (t * (y / z)))
	tmp = 0
	if z <= -1.85e+53:
		tmp = t_1
	elif z <= -1.45e-29:
		tmp = x + ((y - z) * (t / a))
	elif (z <= -4.5e-50) or not (z <= 3e-43):
		tmp = t_1
	else:
		tmp = x + ((t * y) / (a - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t - Float64(t * Float64(y / z))))
	tmp = 0.0
	if (z <= -1.85e+53)
		tmp = t_1;
	elseif (z <= -1.45e-29)
		tmp = Float64(x + Float64(Float64(y - z) * Float64(t / a)));
	elseif ((z <= -4.5e-50) || !(z <= 3e-43))
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(t * y) / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t - (t * (y / z)));
	tmp = 0.0;
	if (z <= -1.85e+53)
		tmp = t_1;
	elseif (z <= -1.45e-29)
		tmp = x + ((y - z) * (t / a));
	elseif ((z <= -4.5e-50) || ~((z <= 3e-43)))
		tmp = t_1;
	else
		tmp = x + ((t * y) / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+53], t$95$1, If[LessEqual[z, -1.45e-29], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -4.5e-50], N[Not[LessEqual[z, 3e-43]], $MachinePrecision]], t$95$1, N[(x + N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-50} \lor \neg \left(z \leq 3 \cdot 10^{-43}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.85e53 or -1.45000000000000012e-29 < z < -4.49999999999999962e-50 or 3.00000000000000003e-43 < z

    1. Initial program 81.0%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{-t}{z}} \]
      6. distribute-frac-neg77.9%

        \[\leadsto x + \left(y - z\right) \cdot \color{blue}{\left(-\frac{t}{z}\right)} \]
      7. distribute-neg-frac277.9%

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

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

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

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

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

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

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

    if -1.85e53 < z < -1.45000000000000012e-29

    1. Initial program 86.6%

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

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

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

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

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

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

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

    if -4.49999999999999962e-50 < z < 3.00000000000000003e-43

    1. Initial program 97.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+53}:\\ \;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq -1.45 \cdot 10^{-29}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-50} \lor \neg \left(z \leq 3 \cdot 10^{-43}\right):\\ \;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t \cdot y}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 78.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+155}:\\
\;\;\;\;x + t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.5000000000000001e155 or 1.95e40 < z

    1. Initial program 75.9%

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

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

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

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

    if -5.5000000000000001e155 < z < -4.2000000000000004e53

    1. Initial program 86.3%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y - z}{z}} \]
    7. Simplified85.2%

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

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

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

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

    if -4.2000000000000004e53 < z < 1.95e40

    1. Initial program 95.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+155}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+53}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{+40}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 83.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+52} \lor \neg \left(z \leq 3.4 \cdot 10^{-65}\right):\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.2e52 or 3.39999999999999987e-65 < z

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \left(t - \color{blue}{t \cdot \frac{y}{z}}\right) \]
    10. Simplified83.9%

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

    if -7.2e52 < z < 3.39999999999999987e-65

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

Alternative 8: 85.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.09999999999999973e-51 or 2.40000000000000013e44 < z

    1. Initial program 79.6%

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot z}{a - z}} \]
      3. associate-/l*85.9%

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

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

    if -4.09999999999999973e-51 < z < 2.40000000000000013e44

    1. Initial program 96.6%

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

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

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

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

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

Alternative 9: 85.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-50} \lor \neg \left(z \leq 2.15 \cdot 10^{+44}\right):\\
\;\;\;\;x + \frac{t}{1 - \frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2000000000000002e-50 or 2.14999999999999991e44 < z

    1. Initial program 79.6%

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot z}{a - z}} \]
      3. associate-/l*85.9%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{a - z} \cdot \frac{z}{1}} \]
      3. /-rgt-identity81.8%

        \[\leadsto x - \frac{t}{a - z} \cdot \color{blue}{z} \]
      4. associate-/r/85.9%

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      5. div-sub86.0%

        \[\leadsto x - \frac{t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      6. sub-neg86.0%

        \[\leadsto x - \frac{t}{\color{blue}{\frac{a}{z} + \left(-\frac{z}{z}\right)}} \]
      7. *-inverses86.0%

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

        \[\leadsto x - \frac{t}{\frac{a}{z} + \color{blue}{-1}} \]
    10. Simplified86.0%

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

    if -4.2000000000000002e-50 < z < 2.14999999999999991e44

    1. Initial program 96.6%

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

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

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

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

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

Alternative 10: 75.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-51} \lor \neg \left(z \leq 1.7 \cdot 10^{+44}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.4999999999999997e-51 or 1.7e44 < z

    1. Initial program 79.6%

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

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

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

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

    if -3.4999999999999997e-51 < z < 1.7e44

    1. Initial program 96.6%

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

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

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

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

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

Alternative 11: 76.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-52} \lor \neg \left(z \leq 1.65 \cdot 10^{+44}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5e-52 or 1.65000000000000007e44 < z

    1. Initial program 79.6%

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

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

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

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

    if -2.5e-52 < z < 1.65000000000000007e44

    1. Initial program 96.6%

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

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    6. Step-by-step derivation
      1. +-commutative70.0%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    7. Simplified71.6%

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

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

Alternative 12: 76.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-50} \lor \neg \left(z \leq 1.65 \cdot 10^{+44}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.49999999999999984e-50 or 1.65000000000000007e44 < z

    1. Initial program 79.6%

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

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

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

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

    if -2.49999999999999984e-50 < z < 1.65000000000000007e44

    1. Initial program 96.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
    8. Step-by-step derivation
      1. +-commutative70.0%

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

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} + x \]
      3. *-commutative71.9%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} + x \]
    9. Simplified71.9%

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

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

Alternative 13: 98.1% accurate, 0.8× speedup?

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

\\
x + t \cdot \left(\frac{1}{a - z} \cdot \left(y - z\right)\right)
\end{array}
Derivation
  1. Initial program 87.5%

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

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

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

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

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

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

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

Alternative 14: 60.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.3 \cdot 10^{+96}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.29999999999999984e96

    1. Initial program 92.0%

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

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

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

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

    if 3.29999999999999984e96 < t

    1. Initial program 63.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a} + \frac{t \cdot y}{a}} \]
    10. Step-by-step derivation
      1. mul-1-neg34.5%

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

        \[\leadsto \color{blue}{\frac{t \cdot z}{-a}} + \frac{t \cdot y}{a} \]
      3. associate-*r/41.9%

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

        \[\leadsto \color{blue}{\frac{z}{-a} \cdot t} + \frac{t \cdot y}{a} \]
      5. associate-*r/44.3%

        \[\leadsto \frac{z}{-a} \cdot t + \color{blue}{t \cdot \frac{y}{a}} \]
      6. *-commutative44.3%

        \[\leadsto \frac{z}{-a} \cdot t + \color{blue}{\frac{y}{a} \cdot t} \]
      7. distribute-rgt-in44.6%

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

        \[\leadsto t \cdot \color{blue}{\left(\frac{y}{a} + \frac{z}{-a}\right)} \]
      9. distribute-frac-neg244.6%

        \[\leadsto t \cdot \left(\frac{y}{a} + \color{blue}{\left(-\frac{z}{a}\right)}\right) \]
      10. sub-neg44.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.3 \cdot 10^{+96}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 95.6% accurate, 1.0× speedup?

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

\\
x + \left(y - z\right) \cdot \frac{t}{a - z}
\end{array}
Derivation
  1. Initial program 87.5%

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

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

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

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

Alternative 16: 62.4% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.9 \cdot 10^{+159}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.90000000000000014e159

    1. Initial program 87.8%

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

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

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

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

    if 2.90000000000000014e159 < a

    1. Initial program 85.2%

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.9 \cdot 10^{+159}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 50.9% accurate, 11.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 87.5%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification50.5%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024078 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
  :precision binary64

  :alt
  (if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))

  (+ x (/ (* (- y z) t) (- a z))))