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

Percentage Accurate: 85.2% → 98.4%
Time: 12.9s
Alternatives: 13
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 13 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.2% 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.4% accurate, 1.0× speedup?

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

\\
x + \frac{y - z}{a - z} \cdot t
\end{array}
Derivation
  1. Initial program 88.6%

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

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

    \[\leadsto \color{blue}{x + \frac{y - z}{a - z} \cdot t} \]
  4. Add Preprocessing
  5. Final simplification98.0%

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

Alternative 2: 86.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{t}{\frac{a}{z} + -1}\\ t_2 := \frac{t}{a - z}\\ \mathbf{if}\;z \leq -7.6 \cdot 10^{+118}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-53}:\\ \;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+20}:\\ \;\;\;\;x - z \cdot t_2\\ \mathbf{elif}\;z \leq 8.1 \cdot 10^{+114}:\\ \;\;\;\;x + y \cdot t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ t (+ (/ a z) -1.0)))) (t_2 (/ t (- a z))))
   (if (<= z -7.6e+118)
     t_1
     (if (<= z 6.8e-53)
       (+ x (/ t (/ (- a z) y)))
       (if (<= z 7.2e+20)
         (- x (* z t_2))
         (if (<= z 8.1e+114) (+ x (* y t_2)) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (t / ((a / z) + -1.0));
	double t_2 = t / (a - z);
	double tmp;
	if (z <= -7.6e+118) {
		tmp = t_1;
	} else if (z <= 6.8e-53) {
		tmp = x + (t / ((a - z) / y));
	} else if (z <= 7.2e+20) {
		tmp = x - (z * t_2);
	} else if (z <= 8.1e+114) {
		tmp = x + (y * 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 - (t / ((a / z) + (-1.0d0)))
    t_2 = t / (a - z)
    if (z <= (-7.6d+118)) then
        tmp = t_1
    else if (z <= 6.8d-53) then
        tmp = x + (t / ((a - z) / y))
    else if (z <= 7.2d+20) then
        tmp = x - (z * t_2)
    else if (z <= 8.1d+114) then
        tmp = x + (y * 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 - (t / ((a / z) + -1.0));
	double t_2 = t / (a - z);
	double tmp;
	if (z <= -7.6e+118) {
		tmp = t_1;
	} else if (z <= 6.8e-53) {
		tmp = x + (t / ((a - z) / y));
	} else if (z <= 7.2e+20) {
		tmp = x - (z * t_2);
	} else if (z <= 8.1e+114) {
		tmp = x + (y * t_2);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (t / ((a / z) + -1.0))
	t_2 = t / (a - z)
	tmp = 0
	if z <= -7.6e+118:
		tmp = t_1
	elif z <= 6.8e-53:
		tmp = x + (t / ((a - z) / y))
	elif z <= 7.2e+20:
		tmp = x - (z * t_2)
	elif z <= 8.1e+114:
		tmp = x + (y * t_2)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(t / Float64(Float64(a / z) + -1.0)))
	t_2 = Float64(t / Float64(a - z))
	tmp = 0.0
	if (z <= -7.6e+118)
		tmp = t_1;
	elseif (z <= 6.8e-53)
		tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y)));
	elseif (z <= 7.2e+20)
		tmp = Float64(x - Float64(z * t_2));
	elseif (z <= 8.1e+114)
		tmp = Float64(x + Float64(y * t_2));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (t / ((a / z) + -1.0));
	t_2 = t / (a - z);
	tmp = 0.0;
	if (z <= -7.6e+118)
		tmp = t_1;
	elseif (z <= 6.8e-53)
		tmp = x + (t / ((a - z) / y));
	elseif (z <= 7.2e+20)
		tmp = x - (z * t_2);
	elseif (z <= 8.1e+114)
		tmp = x + (y * t_2);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.6e+118], t$95$1, If[LessEqual[z, 6.8e-53], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+20], N[(x - N[(z * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.1e+114], N[(x + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{t}{\frac{a}{z} + -1}\\
t_2 := \frac{t}{a - z}\\
\mathbf{if}\;z \leq -7.6 \cdot 10^{+118}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 7.2 \cdot 10^{+20}:\\
\;\;\;\;x - z \cdot t_2\\

\mathbf{elif}\;z \leq 8.1 \cdot 10^{+114}:\\
\;\;\;\;x + y \cdot t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.60000000000000033e118 or 8.1000000000000001e114 < z

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z \cdot t}{a - z}} \]
      6. *-commutative74.1%

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - z}{z}}} \]
      8. div-sub98.7%

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

        \[\leadsto x - \frac{t}{\frac{a}{z} - \color{blue}{1}} \]
    7. Simplified98.7%

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

    if -7.60000000000000033e118 < z < 6.8e-53

    1. Initial program 94.7%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \cdot t \]
      2. associate-/r/96.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    9. Simplified90.4%

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

    if 6.8e-53 < z < 7.2e20

    1. Initial program 95.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z} + x} \]
      2. mul-1-neg83.4%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{a - z} \cdot z} \]
    11. Applied egg-rr83.5%

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

    if 7.2e20 < z < 8.1000000000000001e114

    1. Initial program 93.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.6 \cdot 10^{+118}:\\ \;\;\;\;x - \frac{t}{\frac{a}{z} + -1}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{-53}:\\ \;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{+20}:\\ \;\;\;\;x - z \cdot \frac{t}{a - z}\\ \mathbf{elif}\;z \leq 8.1 \cdot 10^{+114}:\\ \;\;\;\;x + y \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t}{\frac{a}{z} + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 77.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -1 \cdot 10^{-29}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\

\mathbf{elif}\;z \leq -8.8 \cdot 10^{-79}:\\
\;\;\;\;x - \frac{z \cdot t}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.79999999999999973e118 or 6.6000000000000001e-45 < z

    1. Initial program 80.4%

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

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

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

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

    if -6.79999999999999973e118 < z < -9.99999999999999943e-30

    1. Initial program 94.4%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \cdot t \]
      2. associate-/r/99.9%

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    9. Simplified92.8%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{z}} \]
    11. Step-by-step derivation
      1. +-commutative71.1%

        \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z} + x} \]
      2. associate-*r/71.1%

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot t}}{z} + x \]
      5. distribute-rgt-neg-in71.1%

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

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{t \cdot y}{z}} \]
    14. Step-by-step derivation
      1. mul-1-neg71.1%

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

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

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

        \[\leadsto \color{blue}{x - t \cdot \frac{y}{z}} \]
    15. Simplified73.6%

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

    if -9.99999999999999943e-30 < z < -8.7999999999999995e-79

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z \cdot t}{a - z}} \]
      6. *-commutative91.7%

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

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

        \[\leadsto x - \frac{t}{\color{blue}{\frac{a}{z} - \frac{z}{z}}} \]
      9. *-inverses83.5%

        \[\leadsto x - \frac{t}{\frac{a}{z} - \color{blue}{1}} \]
    7. Simplified83.5%

      \[\leadsto \color{blue}{x - \frac{t}{\frac{a}{z} - 1}} \]
    8. Taylor expanded in a around inf 83.3%

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

    if -8.7999999999999995e-79 < z < 6.6000000000000001e-45

    1. Initial program 94.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+118}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-29}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-79}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq 6.6 \cdot 10^{-45}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 61.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 4.9 \cdot 10^{-256}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.80000000000000002e74 or 5.00000000000000011e-92 < z

    1. Initial program 82.3%

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

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

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

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

    if -2.80000000000000002e74 < z < 4.89999999999999996e-256

    1. Initial program 95.1%

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

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

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

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

    if 4.89999999999999996e-256 < z < 5.00000000000000011e-92

    1. Initial program 94.1%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
    3. Simplified93.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 88.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+74}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{-256}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-92}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 61.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.9 \cdot 10^{-256}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.95000000000000004e74 or 6.00000000000000027e-92 < z

    1. Initial program 82.3%

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

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

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

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

    if -1.95000000000000004e74 < z < 1.89999999999999988e-256

    1. Initial program 95.1%

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

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

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

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

    if 1.89999999999999988e-256 < z < 6.00000000000000027e-92

    1. Initial program 94.1%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
    3. Simplified93.9%

      \[\leadsto \color{blue}{x + \frac{y - z}{\frac{a - z}{t}}} \]
    4. Add Preprocessing
    5. Taylor expanded in a around inf 88.0%

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

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

      \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]
    8. Step-by-step derivation
      1. clear-num53.2%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv53.3%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    9. Applied egg-rr53.3%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+74}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-256}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-92}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 84.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+121} \lor \neg \left(z \leq 1.5 \cdot 10^{+117}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0500000000000001e121 or 1.5e117 < z

    1. Initial program 74.1%

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

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

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

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

    if -1.0500000000000001e121 < z < 1.5e117

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

Alternative 7: 87.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+118} \lor \neg \left(z \leq 3.5 \cdot 10^{+99}\right):\\
\;\;\;\;x + \frac{t}{\frac{z}{z - y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.79999999999999973e118 or 3.4999999999999998e99 < z

    1. Initial program 74.7%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{z}{z - y}}} \]
    10. Simplified87.2%

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

    if -6.79999999999999973e118 < z < 3.4999999999999998e99

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

