Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B

Percentage Accurate: 98.2% → 98.2%
Time: 7.4s
Alternatives: 11
Speedup: 1.0×

Specification

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

\\
x + y \cdot \frac{z - t}{a - t}
\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 11 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: 98.2% accurate, 1.0× speedup?

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

\\
x + y \cdot \frac{z - t}{a - t}
\end{array}

Alternative 1: 98.2% accurate, 1.0× speedup?

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

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

    \[x + y \cdot \frac{z - t}{a - t} \]
  2. Final simplification98.8%

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

Alternative 2: 84.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+119} \lor \neg \left(t \leq 8.2 \cdot 10^{+78}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.4999999999999997e119 or 8.1999999999999994e78 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in t around inf 87.7%

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

    if -6.4999999999999997e119 < t < 8.1999999999999994e78

    1. Initial program 98.0%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in z around inf 88.5%

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

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

Alternative 3: 85.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+122}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.2000000000000001e122 or 3.10000000000000005e115 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in t around inf 88.4%

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

    if -1.2000000000000001e122 < t < 3.10000000000000005e115

    1. Initial program 98.1%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around 0 92.9%

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

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

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

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

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

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

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

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

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

Alternative 4: 85.5% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.20000000000000005e123

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in t around inf 87.0%

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

    if -3.20000000000000005e123 < t < 1.65e14

    1. Initial program 97.8%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around 0 93.2%

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

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

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

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

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

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

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

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

    if 1.65e14 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around 0 57.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)} \cdot y}{-\left(a - t\right)} + x \]
      4. sqrt-unprod23.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-t\right) \cdot y}}{-\left(a - t\right)} + x \]
      9. add-sqr-sqrt0.0%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)} \cdot y}{-\left(a - t\right)} + x \]
      10. sqrt-unprod35.6%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}} \cdot y}{-\left(a - t\right)} + x \]
      11. sqr-neg35.6%

        \[\leadsto \frac{\sqrt{\color{blue}{t \cdot t}} \cdot y}{-\left(a - t\right)} + x \]
      12. sqrt-unprod54.7%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot y}{-\left(a - t\right)} + x \]
      13. add-sqr-sqrt54.8%

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

        \[\leadsto \frac{t \cdot y}{-\color{blue}{\left(a + \left(-t\right)\right)}} + x \]
      15. distribute-neg-in54.8%

        \[\leadsto \frac{t \cdot y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}} + x \]
      16. add-sqr-sqrt0.0%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}\right)} + x \]
      17. sqrt-unprod38.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}\right)} + x \]
      18. sqr-neg38.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\sqrt{\color{blue}{t \cdot t}}\right)} + x \]
      19. sqrt-unprod38.7%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{\sqrt{t} \cdot \sqrt{t}}\right)} + x \]
      20. add-sqr-sqrt38.7%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{t}\right)} + x \]
      21. add-sqr-sqrt0.0%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} + x \]
      22. sqrt-unprod45.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} + x \]
      23. sqr-neg45.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \sqrt{\color{blue}{t \cdot t}}} + x \]
      24. sqrt-unprod54.7%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \color{blue}{\sqrt{t} \cdot \sqrt{t}}} + x \]
      25. add-sqr-sqrt54.8%

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

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

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

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

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

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

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

Alternative 5: 86.2% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.5999999999999999e59

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in a around 0 68.9%

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

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

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

        \[\leadsto \color{blue}{x - \frac{\left(z - t\right) \cdot y}{t}} \]
      4. *-commutative68.9%

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

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

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

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

    if -3.5999999999999999e59 < t < 9.5e13

    1. Initial program 97.6%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around 0 93.4%

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

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

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

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

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

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

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

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

    if 9.5e13 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around 0 57.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)} \cdot y}{-\left(a - t\right)} + x \]
      4. sqrt-unprod23.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-t\right) \cdot y}}{-\left(a - t\right)} + x \]
      9. add-sqr-sqrt0.0%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)} \cdot y}{-\left(a - t\right)} + x \]
      10. sqrt-unprod35.6%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}} \cdot y}{-\left(a - t\right)} + x \]
      11. sqr-neg35.6%

        \[\leadsto \frac{\sqrt{\color{blue}{t \cdot t}} \cdot y}{-\left(a - t\right)} + x \]
      12. sqrt-unprod54.7%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot y}{-\left(a - t\right)} + x \]
      13. add-sqr-sqrt54.8%

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

        \[\leadsto \frac{t \cdot y}{-\color{blue}{\left(a + \left(-t\right)\right)}} + x \]
      15. distribute-neg-in54.8%

        \[\leadsto \frac{t \cdot y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}} + x \]
      16. add-sqr-sqrt0.0%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}\right)} + x \]
      17. sqrt-unprod38.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}\right)} + x \]
      18. sqr-neg38.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\sqrt{\color{blue}{t \cdot t}}\right)} + x \]
      19. sqrt-unprod38.7%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{\sqrt{t} \cdot \sqrt{t}}\right)} + x \]
      20. add-sqr-sqrt38.7%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{t}\right)} + x \]
      21. add-sqr-sqrt0.0%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} + x \]
      22. sqrt-unprod45.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} + x \]
      23. sqr-neg45.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \sqrt{\color{blue}{t \cdot t}}} + x \]
      24. sqrt-unprod54.7%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \color{blue}{\sqrt{t} \cdot \sqrt{t}}} + x \]
      25. add-sqr-sqrt54.8%

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

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

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

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

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

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

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

