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

Percentage Accurate: 85.4% → 98.5%
Time: 9.4s
Alternatives: 12
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 12 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.4% 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.5% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma (/ (- y z) (- a z)) t x))
double code(double x, double y, double z, double t, double a) {
	return fma(((y - z) / (a - z)), t, x);
}
function code(x, y, z, t, a)
	return fma(Float64(Float64(y - z) / Float64(a - z)), t, x)
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t + x), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

Alternative 2: 74.6% accurate, 0.3× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 5.2 \cdot 10^{+26}:\\
\;\;\;\;x - \frac{z \cdot t}{a}\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+43}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -9.99999999999999983e156 or 2.60000000000000021e43 < z

    1. Initial program 67.6%

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

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

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

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

    if -9.99999999999999983e156 < z < -1e-82

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

    if -1e-82 < z < 4.1999999999999997e-73

    1. Initial program 98.9%

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

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

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

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

    if 4.1999999999999997e-73 < z < 5.20000000000000004e26

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.20000000000000004e26 < z < 2.60000000000000021e43

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+157}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -1 \cdot 10^{-82}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-73}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+26}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 74.6% accurate, 0.3× speedup?

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

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

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

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

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

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+43}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -3.20000000000000002e156 or 2.20000000000000001e43 < z

    1. Initial program 67.6%

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

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

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

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

    if -3.20000000000000002e156 < z < -1.69999999999999988e-82

    1. Initial program 85.8%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-1 \cdot y}{z}} \cdot t \]
      2. neg-mul-171.0%

        \[\leadsto x + \frac{\color{blue}{-y}}{z} \cdot t \]
    8. Simplified71.0%

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

    if -1.69999999999999988e-82 < z < 7.2000000000000005e-74

    1. Initial program 98.9%

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

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

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

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

    if 7.2000000000000005e-74 < z < 1.00000000000000005e26

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000005e26 < z < 2.20000000000000001e43

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+156}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{-82}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-74}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;z \leq 10^{+26}:\\ \;\;\;\;x - \frac{z \cdot t}{a}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+43}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.6% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.6e160 or 1 < z

    1. Initial program 71.1%

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

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

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

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

    if -2.6e160 < z < -1.85e-82

    1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

    if -1.85e-82 < z < 1

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

Alternative 5: 84.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+159} \lor \neg \left(z \leq 2.6 \cdot 10^{+61}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.89999999999999983e159 or 2.59999999999999973e61 < z

    1. Initial program 68.3%

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

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

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

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

    if -1.89999999999999983e159 < z < 2.59999999999999973e61

    1. Initial program 93.6%

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

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

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

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

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

Alternative 6: 84.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+158} \lor \neg \left(z \leq 2.6 \cdot 10^{+61}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.5000000000000001e158 or 2.59999999999999973e61 < z

    1. Initial program 68.3%

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

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

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

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

    if -6.5000000000000001e158 < z < 2.59999999999999973e61

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

Alternative 7: 88.3% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 83.9%

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

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

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

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

    if -2.59999999999999988e30 < y < 6.8e19

    1. Initial program 85.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.8e19 < y

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

Alternative 8: 63.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{-188} \lor \neg \left(x \leq 2.4 \cdot 10^{-138}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.02e-188 or 2.3999999999999999e-138 < x

    1. Initial program 86.5%

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

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

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

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

    if -1.02e-188 < x < 2.3999999999999999e-138

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 77.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.85000000000000003e-19 or 2.39999999999999991 < z

    1. Initial program 76.4%

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

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

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

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

    if -1.85000000000000003e-19 < z < 2.39999999999999991

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

Alternative 10: 63.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-139} \lor \neg \left(z \leq 3.8 \cdot 10^{+21}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.80000000000000029e-139 or 3.8e21 < z

    1. Initial program 77.2%

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

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

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

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

    if -4.80000000000000029e-139 < z < 3.8e21

    1. Initial program 98.1%

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

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

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

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

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

Alternative 11: 98.5% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 12: 51.1% accurate, 11.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification55.8%

    \[\leadsto x \]
  7. Add Preprocessing

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

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

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