Alternative 8: 87.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3000000000000001e119 or 3.4999999999999998e90 < z

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{z}{z - y}}} \]
    10. Simplified87.3%

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

    if -2.3000000000000001e119 < z < 3.4999999999999998e90

    1. Initial program 94.6%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \cdot t \]
      2. associate-/r/97.2%

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

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

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

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

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

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

Alternative 9: 86.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq 5 \cdot 10^{-36}:\\
\;\;\;\;x - z \cdot t_1\\

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


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

    1. Initial program 82.6%

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

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

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

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

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

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

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

    if -1.42000000000000007e41 < y < 5.00000000000000004e-36

    1. Initial program 93.0%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \cdot t \]
      2. associate-/r/98.4%

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot z}{a - z} + x} \]
      2. mul-1-neg84.9%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{a - z} \cdot z} \]
    11. Applied egg-rr89.7%

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

    if 5.00000000000000004e-36 < y

    1. Initial program 84.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{a - z}{y - z}}} \cdot t \]
      2. associate-/r/98.6%

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

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

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

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

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

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

Alternative 10: 76.8% accurate, 0.6× speedup?

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

    1. Initial program 80.9%

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

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

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

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

    if -9.0000000000000004e101 < z < 6.6000000000000001e-45

    1. Initial program 94.7%

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

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

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

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

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

Alternative 11: 77.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+101} \lor \neg \left(z \leq 5.8 \cdot 10^{-45}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.1999999999999999e101 or 5.8e-45 < z

    1. Initial program 80.9%

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

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

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

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

    if -8.1999999999999999e101 < z < 5.8e-45

    1. Initial program 94.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    7. Simplified77.3%

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

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

Alternative 12: 63.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+74} \lor \neg \left(z \leq 5.55 \cdot 10^{-45}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.19999999999999995e74 or 5.55e-45 < z

    1. Initial program 81.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}{\frac{y - z}{a - z} \cdot t} \]
    3. Simplified99.9%

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

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

    if -3.19999999999999995e74 < z < 5.55e-45

    1. Initial program 95.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+74} \lor \neg \left(z \leq 5.55 \cdot 10^{-45}\right):\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 51.1% 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 88.6%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification51.1%

    \[\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 2024019 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
  :precision binary64

  :herbie-target
  (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))))