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

Percentage Accurate: 85.6% → 99.0%
Time: 10.5s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 85.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\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.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;t\_1 \leq 20000000:\\ \;\;\;\;t\_1 + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* (- y z) t) (- a z))))
   (if (<= t_1 (- INFINITY))
     (+ x (/ (- y z) (/ (- a z) t)))
     (if (<= t_1 20000000.0) (+ t_1 x) (fma (- y z) (/ t (- a z)) 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)) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else if (t_1 <= 20000000.0) {
		tmp = t_1 + x;
	} else {
		tmp = fma((y - z), (t / (a - z)), 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))
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t)));
	elseif (t_1 <= 20000000.0)
		tmp = Float64(t_1 + x);
	else
		tmp = fma(Float64(y - z), Float64(t / Float64(a - z)), x);
	end
	return 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[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20000000.0], N[(t$95$1 + x), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] + 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:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\

\mathbf{elif}\;t\_1 \leq 20000000:\\
\;\;\;\;t\_1 + x\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\


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

    1. Initial program 45.2%

      \[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)) < 2e7

    1. Initial program 99.3%

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

    if 2e7 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 65.0%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative65.0%

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)} \]
    4. Add Preprocessing
  3. Recombined 3 regimes into one program.
  4. Final simplification99.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} \leq -\infty:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;\frac{\left(y - z\right) \cdot t}{a - z} \leq 20000000:\\ \;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z} + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 99.0% 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 20000000\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 20000000.0)))
     (+ 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 <= 20000000.0)) {
		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 <= 20000000.0)) {
		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 <= 20000000.0):
		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 <= 20000000.0))
		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 <= 20000000.0)))
		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, 20000000.0]], $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 20000000\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 2e7 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 58.4%

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

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

      \[\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)) < 2e7

    1. Initial program 99.3%

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

    \[\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 20000000\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: 99.0% 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:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\ \mathbf{elif}\;t\_1 \leq 20000000:\\ \;\;\;\;t\_1 + x\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* (- y z) t) (- a z))))
   (if (<= t_1 (- INFINITY))
     (+ x (/ (- y z) (/ (- a z) t)))
     (if (<= t_1 20000000.0) (+ t_1 x) (+ x (* (- y z) (/ t (- a z))))))))
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)) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else if (t_1 <= 20000000.0) {
		tmp = t_1 + x;
	} else {
		tmp = x + ((y - z) * (t / (a - z)));
	}
	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) {
		tmp = x + ((y - z) / ((a - z) / t));
	} else if (t_1 <= 20000000.0) {
		tmp = t_1 + x;
	} else {
		tmp = x + ((y - z) * (t / (a - z)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = ((y - z) * t) / (a - z)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = x + ((y - z) / ((a - z) / t))
	elif t_1 <= 20000000.0:
		tmp = t_1 + x
	else:
		tmp = x + ((y - z) * (t / (a - z)))
	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))
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t)));
	elseif (t_1 <= 20000000.0)
		tmp = Float64(t_1 + x);
	else
		tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z))));
	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)
		tmp = x + ((y - z) / ((a - z) / t));
	elseif (t_1 <= 20000000.0)
		tmp = t_1 + x;
	else
		tmp = x + ((y - z) * (t / (a - z)));
	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[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 20000000.0], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 20000000:\\
\;\;\;\;t\_1 + x\\

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


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

    1. Initial program 45.2%

      \[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)) < 2e7

    1. Initial program 99.3%

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

    if 2e7 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 65.0%

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

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

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

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