Alternative 6: 87.1% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.4999999999999999e59

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around 0 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\frac{y}{\frac{t}{z}}} - y\right) \]
    10. Simplified93.2%

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

    if -5.4999999999999999e59 < t < 7e14

    1. Initial program 97.6%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around 0 93.4%

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

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

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

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

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

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

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

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

    if 7e14 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around 0 57.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)} \cdot y}{-\left(a - t\right)} + x \]
      4. sqrt-unprod23.8%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-t\right) \cdot y}}{-\left(a - t\right)} + x \]
      9. add-sqr-sqrt0.0%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{-t} \cdot \sqrt{-t}\right)} \cdot y}{-\left(a - t\right)} + x \]
      10. sqrt-unprod35.6%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}} \cdot y}{-\left(a - t\right)} + x \]
      11. sqr-neg35.6%

        \[\leadsto \frac{\sqrt{\color{blue}{t \cdot t}} \cdot y}{-\left(a - t\right)} + x \]
      12. sqrt-unprod54.7%

        \[\leadsto \frac{\color{blue}{\left(\sqrt{t} \cdot \sqrt{t}\right)} \cdot y}{-\left(a - t\right)} + x \]
      13. add-sqr-sqrt54.8%

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

        \[\leadsto \frac{t \cdot y}{-\color{blue}{\left(a + \left(-t\right)\right)}} + x \]
      15. distribute-neg-in54.8%

        \[\leadsto \frac{t \cdot y}{\color{blue}{\left(-a\right) + \left(-\left(-t\right)\right)}} + x \]
      16. add-sqr-sqrt0.0%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}\right)} + x \]
      17. sqrt-unprod38.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}\right)} + x \]
      18. sqr-neg38.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\sqrt{\color{blue}{t \cdot t}}\right)} + x \]
      19. sqrt-unprod38.7%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{\sqrt{t} \cdot \sqrt{t}}\right)} + x \]
      20. add-sqr-sqrt38.7%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \left(-\color{blue}{t}\right)} + x \]
      21. add-sqr-sqrt0.0%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \color{blue}{\sqrt{-t} \cdot \sqrt{-t}}} + x \]
      22. sqrt-unprod45.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}} + x \]
      23. sqr-neg45.4%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \sqrt{\color{blue}{t \cdot t}}} + x \]
      24. sqrt-unprod54.7%

        \[\leadsto \frac{t \cdot y}{\left(-a\right) + \color{blue}{\sqrt{t} \cdot \sqrt{t}}} + x \]
      25. add-sqr-sqrt54.8%

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

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

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

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

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

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

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

Alternative 7: 87.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.8000000000000004e59

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around 0 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(\color{blue}{\frac{y}{\frac{t}{z}}} - y\right) \]
    10. Simplified93.2%

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

    if -4.8000000000000004e59 < t < 6.4e9

    1. Initial program 97.6%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around 0 93.4%

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

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

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

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

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

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

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

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

    if 6.4e9 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in z around 0 54.8%

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

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

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

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

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

        \[\leadsto x - \frac{y}{\color{blue}{\frac{a}{t} - \frac{t}{t}}} \]
      6. *-inverses92.9%

        \[\leadsto x - \frac{y}{\frac{a}{t} - \color{blue}{1}} \]
    4. Simplified92.9%

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

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

Alternative 8: 77.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+14}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.5e14 or 1.64999999999999994e-16 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in t around inf 80.4%

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

    if -1.5e14 < t < 1.64999999999999994e-16

    1. Initial program 97.4%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in t around 0 83.6%

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

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

Alternative 9: 77.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -20000000000000:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2e13 or 2.39999999999999986e-17 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in t around inf 80.4%

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

    if -2e13 < t < 2.39999999999999986e-17

    1. Initial program 97.4%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in t around 0 79.4%

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

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

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

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

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

Alternative 10: 63.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{-163}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-18}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.9000000000000001e-163 or 2.39999999999999994e-18 < t

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in t around inf 76.1%

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

    if -2.9000000000000001e-163 < t < 2.39999999999999994e-18

    1. Initial program 96.6%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Taylor expanded in x around inf 56.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{-163}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-18}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 11: 51.5% 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 98.8%

    \[x + y \cdot \frac{z - t}{a - t} \]
  2. Taylor expanded in x around inf 49.5%

    \[\leadsto \color{blue}{x} \]
  3. Final simplification49.5%

    \[\leadsto x \]

Developer target: 99.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023268 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))

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