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

Percentage Accurate: 85.0% → 99.7%
Time: 9.3s
Alternatives: 12
Speedup: 0.7×

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 12 alternatives:

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

Initial Program: 85.0% 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: 99.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+304}\right):\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\_1 + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* (- y z) t) (- a z))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+304)))
     (+ x (/ (- y z) (/ (- a z) t)))
     (+ t_1 x))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y - z) * t) / (a - z);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+304)) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else {
		tmp = t_1 + x;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y - z) * t) / (a - z);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+304)) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else {
		tmp = t_1 + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = ((y - z) * t) / (a - z)
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 1e+304):
		tmp = x + ((y - z) / ((a - z) / t))
	else:
		tmp = t_1 + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+304))
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t)));
	else
		tmp = Float64(t_1 + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = ((y - z) * t) / (a - z);
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 1e+304)))
		tmp = x + ((y - z) / ((a - z) / t));
	else
		tmp = t_1 + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+304]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+304}\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0 or 9.9999999999999994e303 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 32.4%

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

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.9999999999999994e303

    1. Initial program 99.9%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

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

Alternative 2: 99.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+304}\right):\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1 + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* (- y z) t) (- a z))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+304)))
     (+ x (* (- y z) (/ t (- a z))))
     (+ t_1 x))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y - z) * t) / (a - z);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+304)) {
		tmp = x + ((y - z) * (t / (a - z)));
	} else {
		tmp = t_1 + x;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = ((y - z) * t) / (a - z);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+304)) {
		tmp = x + ((y - z) * (t / (a - z)));
	} else {
		tmp = t_1 + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = ((y - z) * t) / (a - z)
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 1e+304):
		tmp = x + ((y - z) * (t / (a - z)))
	else:
		tmp = t_1 + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+304))
		tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z))));
	else
		tmp = Float64(t_1 + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = ((y - z) * t) / (a - z);
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 1e+304)))
		tmp = x + ((y - z) * (t / (a - z)));
	else
		tmp = t_1 + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+304]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+304}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -inf.0 or 9.9999999999999994e303 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 32.4%

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

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

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

    if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.9999999999999994e303

    1. Initial program 99.9%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

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

Alternative 3: 84.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+112} \lor \neg \left(z \leq 9 \cdot 10^{+159}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.4999999999999998e112 or 9.00000000000000053e159 < z

    1. Initial program 59.3%

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

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

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

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

    if -6.4999999999999998e112 < z < 9.00000000000000053e159

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 87.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.4999999999999996e-23 or 2.6999999999999998e74 < y

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

    if -8.4999999999999996e-23 < y < 2.6999999999999998e74

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

Alternative 5: 86.0% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 50.2%

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

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

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

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

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

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

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

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

    if -1.10000000000000005e113 < z < 3.7999999999999997e147

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

    if 3.7999999999999997e147 < z

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

Alternative 6: 74.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{-33} \lor \neg \left(z \leq 9 \cdot 10^{-90}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.4000000000000002e-33 or 9.00000000000000017e-90 < z

    1. Initial program 75.7%

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

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

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

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

    if -5.4000000000000002e-33 < z < 9.00000000000000017e-90

    1. Initial program 94.8%

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

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

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

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

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

Alternative 7: 76.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+80} \lor \neg \left(z \leq 8.5 \cdot 10^{+24}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.20000000000000003e80 or 8.49999999999999959e24 < z

    1. Initial program 69.7%

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

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

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

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

    if -4.20000000000000003e80 < z < 8.49999999999999959e24

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

Alternative 8: 76.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+80} \lor \neg \left(z \leq 1.25 \cdot 10^{+24}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.19999999999999963e80 or 1.25000000000000011e24 < z

    1. Initial program 69.7%

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

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

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

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

    if -5.19999999999999963e80 < z < 1.25000000000000011e24

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+79} \lor \neg \left(z \leq 1.1 \cdot 10^{+24}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.49999999999999954e79 or 1.10000000000000001e24 < z

    1. Initial program 69.7%

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

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

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

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

    if -6.49999999999999954e79 < z < 1.10000000000000001e24

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 95.8% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 3.80000000000000024e162

    1. Initial program 86.6%

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

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

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

    if 3.80000000000000024e162 < z

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

Alternative 11: 62.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-137} \lor \neg \left(z \leq 1.1 \cdot 10^{-89}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.04999999999999996e-137 or 1.10000000000000006e-89 < z

    1. Initial program 77.1%

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

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

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

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

    if -1.04999999999999996e-137 < z < 1.10000000000000006e-89

    1. Initial program 96.8%

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

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

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

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

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

Alternative 12: 50.0% 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 84.1%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification56.2%

    \[\leadsto x \]
  7. 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 2024069 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
  :precision binary64

  :alt
  (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))))