Alternative 4: 76.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{t}{\frac{z}{y}}\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{+183}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-7}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-60}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 3.55 \cdot 10^{+143}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ t (/ z y)))))
   (if (<= z -7.2e+183)
     (+ t x)
     (if (<= z -3.1e-7)
       t_1
       (if (<= z 4.4e-60)
         (+ x (* y (/ t a)))
         (if (<= z 3.55e+143) t_1 (+ t x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (t / (z / y));
	double tmp;
	if (z <= -7.2e+183) {
		tmp = t + x;
	} else if (z <= -3.1e-7) {
		tmp = t_1;
	} else if (z <= 4.4e-60) {
		tmp = x + (y * (t / a));
	} else if (z <= 3.55e+143) {
		tmp = t_1;
	} else {
		tmp = t + 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) :: t_1
    real(8) :: tmp
    t_1 = x - (t / (z / y))
    if (z <= (-7.2d+183)) then
        tmp = t + x
    else if (z <= (-3.1d-7)) then
        tmp = t_1
    else if (z <= 4.4d-60) then
        tmp = x + (y * (t / a))
    else if (z <= 3.55d+143) then
        tmp = t_1
    else
        tmp = t + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (t / (z / y));
	double tmp;
	if (z <= -7.2e+183) {
		tmp = t + x;
	} else if (z <= -3.1e-7) {
		tmp = t_1;
	} else if (z <= 4.4e-60) {
		tmp = x + (y * (t / a));
	} else if (z <= 3.55e+143) {
		tmp = t_1;
	} else {
		tmp = t + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (t / (z / y))
	tmp = 0
	if z <= -7.2e+183:
		tmp = t + x
	elif z <= -3.1e-7:
		tmp = t_1
	elif z <= 4.4e-60:
		tmp = x + (y * (t / a))
	elif z <= 3.55e+143:
		tmp = t_1
	else:
		tmp = t + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(t / Float64(z / y)))
	tmp = 0.0
	if (z <= -7.2e+183)
		tmp = Float64(t + x);
	elseif (z <= -3.1e-7)
		tmp = t_1;
	elseif (z <= 4.4e-60)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif (z <= 3.55e+143)
		tmp = t_1;
	else
		tmp = Float64(t + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (t / (z / y));
	tmp = 0.0;
	if (z <= -7.2e+183)
		tmp = t + x;
	elseif (z <= -3.1e-7)
		tmp = t_1;
	elseif (z <= 4.4e-60)
		tmp = x + (y * (t / a));
	elseif (z <= 3.55e+143)
		tmp = t_1;
	else
		tmp = t + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+183], N[(t + x), $MachinePrecision], If[LessEqual[z, -3.1e-7], t$95$1, If[LessEqual[z, 4.4e-60], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.55e+143], t$95$1, N[(t + x), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{t}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+183}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;z \leq -3.1 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.55 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.20000000000000046e183 or 3.55000000000000021e143 < z

    1. Initial program 56.6%

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

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

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

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

    if -7.20000000000000046e183 < z < -3.1e-7 or 4.3999999999999998e-60 < z < 3.55000000000000021e143

    1. Initial program 83.5%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative83.5%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot \frac{y - z}{z}} \]
    8. Step-by-step derivation
      1. clear-num73.1%

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y - z}}} \]
    9. Applied egg-rr73.2%

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

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

    if -3.1e-7 < z < 4.3999999999999998e-60

    1. Initial program 96.6%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative96.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{a}{\color{blue}{y \cdot t}}} + x \]
      3. associate-/l/82.6%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{a}{t}}{y}}} + x \]
      4. associate-/r/82.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{t}} \cdot y} + x \]
      5. clear-num83.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+183}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{-7}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-60}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 3.55 \cdot 10^{+143}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - t \cdot \frac{y}{z}\\ \mathbf{if}\;z \leq -1.24 \cdot 10^{+185}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{-5}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-60}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 3.55 \cdot 10^{+143}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* t (/ y z)))))
   (if (<= z -1.24e+185)
     (+ t x)
     (if (<= z -2.35e-5)
       t_1
       (if (<= z 5.2e-60)
         (+ x (* y (/ t a)))
         (if (<= z 3.55e+143) t_1 (+ t x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (t * (y / z));
	double tmp;
	if (z <= -1.24e+185) {
		tmp = t + x;
	} else if (z <= -2.35e-5) {
		tmp = t_1;
	} else if (z <= 5.2e-60) {
		tmp = x + (y * (t / a));
	} else if (z <= 3.55e+143) {
		tmp = t_1;
	} else {
		tmp = t + 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) :: t_1
    real(8) :: tmp
    t_1 = x - (t * (y / z))
    if (z <= (-1.24d+185)) then
        tmp = t + x
    else if (z <= (-2.35d-5)) then
        tmp = t_1
    else if (z <= 5.2d-60) then
        tmp = x + (y * (t / a))
    else if (z <= 3.55d+143) then
        tmp = t_1
    else
        tmp = t + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (t * (y / z));
	double tmp;
	if (z <= -1.24e+185) {
		tmp = t + x;
	} else if (z <= -2.35e-5) {
		tmp = t_1;
	} else if (z <= 5.2e-60) {
		tmp = x + (y * (t / a));
	} else if (z <= 3.55e+143) {
		tmp = t_1;
	} else {
		tmp = t + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (t * (y / z))
	tmp = 0
	if z <= -1.24e+185:
		tmp = t + x
	elif z <= -2.35e-5:
		tmp = t_1
	elif z <= 5.2e-60:
		tmp = x + (y * (t / a))
	elif z <= 3.55e+143:
		tmp = t_1
	else:
		tmp = t + x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(t * Float64(y / z)))
	tmp = 0.0
	if (z <= -1.24e+185)
		tmp = Float64(t + x);
	elseif (z <= -2.35e-5)
		tmp = t_1;
	elseif (z <= 5.2e-60)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif (z <= 3.55e+143)
		tmp = t_1;
	else
		tmp = Float64(t + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (t * (y / z));
	tmp = 0.0;
	if (z <= -1.24e+185)
		tmp = t + x;
	elseif (z <= -2.35e-5)
		tmp = t_1;
	elseif (z <= 5.2e-60)
		tmp = x + (y * (t / a));
	elseif (z <= 3.55e+143)
		tmp = t_1;
	else
		tmp = t + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.24e+185], N[(t + x), $MachinePrecision], If[LessEqual[z, -2.35e-5], t$95$1, If[LessEqual[z, 5.2e-60], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.55e+143], t$95$1, N[(t + x), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -1.24 \cdot 10^{+185}:\\
\;\;\;\;t + x\\

\mathbf{elif}\;z \leq -2.35 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 3.55 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.2399999999999999e185 or 3.55000000000000021e143 < z

    1. Initial program 56.6%

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

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

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

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

    if -1.2399999999999999e185 < z < -2.34999999999999986e-5 or 5.1999999999999995e-60 < z < 3.55000000000000021e143

    1. Initial program 83.5%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative83.5%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot \frac{y - z}{z}} \]
    8. Taylor expanded in y around inf 58.3%

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

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

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

    if -2.34999999999999986e-5 < z < 5.1999999999999995e-60

    1. Initial program 96.6%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative96.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{a}{\color{blue}{y \cdot t}}} + x \]
      3. associate-/l/82.6%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{a}{t}}{y}}} + x \]
      4. associate-/r/82.6%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{t}} \cdot y} + x \]
      5. clear-num83.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.24 \cdot 10^{+185}:\\ \;\;\;\;t + x\\ \mathbf{elif}\;z \leq -2.35 \cdot 10^{-5}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{-60}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 3.55 \cdot 10^{+143}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 87.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+97} \lor \neg \left(y \leq 7.2 \cdot 10^{-30}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.54999999999999991e97 or 7.2000000000000006e-30 < y

    1. Initial program 81.7%

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

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

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

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

    if -1.54999999999999991e97 < y < 7.2000000000000006e-30

    1. Initial program 84.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \left(-\frac{z}{a - z}\right)} \]
      4. distribute-neg-frac292.8%

        \[\leadsto x + t \cdot \color{blue}{\frac{z}{-\left(a - z\right)}} \]
      5. neg-sub092.8%

        \[\leadsto x + t \cdot \frac{z}{\color{blue}{0 - \left(a - z\right)}} \]
      6. sub-neg92.8%

        \[\leadsto x + t \cdot \frac{z}{0 - \color{blue}{\left(a + \left(-z\right)\right)}} \]
      7. +-commutative92.8%

        \[\leadsto x + t \cdot \frac{z}{0 - \color{blue}{\left(\left(-z\right) + a\right)}} \]
      8. associate--r+92.8%

        \[\leadsto x + t \cdot \frac{z}{\color{blue}{\left(0 - \left(-z\right)\right) - a}} \]
      9. neg-sub092.8%

        \[\leadsto x + t \cdot \frac{z}{\color{blue}{\left(-\left(-z\right)\right)} - a} \]
      10. remove-double-neg92.8%

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

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

        \[\leadsto \color{blue}{t \cdot \frac{z}{z - a} + x} \]
      2. *-un-lft-identity92.8%

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(1, t \cdot \frac{z}{z - a}, x\right)} \]
      4. clear-num92.7%

        \[\leadsto \mathsf{fma}\left(1, t \cdot \color{blue}{\frac{1}{\frac{z - a}{z}}}, x\right) \]
      5. un-div-inv92.8%

        \[\leadsto \mathsf{fma}\left(1, \color{blue}{\frac{t}{\frac{z - a}{z}}}, x\right) \]
      6. div-sub92.8%

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\color{blue}{\frac{z}{z} - \frac{a}{z}}}, x\right) \]
      7. *-inverses92.8%

        \[\leadsto \mathsf{fma}\left(1, \frac{t}{\color{blue}{1} - \frac{a}{z}}, x\right) \]
    9. Applied egg-rr92.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(1, \frac{t}{1 - \frac{a}{z}}, x\right)} \]
    10. Step-by-step derivation
      1. fma-undefine92.8%

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

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

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

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

