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

Percentage Accurate: 85.7% → 99.7%
Time: 12.9s
Alternatives: 17
Speedup: 0.6×

Specification

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

\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\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 17 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.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 39.2%

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 4.9999999999999997e304

    1. Initial program 99.9%

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

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

Alternative 2: 92.7% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -5.00000000000000029e278 or 9.99999999999999986e306 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 40.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 34.7%

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

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

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

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

    if -5.00000000000000029e278 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 9.99999999999999986e306

    1. Initial program 99.9%

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

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

Alternative 3: 79.2% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;a \leq 3.8 \cdot 10^{-15}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a}\\

\mathbf{elif}\;a \leq 3800:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -5.49999999999999967e80 or 3.8000000000000002e-15 < a < 3800

    1. Initial program 86.2%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 82.0%

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

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

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

        \[\leadsto x - \frac{y \cdot \left(z - t\right)}{\color{blue}{1 \cdot a}} \]
      4. times-frac87.4%

        \[\leadsto x - \color{blue}{\frac{y}{1} \cdot \frac{z - t}{a}} \]
      5. /-rgt-identity87.4%

        \[\leadsto x - \color{blue}{y} \cdot \frac{z - t}{a} \]
    5. Simplified87.4%

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

    if -5.49999999999999967e80 < a < 1.9e-90

    1. Initial program 88.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 79.7%

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

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

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

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

    if 1.9e-90 < a < 3.8000000000000002e-15

    1. Initial program 91.2%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 78.7%

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

    if 3800 < a

    1. Initial program 67.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 63.5%

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

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

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

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

Alternative 4: 76.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-40}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;z \leq 65:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{+137} \lor \neg \left(z \leq 1.1 \cdot 10^{+181}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.19999999999999996e-40 or 65 < z < 7.80000000000000059e137 or 1.1000000000000001e181 < z

    1. Initial program 74.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 78.1%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified78.1%

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

    if -1.19999999999999996e-40 < z < 65

    1. Initial program 96.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 71.8%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{1} \cdot \frac{y}{a}} + x \]
      4. /-rgt-identity72.3%

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

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

    if 7.80000000000000059e137 < z < 1.1000000000000001e181

    1. Initial program 67.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 70.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y}}} \]
    8. Simplified86.6%

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

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

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

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

Alternative 5: 76.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-41}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;z \leq 3100000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

