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

Percentage Accurate: 98.1% → 98.1%
Time: 9.0s
Alternatives: 12
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 98.1% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.0× speedup?

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

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

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

Alternative 2: 76.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+149}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-37} \lor \neg \left(z \leq 3.4 \cdot 10^{+24}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.6e149 or -1.7499999999999999e84 < z < -2.20000000000000002e-37 or 3.4000000000000001e24 < z

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative80.3%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified80.3%

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

    if -6.6e149 < z < -1.7499999999999999e84

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. associate-*r/79.8%

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

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      2. distribute-lft-neg-out79.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-\left(-y \cdot t\right)\right)} \cdot \frac{1}{z - a} \]
      10. distribute-rgt-neg-out48.8%

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

        \[\leadsto \color{blue}{x - \left(y \cdot \left(-t\right)\right) \cdot \frac{1}{z - a}} \]
      12. associate-*l*53.4%

        \[\leadsto x - \color{blue}{y \cdot \left(\left(-t\right) \cdot \frac{1}{z - a}\right)} \]
      13. div-inv53.4%

        \[\leadsto x - y \cdot \color{blue}{\frac{-t}{z - a}} \]
      14. add-sqr-sqrt16.2%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a} \]
      15. sqrt-unprod49.2%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{\left(-t\right) \cdot \left(-t\right)}}}{z - a} \]
      16. sqr-neg49.2%

        \[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z - a} \]
      17. sqrt-unprod52.7%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a} \]
      18. add-sqr-sqrt84.5%

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

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

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

    if -2.20000000000000002e-37 < z < 3.4000000000000001e24

    1. Initial program 95.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+149}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -1.75 \cdot 10^{+84}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-37} \lor \neg \left(z \leq 3.4 \cdot 10^{+24}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+148}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;z \leq -2.2 \cdot 10^{-37} \lor \neg \left(z \leq 8.2 \cdot 10^{+24}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.0999999999999998e148 or -1.19999999999999999e82 < z < -2.20000000000000002e-37 or 8.2000000000000002e24 < z

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative80.3%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified80.3%

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

    if -4.0999999999999998e148 < z < -1.19999999999999999e82

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. associate-*r/79.8%

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

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      2. distribute-lft-neg-out79.2%

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

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

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

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

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

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

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

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

    if -2.20000000000000002e-37 < z < 8.2000000000000002e24

    1. Initial program 95.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+148}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+82}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -2.2 \cdot 10^{-37} \lor \neg \left(z \leq 8.2 \cdot 10^{+24}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -9.2 \cdot 10^{-116} \lor \neg \left(z \leq 8 \cdot 10^{-66}\right):\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\

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


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

    1. Initial program 99.9%

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

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

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

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

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

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

    if -1.59999999999999995e80 < z < -9.20000000000000006e-116 or 7.9999999999999998e-66 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

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

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

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

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

    if -9.20000000000000006e-116 < z < 7.9999999999999998e-66

    1. Initial program 94.0%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
    5. Simplified80.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+80}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-116} \lor \neg \left(z \leq 8 \cdot 10^{-66}\right):\\ \;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 81.2% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq -4.9 \cdot 10^{-116}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.9e56

    1. Initial program 99.9%

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

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

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

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

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

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

    if -6.9e56 < z < -4.89999999999999977e-116

    1. Initial program 99.9%

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

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

    if -4.89999999999999977e-116 < z < 5.99999999999999959e-63

    1. Initial program 94.0%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
    5. Simplified80.9%

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

    if 5.99999999999999959e-63 < z

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.9 \cdot 10^{+56}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq -4.9 \cdot 10^{-116}:\\ \;\;\;\;x + \frac{y \cdot z}{z - a}\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-63}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 81.2% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.2000000000000001e57

    1. Initial program 99.9%

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

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

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

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

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

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

    if -2.2000000000000001e57 < z < -6.0000000000000003e-115

    1. Initial program 99.9%

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

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

    if -6.0000000000000003e-115 < z < 1.17999999999999999e-63

    1. Initial program 94.0%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
    5. Simplified80.9%

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

    if 1.17999999999999999e-63 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{1} - \frac{a}{z}} \]
    7. Simplified86.2%

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

Alternative 7: 88.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.1 \cdot 10^{+32} \lor \neg \left(t \leq 1.6 \cdot 10^{-25}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.09999999999999981e32 or 1.6000000000000001e-25 < t

    1. Initial program 96.0%

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

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

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

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

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

    if -4.09999999999999981e32 < t < 1.6000000000000001e-25

    1. Initial program 99.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.2%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{1} - \frac{a}{z}} \]
    7. Simplified92.9%

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

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

Alternative 8: 87.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+32} \lor \neg \left(t \leq 7 \cdot 10^{-26}\right):\\
\;\;\;\;x - y \cdot \frac{t}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.69999999999999989e32 or 6.9999999999999997e-26 < t

    1. Initial program 96.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. associate-*r/84.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \left(y \cdot \left(-t\right)\right) \cdot \frac{1}{z - a}} \]
      12. associate-*l*35.4%

        \[\leadsto x - \color{blue}{y \cdot \left(\left(-t\right) \cdot \frac{1}{z - a}\right)} \]
      13. div-inv35.4%

        \[\leadsto x - y \cdot \color{blue}{\frac{-t}{z - a}} \]
      14. add-sqr-sqrt15.9%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}{z - a} \]
      15. sqrt-unprod44.4%

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

        \[\leadsto x - y \cdot \frac{\sqrt{\color{blue}{t \cdot t}}}{z - a} \]
      17. sqrt-unprod47.1%

        \[\leadsto x - y \cdot \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a} \]
      18. add-sqr-sqrt87.1%

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

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

    if -1.69999999999999989e32 < t < 6.9999999999999997e-26

    1. Initial program 99.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.2%

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{1} - \frac{a}{z}} \]
    7. Simplified92.9%

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

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

Alternative 9: 82.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.00000000000000019e-60 or 2.89999999999999991e-56 < z

    1. Initial program 99.9%

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

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

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

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

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

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

    if -3.00000000000000019e-60 < z < 2.89999999999999991e-56

    1. Initial program 94.6%

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

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

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

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

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

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

Alternative 10: 77.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-37} \lor \neg \left(z \leq 1.4 \cdot 10^{+27}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3e-37 or 1.4e27 < z

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative77.2%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified77.2%

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

    if -2.3e-37 < z < 1.4e27

    1. Initial program 95.5%

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

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

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

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

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

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

Alternative 11: 62.1% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.1 \cdot 10^{+137}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.0999999999999999e137

    1. Initial program 97.7%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative62.4%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified62.4%

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

    if 3.0999999999999999e137 < a

    1. Initial program 97.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.1 \cdot 10^{+137}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 51.0% 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 97.7%

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

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

Developer target: 98.3% accurate, 1.0× speedup?

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

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

Reproduce

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

  :alt
  (+ x (/ y (/ (- z a) (- z t))))

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