Alternative 7: 87.7% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.54999999999999991e97 or 8.000000000000001e-30 < y

    1. Initial program 81.7%

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

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

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

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

    if -1.54999999999999991e97 < y < 8.000000000000001e-30

    1. Initial program 84.2%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \left(-\frac{z}{a - z}\right)} \]
      4. distribute-neg-frac292.8%

        \[\leadsto x + t \cdot \color{blue}{\frac{z}{-\left(a - z\right)}} \]
      5. neg-sub092.8%

        \[\leadsto x + t \cdot \frac{z}{\color{blue}{0 - \left(a - z\right)}} \]
      6. sub-neg92.8%

        \[\leadsto x + t \cdot \frac{z}{0 - \color{blue}{\left(a + \left(-z\right)\right)}} \]
      7. +-commutative92.8%

        \[\leadsto x + t \cdot \frac{z}{0 - \color{blue}{\left(\left(-z\right) + a\right)}} \]
      8. associate--r+92.8%

        \[\leadsto x + t \cdot \frac{z}{\color{blue}{\left(0 - \left(-z\right)\right) - a}} \]
      9. neg-sub092.8%

        \[\leadsto x + t \cdot \frac{z}{\color{blue}{\left(-\left(-z\right)\right)} - a} \]
      10. remove-double-neg92.8%

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

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

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

