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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y - z}}} \]
  10. Final simplification98.9%

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

Alternative 2: 76.5% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.5000000000000001e90 or 2.7500000000000001e22 < z

    1. Initial program 73.3%

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

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

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

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

    if -6.5000000000000001e90 < z < -7.99999999999999954e-67

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{t}{\color{blue}{-\frac{z}{y}}} \]
      2. distribute-neg-frac275.4%

        \[\leadsto x + \frac{t}{\color{blue}{\frac{z}{-y}}} \]
    13. Simplified75.4%

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

    if -7.99999999999999954e-67 < z < 2.7500000000000001e22

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+90}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-67}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3e91 or 9.49999999999999937e22 < z

    1. Initial program 73.3%

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

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

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

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

    if -1.3e91 < z < -1.69999999999999999e-66

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

    if -1.69999999999999999e-66 < z < 9.49999999999999937e22

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 87.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-39} \lor \neg \left(y \leq 4.2 \cdot 10^{-85}\right):\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.29999999999999985e-39 or 4.2e-85 < y

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999985e-39 < y < 4.2e-85

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{z}{a - z}} \]
    10. Simplified94.0%

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

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

Alternative 5: 86.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-40} \lor \neg \left(y \leq 4.8 \cdot 10^{-85}\right):\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.55000000000000005e-40 or 4.8000000000000001e-85 < y

    1. Initial program 87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55000000000000005e-40 < y < 4.8000000000000001e-85

    1. Initial program 86.9%

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot z}}{a - z} \]
      3. distribute-rgt-neg-out82.0%

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

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

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

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

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

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

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

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

        \[\leadsto x + z \cdot \frac{t}{0 - \color{blue}{\left(\left(-z\right) + a\right)}} \]
      12. associate--r+92.4%

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

        \[\leadsto x + z \cdot \frac{t}{\color{blue}{\left(-\left(-z\right)\right)} - a} \]
      14. remove-double-neg92.4%

        \[\leadsto x + z \cdot \frac{t}{\color{blue}{z} - a} \]
    7. Simplified92.4%

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

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

Alternative 6: 86.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-40} \lor \neg \left(y \leq 4.7 \cdot 10^{-85}\right):\\
\;\;\;\;x - y \cdot \frac{t}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8e-40 or 4.70000000000000009e-85 < y

    1. Initial program 87.2%

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

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

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

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

    if -1.8e-40 < y < 4.70000000000000009e-85

    1. Initial program 86.9%

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot z}}{a - z} \]
      3. distribute-rgt-neg-out82.0%

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

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

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

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

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

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

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

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

        \[\leadsto x + z \cdot \frac{t}{0 - \color{blue}{\left(\left(-z\right) + a\right)}} \]
      12. associate--r+92.4%

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

        \[\leadsto x + z \cdot \frac{t}{\color{blue}{\left(-\left(-z\right)\right)} - a} \]
      14. remove-double-neg92.4%

        \[\leadsto x + z \cdot \frac{t}{\color{blue}{z} - a} \]
    7. Simplified92.4%

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

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

Alternative 7: 83.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+116} \lor \neg \left(z \leq 2.9 \cdot 10^{+229}\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 -1.35e+116) (not (<= z 2.9e+229)))
   (+ x t)
   (- x (* y (/ t (- z a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.35e+116) || !(z <= 2.9e+229)) {
		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 <= (-1.35d+116)) .or. (.not. (z <= 2.9d+229))) 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 <= -1.35e+116) || !(z <= 2.9e+229)) {
		tmp = x + t;
	} else {
		tmp = x - (y * (t / (z - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.35e+116) or not (z <= 2.9e+229):
		tmp = x + t
	else:
		tmp = x - (y * (t / (z - a)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.35e+116) || !(z <= 2.9e+229))
		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 <= -1.35e+116) || ~((z <= 2.9e+229)))
		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, -1.35e+116], N[Not[LessEqual[z, 2.9e+229]], $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 -1.35 \cdot 10^{+116} \lor \neg \left(z \leq 2.9 \cdot 10^{+229}\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 < -1.35e116 or 2.89999999999999981e229 < z

    1. Initial program 58.9%

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

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

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

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

    if -1.35e116 < z < 2.89999999999999981e229

    1. Initial program 94.8%

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

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

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

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

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

Alternative 8: 76.2% accurate, 0.6× speedup?

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

    1. Initial program 74.1%

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

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

    if -4.90000000000000026e76 < z < 2.1500000000000001e22

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+78} \lor \neg \left(z \leq 1.66 \cdot 10^{+22}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000001e78 or 1.66e22 < z

    1. Initial program 74.1%

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

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

    if -2.8000000000000001e78 < z < 1.66e22

    1. Initial program 95.7%

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

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

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

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

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

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

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

Alternative 10: 58.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{-101} \lor \neg \left(x \leq -1.08 \cdot 10^{-284}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.49999999999999973e-101 or -1.0799999999999999e-284 < x

    1. Initial program 87.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}{\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. Taylor expanded in z around inf 66.8%

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

    if -5.49999999999999973e-101 < x < -1.0799999999999999e-284

    1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 63.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4999999999999999e-216 or 1.55000000000000006e-35 < z

    1. Initial program 82.2%

      \[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. Taylor expanded in z around inf 65.2%

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

    if -4.4999999999999999e-216 < z < 1.55000000000000006e-35

    1. Initial program 96.6%

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

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

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

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

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

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

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

Alternative 12: 98.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 51.6% accurate, 11.0× speedup?

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

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

  :alt
  (! :herbie-platform default (if (< t -10682974490174067/10000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 312887599100691/80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t)))))

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