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

Percentage Accurate: 85.6% → 98.3%
Time: 8.0s
Alternatives: 11
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 11 alternatives:

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

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

\\
x - \frac{y}{\frac{t - a}{z - 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.8%

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

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

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

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

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

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

Alternative 2: 84.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{+182} \lor \neg \left(t \leq 4.1 \cdot 10^{+48}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.11999999999999994e182 or 4.1000000000000003e48 < t

    1. Initial program 70.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 t around inf 84.8%

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

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

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

    if -1.11999999999999994e182 < t < 4.1000000000000003e48

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

Alternative 3: 88.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+20} \lor \neg \left(z \leq 1.2 \cdot 10^{+40}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9e20 or 1.2e40 < z

    1. Initial program 81.8%

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

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

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

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

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

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

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

    if -1.9e20 < z < 1.2e40

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{y}{\color{blue}{-\left(\frac{a}{t} + -1\right)}} \]
    10. Taylor expanded in y around 0 93.1%

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

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

Alternative 4: 88.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+20} \lor \neg \left(z \leq 1.5 \cdot 10^{+40}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.9e20 or 1.5000000000000001e40 < z

    1. Initial program 81.8%

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

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

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

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

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

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

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

    if -1.9e20 < z < 1.5000000000000001e40

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{y}{\color{blue}{-\left(\frac{a}{t} + -1\right)}} \]
    10. Taylor expanded in y around 0 93.1%

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

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

Alternative 5: 88.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+89} \lor \neg \left(t \leq 4.5 \cdot 10^{+45}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.8000000000000004e89 or 4.4999999999999998e45 < t

    1. Initial program 73.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 71.3%

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

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

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

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

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

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

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

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

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

    if -6.8000000000000004e89 < t < 4.4999999999999998e45

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

Alternative 6: 88.4% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e90 < t < 1.55e47

    1. Initial program 93.8%

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

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

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

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

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

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

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

    if 1.55e47 < t

    1. Initial program 69.8%

      \[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 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+89} \lor \neg \left(t \leq 1.25 \cdot 10^{-9}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.8000000000000004e89 or 1.25e-9 < t

    1. Initial program 77.6%

      \[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 79.2%

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

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

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

    if -6.8000000000000004e89 < t < 1.25e-9

    1. Initial program 93.2%

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

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

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

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y}{a}} \]
    7. Applied egg-rr79.1%

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

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

Alternative 8: 76.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+90} \lor \neg \left(t \leq 8.6 \cdot 10^{+47}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.4500000000000001e90 or 8.59999999999999989e47 < t

    1. Initial program 73.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 t around inf 82.0%

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

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

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

    if -1.4500000000000001e90 < t < 8.59999999999999989e47

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

Alternative 9: 62.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-20} \lor \neg \left(t \leq 4.4 \cdot 10^{-133}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.29999999999999997e-20 or 4.4000000000000001e-133 < t

    1. Initial program 82.7%

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

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

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

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

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

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

    if -1.29999999999999997e-20 < t < 4.4000000000000001e-133

    1. Initial program 93.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{-20} \lor \neg \left(t \leq 4.4 \cdot 10^{-133}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \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.8%

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

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

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

Alternative 11: 50.3% 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.8%

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification47.7%

    \[\leadsto x \]
  7. 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 2024078 
(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))))