Alternative 8: 76.1% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 77.7%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative77.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y - z}}} \]
    9. Applied egg-rr69.0%

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

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

    if -1.04999999999999993e131 < y < 3.2e16

    1. Initial program 84.3%

      \[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 y around 0 75.1%

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

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

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

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

        \[\leadsto x + t \cdot \color{blue}{\frac{z}{-\left(a - z\right)}} \]
      5. neg-sub089.4%

        \[\leadsto x + t \cdot \frac{z}{\color{blue}{0 - \left(a - z\right)}} \]
      6. sub-neg89.4%

        \[\leadsto x + t \cdot \frac{z}{0 - \color{blue}{\left(a + \left(-z\right)\right)}} \]
      7. +-commutative89.4%

        \[\leadsto x + t \cdot \frac{z}{0 - \color{blue}{\left(\left(-z\right) + a\right)}} \]
      8. associate--r+89.4%

        \[\leadsto x + t \cdot \frac{z}{\color{blue}{\left(0 - \left(-z\right)\right) - a}} \]
      9. neg-sub089.4%

        \[\leadsto x + t \cdot \frac{z}{\color{blue}{\left(-\left(-z\right)\right)} - a} \]
      10. remove-double-neg89.4%

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

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

    if 3.2e16 < y

    1. Initial program 83.0%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative83.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{a}{\color{blue}{y \cdot t}}} + x \]
      3. associate-/l/66.2%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{a}{t}}{y}}} + x \]
      4. associate-/r/66.2%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{t}} \cdot y} + x \]
      5. clear-num67.1%

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

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

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

Alternative 9: 75.7% accurate, 0.6× speedup?

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

    1. Initial program 59.5%

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

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

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

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

    if -1.12e86 < z < 3.55000000000000021e143

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{\frac{a}{\color{blue}{y \cdot t}}} + x \]
      3. associate-/l/70.8%

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{a}{t}}{y}}} + x \]
      4. associate-/r/70.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{a}{t}} \cdot y} + x \]
      5. clear-num71.2%

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

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

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

