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

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

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

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

Alternative 1: 95.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y - z}{\frac{a - z}{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(y - z) / Float64(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[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[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}{\frac{a - z}{t}}} \]
  3. Simplified98.4%

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

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

Alternative 2: 77.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.75e16 or 6.3e214 < z

    1. Initial program 70.3%

      \[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}{\frac{a - z}{t}}} \]
    3. Simplified97.7%

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

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

    if -2.75e16 < z < 5.5e11

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.8%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} + x \]
    8. Simplified87.1%

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

    if 5.5e11 < z < 6.3e214

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.75 \cdot 10^{+16}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 550000000000:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 6.3 \cdot 10^{+214}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 3: 77.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.8e15 or 8.50000000000000045e214 < z

    1. Initial program 70.3%

      \[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}{\frac{a - z}{t}}} \]
    3. Simplified97.7%

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

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

    if -3.8e15 < z < 1.25e15

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.8%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} + x \]
    8. Simplified87.1%

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

    if 1.25e15 < z < 8.50000000000000045e214

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{+15}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+15}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+214}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 4: 77.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.5e13 or 1.1e216 < z

    1. Initial program 70.3%

      \[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}{\frac{a - z}{t}}} \]
    3. Simplified97.7%

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

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

    if -9.5e13 < z < 7200

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.8%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} + x \]
    8. Simplified87.1%

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

    if 7200 < z < 1.1e216

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 88.3% accurate, 0.8× speedup?

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

    1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.85e20 < z < 1.35e10

    1. Initial program 92.0%

      \[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}{\frac{a - z}{t}}} \]
    3. Simplified99.9%

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

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

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

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

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

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

Alternative 6: 88.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.19 or 4.2e15 < z

    1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.19 < z < 4.2e15

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.8%

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

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

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

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

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

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

Alternative 7: 88.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+20} \lor \neg \left(z \leq 2.65 \cdot 10^{+17}\right):\\
\;\;\;\;x + \left(t - \frac{y}{\frac{z}{t}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1e20 or 2.65e17 < z

    1. Initial program 75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\frac{y}{\frac{z}{t}}} - t\right) \]
    9. Simplified87.6%

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

    if -2.1e20 < z < 2.65e17

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.8%

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

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

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

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

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

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

Alternative 8: 86.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{a - z}{t}\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+25} \lor \neg \left(y \leq 1.46 \cdot 10^{-80}\right):\\
\;\;\;\;x + \frac{y}{t_1}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{z}{t_1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.25000000000000006e25 or 1.46e-80 < y

    1. Initial program 79.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef97.8%

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

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

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

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

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

    if -1.25000000000000006e25 < y < 1.46e-80

    1. Initial program 88.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. Step-by-step derivation
      1. associate-*l/88.6%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1, \frac{t \cdot z}{a - z}, x\right)} \]
      2. *-commutative84.6%

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

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

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

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

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

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

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

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

Alternative 9: 86.3% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.2e14 or 1.55000000000000008e-80 < y

    1. Initial program 79.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef97.8%

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

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

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

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

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

    if -7.2e14 < y < 1.55000000000000008e-80

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 87.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+20} \lor \neg \left(y \leq 8 \cdot 10^{-81}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.45e20 or 7.9999999999999997e-81 < y

    1. Initial program 79.9%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef97.8%

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

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

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

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

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

    if -1.45e20 < y < 7.9999999999999997e-81

    1. Initial program 88.6%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.0%

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

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

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

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

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

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

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

Alternative 11: 83.2% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9e181 or 7.39999999999999962e214 < z

    1. Initial program 51.5%

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

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

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

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

    if -9e181 < z < 7.39999999999999962e214

    1. Initial program 91.8%

      \[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}{\frac{a - z}{t}}} \]
    3. Simplified98.5%

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

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

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

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

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

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

Alternative 12: 88.9% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 78.4%

      \[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}{\frac{a - z}{t}}} \]
    3. Simplified97.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\frac{y}{\frac{z}{t}}} - t\right) \]
    9. Simplified89.6%

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

    if -2.4e17 < z < 2.8e17

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.8%

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

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

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

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

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

    if 2.8e17 < z

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 63.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+257} \lor \neg \left(y \leq 3.5 \cdot 10^{+195}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.11999999999999995e257 or 3.5000000000000002e195 < y

    1. Initial program 76.0%

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

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

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

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

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

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

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

    if -1.11999999999999995e257 < y < 3.5000000000000002e195

    1. Initial program 84.9%

      \[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}{\frac{a - z}{t}}} \]
    3. Simplified98.6%

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

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

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

Alternative 14: 78.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.25e7 or 1.45e17 < z

    1. Initial program 75.8%

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

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

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

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

    if -3.25e7 < z < 1.45e17

    1. Initial program 92.0%

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

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

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

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

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

Alternative 15: 78.9% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5500000000000001e23 or 1.9e17 < z

    1. Initial program 75.8%

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

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

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

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

    if -2.5500000000000001e23 < z < 1.9e17

    1. Initial program 92.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.8%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} + x \]
    8. Simplified87.1%

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

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

Alternative 16: 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 83.8%

    \[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. Final simplification98.4%

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

Alternative 17: 65.7% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.28 \cdot 10^{-61}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.1999999999999999e-57 or 1.28000000000000009e-61 < z

    1. Initial program 79.1%

      \[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}{\frac{a - z}{t}}} \]
    3. Simplified97.5%

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

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

    if -4.1999999999999999e-57 < z < 1.28000000000000009e-61

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{-57}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 1.28 \cdot 10^{-61}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]

Alternative 18: 52.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 83.8%

    \[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}{\frac{a - z}{t}}} \]
  3. Simplified98.4%

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification51.7%

    \[\leadsto x \]

Developer target: 99.2% 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 2023195 
(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))))