\mathbf{elif}\;z \leq 7.5 \cdot 10^{+135} \lor \neg \left(z \leq 1.35 \cdot 10^{+181}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.79999999999999955e-41 or 3.1e6 < z < 7.49999999999999947e135 or 1.35000000000000004e181 < z

    1. Initial program 74.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 78.1%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified78.1%

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

    if -5.79999999999999955e-41 < z < 3.1e6

    1. Initial program 96.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 71.8%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{1} \cdot \frac{y}{a}} + x \]
      4. /-rgt-identity72.3%

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

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

    if 7.49999999999999947e135 < z < 1.35000000000000004e181

    1. Initial program 67.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 70.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y}}} \]
    8. Simplified86.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{-41}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 3100000:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+135} \lor \neg \left(z \leq 1.35 \cdot 10^{+181}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 75.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{t}{\frac{z}{y}}\\ \mathbf{if}\;t \leq -3.25 \cdot 10^{+183}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+112}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+165} \lor \neg \left(t \leq 1.62 \cdot 10^{+223}\right):\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ t (/ z y)))))
   (if (<= t -3.25e+183)
     t_1
     (if (<= t 5e+112)
       (+ x (/ y (/ (- z a) z)))
       (if (or (<= t 5.2e+165) (not (<= t 1.62e+223)))
         (+ x (* t (/ y a)))
         t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (t / (z / y));
	double tmp;
	if (t <= -3.25e+183) {
		tmp = t_1;
	} else if (t <= 5e+112) {
		tmp = x + (y / ((z - a) / z));
	} else if ((t <= 5.2e+165) || !(t <= 1.62e+223)) {
		tmp = x + (t * (y / a));
	} 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 - (t / (z / y))
    if (t <= (-3.25d+183)) then
        tmp = t_1
    else if (t <= 5d+112) then
        tmp = x + (y / ((z - a) / z))
    else if ((t <= 5.2d+165) .or. (.not. (t <= 1.62d+223))) then
        tmp = x + (t * (y / a))
    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 - (t / (z / y));
	double tmp;
	if (t <= -3.25e+183) {
		tmp = t_1;
	} else if (t <= 5e+112) {
		tmp = x + (y / ((z - a) / z));
	} else if ((t <= 5.2e+165) || !(t <= 1.62e+223)) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (t / (z / y))
	tmp = 0
	if t <= -3.25e+183:
		tmp = t_1
	elif t <= 5e+112:
		tmp = x + (y / ((z - a) / z))
	elif (t <= 5.2e+165) or not (t <= 1.62e+223):
		tmp = x + (t * (y / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(t / Float64(z / y)))
	tmp = 0.0
	if (t <= -3.25e+183)
		tmp = t_1;
	elseif (t <= 5e+112)
		tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z)));
	elseif ((t <= 5.2e+165) || !(t <= 1.62e+223))
		tmp = Float64(x + Float64(t * Float64(y / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (t / (z / y));
	tmp = 0.0;
	if (t <= -3.25e+183)
		tmp = t_1;
	elseif (t <= 5e+112)
		tmp = x + (y / ((z - a) / z));
	elseif ((t <= 5.2e+165) || ~((t <= 1.62e+223)))
		tmp = x + (t * (y / a));
	else
		tmp = t_1;
	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[t, -3.25e+183], t$95$1, If[LessEqual[t, 5e+112], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 5.2e+165], N[Not[LessEqual[t, 1.62e+223]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 5.2 \cdot 10^{+165} \lor \neg \left(t \leq 1.62 \cdot 10^{+223}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.24999999999999991e183 or 5.2000000000000002e165 < t < 1.61999999999999988e223

    1. Initial program 80.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 77.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y}}} \]
    8. Simplified71.6%

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

    if -3.24999999999999991e183 < t < 5e112

    1. Initial program 86.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 73.7%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z}}} \]
    5. Simplified86.6%

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

    if 5e112 < t < 5.2000000000000002e165 or 1.61999999999999988e223 < t

    1. Initial program 71.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 64.3%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{1} \cdot \frac{y}{a}} + x \]
      4. /-rgt-identity80.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.25 \cdot 10^{+183}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+112}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+165} \lor \neg \left(t \leq 1.62 \cdot 10^{+223}\right):\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t}{\frac{z}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 60.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -7 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.5 \cdot 10^{+182}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;t \leq 8.2 \cdot 10^{+238}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.00000000000000046e185 or 1.5000000000000001e182 < t < 8.1999999999999998e238

    1. Initial program 81.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \color{blue}{\left(\frac{t}{z} \cdot y\right)} \]
      2. associate-*r*57.4%

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-t}{z}} \]
    11. Simplified57.4%

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

    if -7.00000000000000046e185 < t < 1.5000000000000001e182

    1. Initial program 84.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 70.9%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified70.9%

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

    if 8.1999999999999998e238 < t

    1. Initial program 73.2%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 58.5%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{1} \cdot \frac{y}{a}} + x \]
      4. /-rgt-identity71.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
      2. *-commutative44.2%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    9. Simplified44.2%

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

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

Alternative 8: 86.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.0074000000000000003 or 3.20000000000000005e123 < t

    1. Initial program 81.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 78.6%

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

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

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

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

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

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

    if -0.0074000000000000003 < t < 3.20000000000000005e123

    1. Initial program 85.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 74.7%

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

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

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

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

