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

Percentage Accurate: 98.4% → 98.4%
Time: 8.4s
Alternatives: 10
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 10 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.4% 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.4% 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. Final simplification97.7%

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

Alternative 2: 83.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9500000000000001e-46 or 3500 < z

    1. Initial program 99.9%

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

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

    if -1.9500000000000001e-46 < z < 3500

    1. Initial program 94.6%

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

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

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

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

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

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

Alternative 3: 86.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.05e14 or 3e-96 < t

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{t}}{z - a} \cdot y \]
      7. cancel-sign-sub44.4%

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

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

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

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

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

        \[\leadsto x - \frac{y}{\frac{z - a}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}} \]
      13. sqrt-unprod41.3%

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

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

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

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

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

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

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

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

    if -1.05e14 < t < 3e-96

    1. Initial program 99.0%

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

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

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

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

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

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

Alternative 4: 86.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7000000000000:\\
\;\;\;\;x - y \cdot \frac{t}{z - a}\\

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

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


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

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a} \cdot y \]
      6. add-sqr-sqrt38.2%

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{-t}{z - a}} \]
      10. clear-num38.2%

        \[\leadsto x - y \cdot \color{blue}{\frac{1}{\frac{z - a}{-t}}} \]
      11. un-div-inv39.6%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z - a}{-t}}} \]
      12. add-sqr-sqrt39.6%

        \[\leadsto x - \frac{y}{\frac{z - a}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}} \]
      13. sqrt-unprod23.3%

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

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

        \[\leadsto x - \frac{y}{\frac{z - a}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}} \]
      16. add-sqr-sqrt89.4%

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

      \[\leadsto \color{blue}{x - \frac{y}{\frac{z - a}{t}}} \]
    7. Step-by-step derivation
      1. div-inv88.0%

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

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

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

    if -7e12 < t < 3.20000000000000012e-96

    1. Initial program 99.0%

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

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

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

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

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

    if 3.20000000000000012e-96 < t

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 86.9% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}{z - a} \cdot y \]
      6. add-sqr-sqrt38.2%

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{-t}{z - a}} \]
      10. clear-num38.2%

        \[\leadsto x - y \cdot \color{blue}{\frac{1}{\frac{z - a}{-t}}} \]
      11. un-div-inv39.6%

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z - a}{-t}}} \]
      12. add-sqr-sqrt39.6%

        \[\leadsto x - \frac{y}{\frac{z - a}{\color{blue}{\sqrt{-t} \cdot \sqrt{-t}}}} \]
      13. sqrt-unprod23.3%

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

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

        \[\leadsto x - \frac{y}{\frac{z - a}{\color{blue}{\sqrt{t} \cdot \sqrt{t}}}} \]
      16. add-sqr-sqrt89.4%

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

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

    if -2.6e16 < t < 3.4000000000000001e-96

    1. Initial program 99.0%

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

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

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

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

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

    if 3.4000000000000001e-96 < t

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 76.7% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4e22 or 1.55e7 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified78.6%

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

    if -2.4e22 < z < 1.55e7

    1. Initial program 95.2%

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

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

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

Alternative 7: 77.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+105} \lor \neg \left(z \leq 280000000000\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.49999999999999979e105 or 2.8e11 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified81.0%

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

    if -5.49999999999999979e105 < z < 2.8e11

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

Alternative 8: 77.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+105} \lor \neg \left(z \leq 5000000\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.49999999999999979e105 or 5e6 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified81.0%

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

    if -5.49999999999999979e105 < z < 5e6

    1. Initial program 95.7%

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

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

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

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

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

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

Alternative 9: 63.3% accurate, 2.2× speedup?

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

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

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


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

    1. Initial program 97.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified66.7%

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

    if 2.6000000000000001e199 < a

    1. Initial program 95.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.6 \cdot 10^{+199}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 50.4% 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. Taylor expanded in x around inf 53.3%

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

    \[\leadsto x \]

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

  :herbie-target
  (+ x (/ y (/ (- z a) (- z t))))

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