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

Percentage Accurate: 85.5% → 98.4%
Time: 9.3s
Alternatives: 10
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 alternatives:

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

Initial Program: 85.5% accurate, 1.0× speedup?

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

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

Alternative 1: 98.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 2: 83.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+35} \lor \neg \left(z \leq 3.45 \cdot 10^{+152}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.8e35 or 3.45e152 < z

    1. Initial program 74.5%

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

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

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

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

    if -3.8e35 < z < 3.45e152

    1. Initial program 94.7%

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

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

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

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

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

Alternative 3: 86.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.8e8 or 2.35000000000000004e111 < z

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e8 < z < 2.35000000000000004e111

    1. Initial program 96.1%

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

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

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

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

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

Alternative 4: 86.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.05e8 or 6e111 < z

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05e8 < z < 6e111

    1. Initial program 96.1%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{\frac{a - z}{y}}} \]
    7. Simplified89.5%

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

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

Alternative 5: 87.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.05e8 or 2.40000000000000006e111 < z

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05e8 < z < 2.40000000000000006e111

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 86.1% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.79999999999999989e93

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.79999999999999989e93 < y < 3.40000000000000003e-103

    1. Initial program 87.9%

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

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

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

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

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

        \[\leadsto x + \left(-\color{blue}{\frac{t}{\frac{a - z}{z}}}\right) \]
      3. distribute-neg-frac92.9%

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

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

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

      \[\leadsto x + \color{blue}{\frac{-t}{\frac{a}{z} - 1}} \]
    8. Step-by-step derivation
      1. distribute-frac-neg92.9%

        \[\leadsto x + \color{blue}{\left(-\frac{t}{\frac{a}{z} - 1}\right)} \]
      2. unsub-neg92.9%

        \[\leadsto \color{blue}{x - \frac{t}{\frac{a}{z} - 1}} \]
      3. sub-neg92.9%

        \[\leadsto x - \frac{t}{\color{blue}{\frac{a}{z} + \left(-1\right)}} \]
      4. metadata-eval92.9%

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

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

    if 3.40000000000000003e-103 < y

    1. Initial program 88.1%

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

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

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

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

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

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

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

Alternative 7: 76.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -230000000 \lor \neg \left(z \leq 2.35 \cdot 10^{+111}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3e8 or 2.35000000000000004e111 < z

    1. Initial program 74.9%

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

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

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

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

    if -2.3e8 < z < 2.35000000000000004e111

    1. Initial program 96.1%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      2. clear-num98.0%

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

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

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

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

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

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

Alternative 8: 62.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-27} \lor \neg \left(z \leq 2.5 \cdot 10^{+111}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.45000000000000002e-27 or 2.4999999999999998e111 < z

    1. Initial program 76.5%

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

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

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

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

    if -1.45000000000000002e-27 < z < 2.4999999999999998e111

    1. Initial program 96.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{-27} \lor \neg \left(z \leq 2.5 \cdot 10^{+111}\right):\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 98.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto x \]
  8. Add Preprocessing

Developer target: 99.3% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

  :herbie-target
  (if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))

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