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

Percentage Accurate: 85.2% → 97.4%
Time: 10.7s
Alternatives: 18
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 18 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 85.2% accurate, 1.0× speedup?

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

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

Alternative 1: 97.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} \leq 3 \cdot 10^{-203}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\

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


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

    1. Initial program 84.6%

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

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

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

    if 3.0000000000000001e-203 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 84.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} \leq 3 \cdot 10^{-203}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \end{array} \]

Alternative 2: 76.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0012:\\
\;\;\;\;t + x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -0.00119999999999999989 or 5e113 < z

    1. Initial program 68.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. Taylor expanded in z around inf 82.4%

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

    if -0.00119999999999999989 < z < 7.50000000000000018e-81

    1. Initial program 94.8%

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

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

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

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

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

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

    if 7.50000000000000018e-81 < z < 5e113

    1. Initial program 95.4%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
      5. associate-/r/67.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0012:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-81}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+113}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]

Alternative 3: 76.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00042:\\
\;\;\;\;t + x\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.2000000000000002e-4 or 2.1999999999999999e112 < z

    1. Initial program 68.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. Taylor expanded in z around inf 82.4%

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

    if -4.2000000000000002e-4 < z < 1.85000000000000003e-78

    1. Initial program 94.8%

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

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

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

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

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

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

    if 1.85000000000000003e-78 < z < 2.1999999999999999e112

    1. Initial program 95.4%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
      5. associate-/r/67.6%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.00042:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{-78}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+112}:\\ \;\;\;\;x - \frac{y \cdot t}{z}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]

Alternative 4: 81.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.82 \cdot 10^{-124} \lor \neg \left(z \leq 3.3 \cdot 10^{-80}\right):\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.82000000000000009e-124 or 3.3e-80 < z

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.82000000000000009e-124 < z < 3.3e-80

    1. Initial program 95.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified84.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.82 \cdot 10^{-124} \lor \neg \left(z \leq 3.3 \cdot 10^{-80}\right):\\ \;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 5: 87.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.031 \lor \neg \left(z \leq 5.6 \cdot 10^{+120}\right):\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.031 or 5.6000000000000001e120 < z

    1. Initial program 68.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. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.031 < z < 5.6000000000000001e120

    1. Initial program 95.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.031 \lor \neg \left(z \leq 5.6 \cdot 10^{+120}\right):\\ \;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \end{array} \]

Alternative 6: 85.0% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.0000000000000001e-59 or 1.45000000000000002e-113 < y

    1. Initial program 83.6%

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

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

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

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

    if -3.0000000000000001e-59 < y < 1.45000000000000002e-113

    1. Initial program 85.9%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      2. div-inv94.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{-59} \lor \neg \left(y \leq 1.45 \cdot 10^{-113}\right):\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{t}{a - z}\\ \end{array} \]

Alternative 7: 86.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-59} \lor \neg \left(y \leq 7.6 \cdot 10^{-112}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.89999999999999992e-59 or 7.59999999999999989e-112 < y

    1. Initial program 83.6%

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

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

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

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

    if -1.89999999999999992e-59 < y < 7.59999999999999989e-112

    1. Initial program 85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.9 \cdot 10^{-59} \lor \neg \left(y \leq 7.6 \cdot 10^{-112}\right):\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t}{\frac{a}{z} + -1}\\ \end{array} \]

Alternative 8: 86.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-59} \lor \neg \left(y \leq 3.1 \cdot 10^{-112}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.1499999999999999e-59 or 3.0999999999999998e-112 < y

    1. Initial program 83.6%

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

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

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

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

    if -1.1499999999999999e-59 < y < 3.0999999999999998e-112

    1. Initial program 85.9%

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

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

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

      \[\leadsto x + \color{blue}{\left(-1 \cdot \frac{z}{a - z}\right)} \cdot t \]
    5. Step-by-step derivation
      1. neg-mul-194.5%

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

        \[\leadsto x + \color{blue}{\frac{-z}{a - z}} \cdot t \]
    6. Simplified94.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{-59} \lor \neg \left(y \leq 3.1 \cdot 10^{-112}\right):\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \frac{z}{a - z}\\ \end{array} \]

Alternative 9: 87.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0215:\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\

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

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


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

    1. Initial program 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.021499999999999998 < z < 5.6000000000000001e120

    1. Initial program 95.0%

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

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

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

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

    if 5.6000000000000001e120 < z

    1. Initial program 59.3%

      \[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. Step-by-step derivation
      1. clear-num100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0215:\\ \;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+120}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 10: 76.9% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.0045999999999999999 or 3.7e-16 < z

    1. Initial program 74.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. Taylor expanded in z around inf 76.3%

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

    if -0.0045999999999999999 < z < 3.7e-16

    1. Initial program 94.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified76.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0046 \lor \neg \left(z \leq 3.7 \cdot 10^{-16}\right):\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 11: 76.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000155:\\
