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

Percentage Accurate: 85.7% → 95.7%
Time: 9.5s
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.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: 95.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

Alternative 2: 77.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - t \cdot \frac{y}{z}\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{+87}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -7500000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-53}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \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 -3.7e+87)
     (+ x t)
     (if (<= z -7500000.0)
       t_1
       (if (<= z 5.6e-53)
         (+ x (* y (/ t a)))
         (if (<= z 5.4e+44) t_1 (+ 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 <= -3.7e+87) {
		tmp = x + t;
	} else if (z <= -7500000.0) {
		tmp = t_1;
	} else if (z <= 5.6e-53) {
		tmp = x + (y * (t / a));
	} else if (z <= 5.4e+44) {
		tmp = t_1;
	} 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 <= (-3.7d+87)) then
        tmp = x + t
    else if (z <= (-7500000.0d0)) then
        tmp = t_1
    else if (z <= 5.6d-53) then
        tmp = x + (y * (t / a))
    else if (z <= 5.4d+44) then
        tmp = t_1
    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 <= -3.7e+87) {
		tmp = x + t;
	} else if (z <= -7500000.0) {
		tmp = t_1;
	} else if (z <= 5.6e-53) {
		tmp = x + (y * (t / a));
	} else if (z <= 5.4e+44) {
		tmp = t_1;
	} else {
		tmp = x + t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (t * (y / z))
	tmp = 0
	if z <= -3.7e+87:
		tmp = x + t
	elif z <= -7500000.0:
		tmp = t_1
	elif z <= 5.6e-53:
		tmp = x + (y * (t / a))
	elif z <= 5.4e+44:
		tmp = t_1
	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 <= -3.7e+87)
		tmp = Float64(x + t);
	elseif (z <= -7500000.0)
		tmp = t_1;
	elseif (z <= 5.6e-53)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif (z <= 5.4e+44)
		tmp = t_1;
	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 <= -3.7e+87)
		tmp = x + t;
	elseif (z <= -7500000.0)
		tmp = t_1;
	elseif (z <= 5.6e-53)
		tmp = x + (y * (t / a));
	elseif (z <= 5.4e+44)
		tmp = t_1;
	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, -3.7e+87], N[(x + t), $MachinePrecision], If[LessEqual[z, -7500000.0], t$95$1, If[LessEqual[z, 5.6e-53], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+44], t$95$1, N[(x + t), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -7500000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 5.4 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.70000000000000003e87 or 5.4e44 < z

    1. Initial program 72.0%

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

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

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

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

    if -3.70000000000000003e87 < z < -7.5e6 or 5.59999999999999971e-53 < z < 5.4e44

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    12. Simplified74.4%

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

    if -7.5e6 < z < 5.59999999999999971e-53

    1. Initial program 96.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot y} \]
      2. *-commutative81.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{+87}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -7500000:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{-53}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 5.4 \cdot 10^{+44}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 77.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;z \leq -1600000:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 7 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.0000000000000001e85 or 7.0000000000000002e43 < z

    1. Initial program 72.0%

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

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

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

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

    if -5.0000000000000001e85 < z < -1.6e6 or 5e-53 < z < 7.0000000000000002e43

    1. Initial program 92.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-z}} \]
    12. Simplified74.4%

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

    if -1.6e6 < z < 5e-53

    1. Initial program 96.0%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot y} \]
      2. *-commutative81.6%

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

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

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

Alternative 4: 59.2% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq 3.9 \cdot 10^{-103}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.5000000000000001e-74 or 4.70000000000000004e-67 < z

    1. Initial program 79.3%

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

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

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

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

    if -5.5000000000000001e-74 < z < 2.39999999999999993e-222

    1. Initial program 98.5%

      \[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 0 85.8%

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

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

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

    if 2.39999999999999993e-222 < z < 3.9000000000000002e-103

    1. Initial program 99.9%

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

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

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

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

    if 3.9000000000000002e-103 < z < 4.70000000000000004e-67

    1. Initial program 73.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. Taylor expanded in z around 0 73.5%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      2. div-inv72.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-74}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-222}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-103}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-67}:\\ \;\;\;\;\frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+84} \lor \neg \left(z \leq 6.8 \cdot 10^{+113}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.3999999999999997e84 or 6.80000000000000038e113 < z

    1. Initial program 67.8%

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

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

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

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

    if -4.3999999999999997e84 < z < 6.80000000000000038e113

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 84.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+86} \lor \neg \left(z \leq 2.2 \cdot 10^{+110}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.84999999999999996e86 or 2.19999999999999992e110 < z

    1. Initial program 67.8%

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

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

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

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

    if -1.84999999999999996e86 < z < 2.19999999999999992e110

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 87.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.05000000000000001e-96

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

    if -1.05000000000000001e-96 < y < 5.4000000000000001e72

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

    if 5.4000000000000001e72 < y

    1. Initial program 86.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}{\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. Step-by-step derivation
      1. clear-num99.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 77.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -12.5 \lor \neg \left(z \leq 5600000000000\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 -12.5) (not (<= z 5600000000000.0)))
   (+ x t)
   (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -12.5) || !(z <= 5600000000000.0)) {
		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 <= (-12.5d0)) .or. (.not. (z <= 5600000000000.0d0))) 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 <= -12.5) || !(z <= 5600000000000.0)) {
		tmp = x + t;
	} else {
		tmp = x + (y * (t / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -12.5) or not (z <= 5600000000000.0):
		tmp = x + t
	else:
		tmp = x + (y * (t / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -12.5) || !(z <= 5600000000000.0))
		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 <= -12.5) || ~((z <= 5600000000000.0)))
		tmp = x + t;
	else
		tmp = x + (y * (t / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -12.5], N[Not[LessEqual[z, 5600000000000.0]], $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 -12.5 \lor \neg \left(z \leq 5600000000000\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 < -12.5 or 5.6e12 < z

    1. Initial program 74.7%

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

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

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

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

    if -12.5 < z < 5.6e12

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 59.3% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4999999999999999e-74 or 2.3999999999999999e-256 < z

    1. Initial program 82.0%

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

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

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

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

    if -4.4999999999999999e-74 < z < 2.3999999999999999e-256

    1. Initial program 98.3%

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

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

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

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

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

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

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

Alternative 10: 61.0% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.1000000000000001e-171 or 2.5000000000000001e-220 < z

    1. Initial program 82.6%

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

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

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

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

    if -1.1000000000000001e-171 < z < 2.5000000000000001e-220

    1. Initial program 99.8%

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\frac{t}{a}} \]
    8. Step-by-step derivation
      1. associate-*r/58.4%

        \[\leadsto \color{blue}{\frac{y \cdot t}{a}} \]
    9. Applied egg-rr58.4%

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

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

Alternative 11: 63.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{+117}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 4 \cdot 10^{+16}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.8999999999999999e117 or 4e16 < a

    1. Initial program 86.4%

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

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

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

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

    if -3.8999999999999999e117 < a < 4e16

    1. Initial program 85.8%

      \[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 z around inf 59.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.9 \cdot 10^{+117}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+16}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 95.8% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 13: 51.2% 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 86.0%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification45.2%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.1% 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 2024071 
(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))))