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

Percentage Accurate: 85.9% → 98.3%
Time: 8.6s
Alternatives: 12
Speedup: 1.0×

Specification

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

\\
x + \frac{y \cdot \left(z - t\right)}{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 12 alternatives:

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

Initial Program: 85.9% accurate, 1.0× speedup?

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

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

Alternative 1: 98.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

Alternative 2: 75.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq 1.8 \cdot 10^{-98}:\\
\;\;\;\;x - z \cdot \left(y \cdot \frac{-1}{a}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3e15 or 3.60000000000000018e171 < t

    1. Initial program 73.3%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified87.9%

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

    if -3e15 < t < 1.8000000000000001e-98

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

    if 1.8000000000000001e-98 < t < 3.60000000000000018e171

    1. Initial program 91.1%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{t}} \]
      4. div-sub83.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+15}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-98}:\\ \;\;\;\;x - z \cdot \left(y \cdot \frac{-1}{a}\right)\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+171}:\\ \;\;\;\;x - z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.6e18 or 3.4999999999999999e171 < t

    1. Initial program 73.3%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified87.9%

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

    if -7.6e18 < t < 1.55e-98

    1. Initial program 96.2%

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

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

      \[\leadsto \color{blue}{x + y \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.2%

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

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

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

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

    if 1.55e-98 < t < 3.4999999999999999e171

    1. Initial program 91.1%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{t}} \]
      4. div-sub83.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.6 \cdot 10^{+18}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-98}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+171}:\\ \;\;\;\;x - z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.4% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 6800:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\

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


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

    1. Initial program 77.7%

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

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

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

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

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

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

    if -1.95e16 < t < 1.55e-98

    1. Initial program 96.2%

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

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

      \[\leadsto \color{blue}{x + y \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.2%

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

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

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

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

    if 1.55e-98 < t < 6800

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 86.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+54} \lor \neg \left(t \leq 9 \cdot 10^{+61}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{t - z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.50000000000000042e54 or 9e61 < t

    1. Initial program 75.2%

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

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

      \[\leadsto \color{blue}{x + y \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{0 - \frac{t}{z - t}}} \]
    11. Applied egg-rr91.1%

      \[\leadsto x + \frac{y}{\color{blue}{0 - \frac{t}{z - t}}} \]
    12. Step-by-step derivation
      1. neg-sub091.1%

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

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

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

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

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

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

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

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

    if -7.50000000000000042e54 < t < 9e61

    1. Initial program 96.0%

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

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

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

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

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

Alternative 6: 81.6% accurate, 0.6× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x - z \cdot \left(y \cdot \frac{-1}{a}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.7e-109 or 1.6e-98 < t

    1. Initial program 84.3%

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

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

      \[\leadsto \color{blue}{x + y \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num98.9%

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

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

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

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

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

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

      \[\leadsto x + \frac{y}{\color{blue}{\frac{t}{-\left(z - t\right)}}} \]
    10. Step-by-step derivation
      1. distribute-frac-neg285.4%

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

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

      \[\leadsto x + \frac{y}{\color{blue}{0 - \frac{t}{z - t}}} \]
    12. Step-by-step derivation
      1. neg-sub085.4%

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

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

        \[\leadsto x + \frac{y}{\frac{t}{-\color{blue}{\left(z + \left(-t\right)\right)}}} \]
      4. distribute-neg-in85.4%

        \[\leadsto x + \frac{y}{\frac{t}{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}} \]
      5. remove-double-neg85.4%

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

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

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

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

    if -2.7e-109 < t < 1.6e-98

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

Alternative 7: 86.2% accurate, 0.6× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;x + \left(y - z \cdot \frac{y}{t}\right)\\


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

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

    if -7.8e6 < t < 1.3199999999999999e62

    1. Initial program 95.7%

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

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

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

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

    if 1.3199999999999999e62 < t

    1. Initial program 75.4%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{t}} \]
      4. div-sub90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\left(\frac{y}{t} \cdot z - y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification90.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7800000:\\ \;\;\;\;x + y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;t \leq 1.32 \cdot 10^{+62}:\\ \;\;\;\;x + \frac{y \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z \cdot \frac{y}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 86.3% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

    if -1.02e6 < t < 9e61

    1. Initial program 95.7%

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

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

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

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

    if 9e61 < t

    1. Initial program 75.4%

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

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

      \[\leadsto \color{blue}{x + y \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.9%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{0 - \frac{t}{z - t}}} \]
    11. Applied egg-rr90.1%

      \[\leadsto x + \frac{y}{\color{blue}{0 - \frac{t}{z - t}}} \]
    12. Step-by-step derivation
      1. neg-sub090.1%

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

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

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

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

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

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

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

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

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

Alternative 9: 77.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.65e15 or 2.39999999999999995e-15 < t

    1. Initial program 78.4%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified80.9%

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

    if -2.65e15 < t < 2.39999999999999995e-15

    1. Initial program 96.7%

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

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

      \[\leadsto \color{blue}{x + y \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.7%

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

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

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

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

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

Alternative 10: 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 87.0%

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

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

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

Alternative 11: 61.4% accurate, 3.7× speedup?

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

\\
x + y
\end{array}
Derivation
  1. Initial program 87.0%

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

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

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

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

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

    \[\leadsto \color{blue}{y + x} \]
  8. Final simplification64.4%

    \[\leadsto x + y \]
  9. Add Preprocessing

Alternative 12: 50.8% 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 87.0%

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

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

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

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

Developer target: 98.3% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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