Alternative 10: 75.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.45 \cdot 10^{+85} \lor \neg \left(z \leq 3.55 \cdot 10^{+143}\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 -1.45e+85) (not (<= z 3.55e+143))) (+ t x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.45e+85) || !(z <= 3.55e+143)) {
		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 <= (-1.45d+85)) .or. (.not. (z <= 3.55d+143))) 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 <= -1.45e+85) || !(z <= 3.55e+143)) {
		tmp = t + x;
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.45e+85) or not (z <= 3.55e+143):
		tmp = t + x
	else:
		tmp = x + (t * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.45e+85) || !(z <= 3.55e+143))
		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 <= -1.45e+85) || ~((z <= 3.55e+143)))
		tmp = t + x;
	else
		tmp = x + (t * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+85], N[Not[LessEqual[z, 3.55e+143]], $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 -1.45 \cdot 10^{+85} \lor \neg \left(z \leq 3.55 \cdot 10^{+143}\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 < -1.44999999999999999e85 or 3.55000000000000021e143 < z

    1. Initial program 59.5%

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

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

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

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

    if -1.44999999999999999e85 < z < 3.55000000000000021e143

    1. Initial program 93.1%

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

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

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

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

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

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

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

Alternative 11: 63.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{+167} \lor \neg \left(t \leq 1.3 \cdot 10^{+97}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.70000000000000013e167 or 1.3e97 < t

    1. Initial program 65.7%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative65.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y - z}}} \]
    9. Applied egg-rr63.4%

      \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y - z}}} \]
    10. Taylor expanded in t around inf 53.8%

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

    if -4.70000000000000013e167 < t < 1.3e97

    1. Initial program 91.5%

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

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

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

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

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

Alternative 12: 59.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+131}:\\
\;\;\;\;\frac{t}{\frac{z}{-y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.9999999999999991e130

    1. Initial program 77.7%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative77.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y - z}}} \]
    9. Applied egg-rr69.0%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    11. Step-by-step derivation
      1. mul-1-neg38.8%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z}} \]
      3. distribute-lft-neg-in50.7%

        \[\leadsto \color{blue}{\left(-t\right) \cdot \frac{y}{z}} \]
    12. Simplified50.7%

      \[\leadsto \color{blue}{\left(-t\right) \cdot \frac{y}{z}} \]
    13. Step-by-step derivation
      1. clear-num50.7%

        \[\leadsto \left(-t\right) \cdot \color{blue}{\frac{1}{\frac{z}{y}}} \]
      2. un-div-inv50.8%

        \[\leadsto \color{blue}{\frac{-t}{\frac{z}{y}}} \]
      3. distribute-neg-frac50.8%

        \[\leadsto \color{blue}{-\frac{t}{\frac{z}{y}}} \]
      4. distribute-neg-frac250.8%

        \[\leadsto \color{blue}{\frac{t}{-\frac{z}{y}}} \]
      5. distribute-neg-frac250.8%

        \[\leadsto \frac{t}{\color{blue}{\frac{z}{-y}}} \]
    14. Applied egg-rr50.8%

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

    if -9.9999999999999991e130 < y

    1. Initial program 83.9%

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

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

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

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

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

Alternative 13: 59.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+131}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.04999999999999993e131

    1. Initial program 77.7%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Step-by-step derivation
      1. +-commutative77.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - t \cdot \frac{y - z}{z}} \]
    8. Taylor expanded in y around inf 38.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    9. Step-by-step derivation
      1. mul-1-neg38.8%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z}} \]
      3. distribute-rgt-neg-in50.7%

        \[\leadsto \color{blue}{t \cdot \left(-\frac{y}{z}\right)} \]
      4. distribute-frac-neg250.7%

        \[\leadsto t \cdot \color{blue}{\frac{y}{-z}} \]
    10. Simplified50.7%

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

    if -1.04999999999999993e131 < y

    1. Initial program 83.9%

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

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

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

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

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

Alternative 14: 95.8% accurate, 1.0× speedup?

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

\\
x + \left(y - z\right) \cdot \frac{t}{a - z}
\end{array}
Derivation
  1. Initial program 83.0%

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

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

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

Alternative 15: 62.2% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.8 \cdot 10^{+159}:\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.8000000000000001e159

    1. Initial program 83.3%

      \[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 z around inf 57.2%

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

    if 2.8000000000000001e159 < a

    1. Initial program 81.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.8 \cdot 10^{+159}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 51.2% accurate, 11.0× speedup?

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

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

    \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
  2. Step-by-step derivation
    1. +-commutative83.0%

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

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

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

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

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

Developer Target 1: 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 2024163 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -10682974490174067/10000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 312887599100691/80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t)))))

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