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

Percentage Accurate: 98.2% → 98.2%
Time: 11.2s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 98.2% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- a t)) x))
double code(double x, double y, double z, double t, double a) {
	return fma(y, ((z - t) / (a - t)), x);
}
function code(x, y, z, t, a)
	return fma(y, Float64(Float64(z - t) / Float64(a - t)), x)
end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)
\end{array}
Derivation
  1. Initial program 98.4%

    \[x + y \cdot \frac{z - t}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative98.4%

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
  4. Add Preprocessing
  5. Final simplification98.4%

    \[\leadsto \mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right) \]
  6. Add Preprocessing

Alternative 2: 76.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.80000000000000018e46 or 1.5000000000000001e145 < t

    1. Initial program 100.0%

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

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

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

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

    if -2.80000000000000018e46 < t < 7.4999999999999997e-82

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.4999999999999997e-82 < t < 1.5000000000000001e145

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+46}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-82}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{+145}:\\ \;\;\;\;x + \frac{z}{\frac{-t}{y}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.4% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.4000000000000001e46 or 1.19999999999999996e145 < t

    1. Initial program 100.0%

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

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

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

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

    if -4.4000000000000001e46 < t < 7.79999999999999947e-82

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.79999999999999947e-82 < t < 1.19999999999999996e145

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+46}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-82}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+145}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.4% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.50000000000000012e42 or 1.19999999999999996e145 < t

    1. Initial program 100.0%

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

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

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

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

    if -4.50000000000000012e42 < t < 4.80000000000000035e-84

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.80000000000000035e-84 < t < 1.19999999999999996e145

    1. Initial program 99.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+42}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-84}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+145}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.2000000000000003e45 or 1.84999999999999997e145 < t

    1. Initial program 100.0%

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

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

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

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

    if -3.2000000000000003e45 < t < 1.24999999999999995e-81

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.24999999999999995e-81 < t < 1.84999999999999997e145

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{+45}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-81}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{+145}:\\ \;\;\;\;x - z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 84.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+80} \lor \neg \left(t \leq 1.02 \cdot 10^{+155}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.79999999999999997e80 or 1.02e155 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified83.7%

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

    if -1.79999999999999997e80 < t < 1.02e155

    1. Initial program 97.8%

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

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

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

Alternative 7: 84.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{+80} \lor \neg \left(t \leq 3 \cdot 10^{+145}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.15000000000000002e80 or 3.0000000000000002e145 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified83.0%

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

    if -2.15000000000000002e80 < t < 3.0000000000000002e145

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 84.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+80} \lor \neg \left(t \leq 1.22 \cdot 10^{+145}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2e80 or 1.21999999999999994e145 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified83.0%

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

    if -2e80 < t < 1.21999999999999994e145

    1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 85.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{a - t}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{-78}:\\
\;\;\;\;x + z \cdot t\_1\\

\mathbf{elif}\;z \leq 9.5 \cdot 10^{+112}:\\
\;\;\;\;x - t \cdot t\_1\\

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


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

    1. Initial program 96.0%

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

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

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

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

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

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

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

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

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

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

    if -6.59999999999999963e-78 < z < 9.5000000000000008e112

    1. Initial program 99.9%

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{a - t}} \]
      3. *-commutative79.6%

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

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

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

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

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

    if 9.5000000000000008e112 < z

    1. Initial program 97.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{-78}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{+112}:\\ \;\;\;\;x - t \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 86.9% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

    if -260 < z < 1.10000000000000005e113

    1. Initial program 99.9%

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{a - t}} \]
      3. *-commutative77.3%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{a - t}{t}}} \]
    5. Simplified90.0%

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

    if 1.10000000000000005e113 < z

    1. Initial program 97.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -260:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{+113}:\\ \;\;\;\;x - \frac{y}{\frac{a - t}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 77.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+45} \lor \neg \left(t \leq 1.75 \cdot 10^{+46}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.6e45 or 1.74999999999999992e46 < t

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified74.9%

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

    if -3.6e45 < t < 1.74999999999999992e46

    1. Initial program 97.4%

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

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

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

Alternative 12: 77.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.4999999999999998e43 or 3.8000000000000003e32 < t

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified74.9%

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

    if -6.4999999999999998e43 < t < 3.8000000000000003e32

    1. Initial program 97.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 63.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+131}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.8 \cdot 10^{+130}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.0000000000000001e131 or 1.8000000000000001e130 < a

    1. Initial program 99.9%

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

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

    if -3.0000000000000001e131 < a < 1.8000000000000001e130

    1. Initial program 97.7%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified60.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{+131}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+130}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 98.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 15: 51.2% accurate, 11.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 98.4%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification51.1%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 99.4% accurate, 0.5× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

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

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

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