\;\;\;\;t + x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.55e-4 or 1.9000000000000001e-14 < z

    1. Initial program 74.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. Taylor expanded in z around inf 76.3%

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

    if -1.55e-4 < z < 1.9000000000000001e-14

    1. Initial program 94.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.000155:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-14}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]

Alternative 12: 76.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0002:\\
\;\;\;\;t + x\\

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

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


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

    1. Initial program 74.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. Taylor expanded in z around inf 76.3%

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

    if -2.0000000000000001e-4 < z < 7.49999999999999957e-19

    1. Initial program 94.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified76.8%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}} + x} \]
    7. Step-by-step derivation
      1. div-inv76.2%

        \[\leadsto \color{blue}{y \cdot \frac{1}{\frac{a}{t}}} + x \]
      2. clear-num76.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.0002:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-19}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]

Alternative 13: 98.3% 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 84.4%

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

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

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

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

Alternative 14: 60.0% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.6 \cdot 10^{+101}:\\
\;\;\;\;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 y < 4.6000000000000003e101

    1. Initial program 84.4%

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

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

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

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

    if 4.6000000000000003e101 < y

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\left(\frac{y}{z} - 1\right) \cdot t} \]
      2. *-commutative55.2%

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

        \[\leadsto \color{blue}{t \cdot \left(-\left(\frac{y}{z} - 1\right)\right)} \]
      4. mul-1-neg55.2%

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(\frac{y}{z} - 1\right)\right)} \]
      5. sub-neg55.2%

        \[\leadsto t \cdot \left(-1 \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)}\right) \]
      6. metadata-eval55.2%

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

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \frac{y}{z} + -1 \cdot -1\right)} \]
      8. metadata-eval55.2%

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    9. Simplified55.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 4.6 \cdot 10^{+101}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \end{array} \]

Alternative 15: 59.8% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.3 \cdot 10^{+150}:\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.30000000000000001e150

    1. Initial program 83.4%

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

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

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

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

    if 2.30000000000000001e150 < y

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-\left(\frac{y}{z} - 1\right) \cdot t} \]
      2. *-commutative56.7%

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

        \[\leadsto \color{blue}{t \cdot \left(-\left(\frac{y}{z} - 1\right)\right)} \]
      4. mul-1-neg56.7%

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(\frac{y}{z} - 1\right)\right)} \]
      5. sub-neg56.7%

        \[\leadsto t \cdot \left(-1 \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)}\right) \]
      6. metadata-eval56.7%

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

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \frac{y}{z} + -1 \cdot -1\right)} \]
      8. metadata-eval56.7%

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

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

        \[\leadsto t \cdot \left(1 + \color{blue}{\left(-\frac{y}{z}\right)}\right) \]
      11. unsub-neg56.7%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{z} \cdot t} \]
      3. distribute-rgt-neg-in56.4%

        \[\leadsto \color{blue}{\frac{y}{z} \cdot \left(-t\right)} \]
    12. Simplified56.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.3 \cdot 10^{+150}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{-y}{z}\\ \end{array} \]

Alternative 16: 62.9% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.5 \cdot 10^{-145}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.50000000000000009e-174 or 1.49999999999999996e-145 < z

    1. Initial program 80.0%

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

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

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

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

    if -6.50000000000000009e-174 < z < 1.49999999999999996e-145

    1. Initial program 97.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{-174}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{-145}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]

Alternative 17: 50.4% accurate, 3.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+17}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.5e17

    1. Initial program 69.1%

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

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

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

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

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

        \[\leadsto x + \frac{y - z}{\color{blue}{\frac{-z}{t}}} \]
    6. Simplified62.5%

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

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

        \[\leadsto \color{blue}{-\left(\frac{y}{z} - 1\right) \cdot t} \]
      2. *-commutative60.2%

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

        \[\leadsto \color{blue}{t \cdot \left(-\left(\frac{y}{z} - 1\right)\right)} \]
      4. mul-1-neg60.2%

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \left(\frac{y}{z} - 1\right)\right)} \]
      5. sub-neg60.2%

        \[\leadsto t \cdot \left(-1 \cdot \color{blue}{\left(\frac{y}{z} + \left(-1\right)\right)}\right) \]
      6. metadata-eval60.2%

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

        \[\leadsto t \cdot \color{blue}{\left(-1 \cdot \frac{y}{z} + -1 \cdot -1\right)} \]
      8. metadata-eval60.2%

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

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

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

        \[\leadsto t \cdot \color{blue}{\left(1 - \frac{y}{z}\right)} \]
    9. Simplified60.2%

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

      \[\leadsto t \cdot \color{blue}{1} \]

    if -6.5e17 < t

    1. Initial program 90.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+17}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 18: 50.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 84.4%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification47.1%

    \[\leadsto x \]

Developer target: 99.3% accurate, 0.7× 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 2023192 
(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))))