Alternative 9: 77.9% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.79999999999999984e80

    1. Initial program 83.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 75.5%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{1} \cdot \frac{y}{a}} + x \]
      4. /-rgt-identity79.9%

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

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

    if -6.79999999999999984e80 < a < 6.4999999999999997e-72

    1. Initial program 88.5%

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

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

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

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

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

    if 6.4999999999999997e-72 < a

    1. Initial program 75.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 63.1%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z}}} \]
    5. Simplified82.0%

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

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

Alternative 10: 79.0% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.60000000000000008e80

    1. Initial program 83.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 75.5%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{1} \cdot \frac{y}{a}} + x \]
      4. /-rgt-identity79.9%

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

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

    if -8.60000000000000008e80 < a < 1.2600000000000001e-71

    1. Initial program 88.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 78.0%

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

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

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

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

    if 1.2600000000000001e-71 < a

    1. Initial program 75.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 63.1%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z}}} \]
    5. Simplified82.0%

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

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

Alternative 11: 80.6% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -7.49999999999999994e80

    1. Initial program 83.9%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 81.2%

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

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

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

        \[\leadsto x - \frac{y \cdot \left(z - t\right)}{\color{blue}{1 \cdot a}} \]
      4. times-frac87.6%

        \[\leadsto x - \color{blue}{\frac{y}{1} \cdot \frac{z - t}{a}} \]
      5. /-rgt-identity87.6%

        \[\leadsto x - \color{blue}{y} \cdot \frac{z - t}{a} \]
    5. Simplified87.6%

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

    if -7.49999999999999994e80 < a < 6.1999999999999996e-72

    1. Initial program 88.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0 78.0%

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

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

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

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

    if 6.1999999999999996e-72 < a

    1. Initial program 75.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 63.1%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z}}} \]
    5. Simplified82.0%

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

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

Alternative 12: 76.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-40} \lor \neg \left(z \leq 1.35 \cdot 10^{+25}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8e-40 or 1.35e25 < z

    1. Initial program 73.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 76.3%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified76.3%

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

    if -2.8e-40 < z < 1.35e25

    1. Initial program 96.0%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 71.5%

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

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

Alternative 13: 76.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.40000000000000022e-41 or 42000 < z

    1. Initial program 74.1%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 75.9%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified75.9%

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

    if -2.40000000000000022e-41 < z < 42000

    1. Initial program 96.6%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 71.8%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{1} \cdot \frac{y}{a}} + x \]
      4. /-rgt-identity72.3%

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

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

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

Alternative 14: 60.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+246}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.6e246

    1. Initial program 90.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 83.6%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{1} \cdot \frac{y}{a}} + x \]
      4. /-rgt-identity83.6%

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

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

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

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

        \[\leadsto \color{blue}{\frac{t}{a} \cdot y} \]
      2. *-commutative70.6%

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    9. Simplified70.6%

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

    if -3.6e246 < t

    1. Initial program 83.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 63.6%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified63.6%

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

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

Alternative 15: 60.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+248}:\\
\;\;\;\;\frac{y \cdot t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.20000000000000011e248

    1. Initial program 90.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 83.6%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{1} \cdot \frac{y}{a}} + x \]
      4. /-rgt-identity83.6%

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

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

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

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

    if -6.20000000000000011e248 < t

    1. Initial program 83.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 63.6%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified63.6%

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

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

Alternative 16: 61.4% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.9 \cdot 10^{+135}:\\
\;\;\;\;y + x\\

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


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

    1. Initial program 86.7%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 61.5%

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified61.5%

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

    if 6.89999999999999972e135 < a

    1. Initial program 62.4%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 76.3%

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

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

Alternative 17: 49.9% 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.7%

    \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
  2. Add Preprocessing
  3. Taylor expanded in x around inf 47.1%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification47.1%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 98.2% accurate, 1.0× speedup?

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

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

Reproduce

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

  :herbie-target
  (+ x (/ y (/ (- z a) (- z t))))

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