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

Percentage Accurate: 85.3% → 98.5%
Time: 12.2s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 98.5% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

Alternative 2: 59.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{a - t}\\ \mathbf{if}\;a \leq -9.6 \cdot 10^{-195}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-221}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-253}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-276}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+126}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z (- a t)))))
   (if (<= a -9.6e-195)
     (+ x y)
     (if (<= a -1.55e-221)
       t_1
       (if (<= a -7e-253)
         (+ x y)
         (if (<= a 4.8e-276) t_1 (if (<= a 1.25e+126) (+ x y) x)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / (a - t));
	double tmp;
	if (a <= -9.6e-195) {
		tmp = x + y;
	} else if (a <= -1.55e-221) {
		tmp = t_1;
	} else if (a <= -7e-253) {
		tmp = x + y;
	} else if (a <= 4.8e-276) {
		tmp = t_1;
	} else if (a <= 1.25e+126) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z / (a - t))
    if (a <= (-9.6d-195)) then
        tmp = x + y
    else if (a <= (-1.55d-221)) then
        tmp = t_1
    else if (a <= (-7d-253)) then
        tmp = x + y
    else if (a <= 4.8d-276) then
        tmp = t_1
    else if (a <= 1.25d+126) then
        tmp = x + y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / (a - t));
	double tmp;
	if (a <= -9.6e-195) {
		tmp = x + y;
	} else if (a <= -1.55e-221) {
		tmp = t_1;
	} else if (a <= -7e-253) {
		tmp = x + y;
	} else if (a <= 4.8e-276) {
		tmp = t_1;
	} else if (a <= 1.25e+126) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / (a - t))
	tmp = 0
	if a <= -9.6e-195:
		tmp = x + y
	elif a <= -1.55e-221:
		tmp = t_1
	elif a <= -7e-253:
		tmp = x + y
	elif a <= 4.8e-276:
		tmp = t_1
	elif a <= 1.25e+126:
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / Float64(a - t)))
	tmp = 0.0
	if (a <= -9.6e-195)
		tmp = Float64(x + y);
	elseif (a <= -1.55e-221)
		tmp = t_1;
	elseif (a <= -7e-253)
		tmp = Float64(x + y);
	elseif (a <= 4.8e-276)
		tmp = t_1;
	elseif (a <= 1.25e+126)
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / (a - t));
	tmp = 0.0;
	if (a <= -9.6e-195)
		tmp = x + y;
	elseif (a <= -1.55e-221)
		tmp = t_1;
	elseif (a <= -7e-253)
		tmp = x + y;
	elseif (a <= 4.8e-276)
		tmp = t_1;
	elseif (a <= 1.25e+126)
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.6e-195], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.55e-221], t$95$1, If[LessEqual[a, -7e-253], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.8e-276], t$95$1, If[LessEqual[a, 1.25e+126], N[(x + y), $MachinePrecision], x]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.55 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -7 \cdot 10^{-253}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;a \leq 4.8 \cdot 10^{-276}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.25 \cdot 10^{+126}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.6e-195 or -1.55e-221 < a < -7.00000000000000045e-253 or 4.79999999999999965e-276 < a < 1.24999999999999994e126

    1. Initial program 85.8%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified65.1%

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

    if -9.6e-195 < a < -1.55e-221 or -7.00000000000000045e-253 < a < 4.79999999999999965e-276

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

    if 1.24999999999999994e126 < a

    1. Initial program 86.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -9.6 \cdot 10^{-195}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq -1.55 \cdot 10^{-221}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq -7 \cdot 10^{-253}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 4.8 \cdot 10^{-276}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+126}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 74.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+46}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;t \leq -2.9 \cdot 10^{-35}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\

\mathbf{elif}\;t \leq -1.2 \cdot 10^{-119} \lor \neg \left(t \leq 3.5 \cdot 10^{+93}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.40000000000000008e46 or -2.9000000000000002e-35 < t < -1.20000000000000004e-119 or 3.49999999999999998e93 < t

    1. Initial program 76.0%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified72.3%

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

    if -2.40000000000000008e46 < t < -2.9000000000000002e-35

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{a}} \]
    12. Simplified85.4%

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

    if -1.20000000000000004e-119 < t < 3.49999999999999998e93

    1. Initial program 92.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{+46}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{-35}:\\ \;\;\;\;x - t \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{-119} \lor \neg \left(t \leq 3.5 \cdot 10^{+93}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -3.5 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.6999999999999998e104 or 8.20000000000000023e128 < t

    1. Initial program 68.5%

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

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

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

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

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

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

    if -1.6999999999999998e104 < t < -3.5000000000000001e-137 or 2.09999999999999989e-48 < t < 8.20000000000000023e128

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

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

    if -3.5000000000000001e-137 < t < 2.09999999999999989e-48

    1. Initial program 92.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.7 \cdot 10^{+104}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -3.5 \cdot 10^{-137}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{-48}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{+128}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{+102}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;t \leq -1.35 \cdot 10^{-145}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+129}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.25e102 or 1.35e129 < t

    1. Initial program 68.5%

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

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

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

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

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

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

    if -1.25e102 < t < -1.35e-145

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{y \cdot z}{t}} \]
    10. Step-by-step derivation
      1. *-rgt-identity71.4%

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

        \[\leadsto x - \color{blue}{\frac{y}{t} \cdot \frac{z}{1}} \]
      3. /-rgt-identity71.7%

        \[\leadsto x - \frac{y}{t} \cdot \color{blue}{z} \]
      4. associate-/r/69.8%

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

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

        \[\leadsto x - \color{blue}{\frac{y}{t} \cdot z} \]
    13. Applied egg-rr71.7%

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

    if -1.35e-145 < t < 1.8999999999999998e-46

    1. Initial program 92.8%

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

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

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

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

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

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

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

    if 1.8999999999999998e-46 < t < 1.35e129

    1. Initial program 89.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{+102}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-145}:\\ \;\;\;\;x - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-46}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+129}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 82.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.09999999999999991e-60 or 3.0000000000000001e-182 < x

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

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

    if -2.09999999999999991e-60 < x < 3.0000000000000001e-182

    1. Initial program 81.9%

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    9. Step-by-step derivation
      1. div-sub80.4%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    10. Simplified80.4%

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

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

Alternative 7: 87.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{+101} \lor \neg \left(t \leq 8.2 \cdot 10^{+122}\right):\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.6999999999999997e101 or 8.2000000000000004e122 < t

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6999999999999997e101 < t < 8.2000000000000004e122

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

Alternative 8: 72.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;x \leq 2.25 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.3000000000000001e-60

    1. Initial program 87.1%

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

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

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

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

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

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

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

    if -2.3000000000000001e-60 < x < 2.2499999999999999e-7

    1. Initial program 83.0%

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    9. Step-by-step derivation
      1. div-sub77.5%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    10. Simplified77.5%

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

    if 2.2499999999999999e-7 < x

    1. Initial program 89.6%

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

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

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

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

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

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

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

Alternative 9: 81.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{-60}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-182}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -1.8e-60)
   (+ x (* z (/ y (- a t))))
   (if (<= x 3.5e-182) (* y (/ (- z t) (- a t))) (+ x (/ y (/ (- a t) z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -1.8e-60) {
		tmp = x + (z * (y / (a - t)));
	} else if (x <= 3.5e-182) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = x + (y / ((a - t) / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (x <= (-1.8d-60)) then
        tmp = x + (z * (y / (a - t)))
    else if (x <= 3.5d-182) then
        tmp = y * ((z - t) / (a - t))
    else
        tmp = x + (y / ((a - t) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -1.8e-60) {
		tmp = x + (z * (y / (a - t)));
	} else if (x <= 3.5e-182) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = x + (y / ((a - t) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -1.8e-60:
		tmp = x + (z * (y / (a - t)))
	elif x <= 3.5e-182:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = x + (y / ((a - t) / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -1.8e-60)
		tmp = Float64(x + Float64(z * Float64(y / Float64(a - t))));
	elseif (x <= 3.5e-182)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -1.8e-60)
		tmp = x + (z * (y / (a - t)));
	elseif (x <= 3.5e-182)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = x + (y / ((a - t) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.8e-60], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-182], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 3.5 \cdot 10^{-182}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.8e-60

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

    if -1.8e-60 < x < 3.49999999999999983e-182

    1. Initial program 81.9%

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    9. Step-by-step derivation
      1. div-sub80.4%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    10. Simplified80.4%

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

    if 3.49999999999999983e-182 < x

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

Alternative 10: 82.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.7 \cdot 10^{-127}:\\ \;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-180}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= x -5.7e-127)
   (+ x (/ z (/ (- a t) y)))
   (if (<= x 2.2e-180) (* y (/ (- z t) (- a t))) (+ x (/ y (/ (- a t) z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -5.7e-127) {
		tmp = x + (z / ((a - t) / y));
	} else if (x <= 2.2e-180) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = x + (y / ((a - t) / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (x <= (-5.7d-127)) then
        tmp = x + (z / ((a - t) / y))
    else if (x <= 2.2d-180) then
        tmp = y * ((z - t) / (a - t))
    else
        tmp = x + (y / ((a - t) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (x <= -5.7e-127) {
		tmp = x + (z / ((a - t) / y));
	} else if (x <= 2.2e-180) {
		tmp = y * ((z - t) / (a - t));
	} else {
		tmp = x + (y / ((a - t) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if x <= -5.7e-127:
		tmp = x + (z / ((a - t) / y))
	elif x <= 2.2e-180:
		tmp = y * ((z - t) / (a - t))
	else:
		tmp = x + (y / ((a - t) / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (x <= -5.7e-127)
		tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y)));
	elseif (x <= 2.2e-180)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	else
		tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (x <= -5.7e-127)
		tmp = x + (z / ((a - t) / y));
	elseif (x <= 2.2e-180)
		tmp = y * ((z - t) / (a - t));
	else
		tmp = x + (y / ((a - t) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.7e-127], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e-180], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 2.2 \cdot 10^{-180}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -5.69999999999999963e-127

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.69999999999999963e-127 < x < 2.20000000000000013e-180

    1. Initial program 82.9%

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

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

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

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

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

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

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

      \[\leadsto y \cdot \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
    9. Step-by-step derivation
      1. div-sub82.6%

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    10. Simplified82.6%

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

    if 2.20000000000000013e-180 < x

    1. Initial program 88.6%

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

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

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

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

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

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

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

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

Alternative 11: 85.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{-44}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-107}:\\ \;\;\;\;x + t \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.3e-44)
   (+ x (* z (/ y (- a t))))
   (if (<= z 4.7e-107) (+ x (* t (/ y (- t a)))) (+ x (/ y (/ (- a t) z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.3e-44) {
		tmp = x + (z * (y / (a - t)));
	} else if (z <= 4.7e-107) {
		tmp = x + (t * (y / (t - a)));
	} else {
		tmp = x + (y / ((a - t) / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-4.3d-44)) then
        tmp = x + (z * (y / (a - t)))
    else if (z <= 4.7d-107) then
        tmp = x + (t * (y / (t - a)))
    else
        tmp = x + (y / ((a - t) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.3e-44) {
		tmp = x + (z * (y / (a - t)));
	} else if (z <= 4.7e-107) {
		tmp = x + (t * (y / (t - a)));
	} else {
		tmp = x + (y / ((a - t) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.3e-44:
		tmp = x + (z * (y / (a - t)))
	elif z <= 4.7e-107:
		tmp = x + (t * (y / (t - a)))
	else:
		tmp = x + (y / ((a - t) / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.3e-44)
		tmp = Float64(x + Float64(z * Float64(y / Float64(a - t))));
	elseif (z <= 4.7e-107)
		tmp = Float64(x + Float64(t * Float64(y / Float64(t - a))));
	else
		tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.3e-44)
		tmp = x + (z * (y / (a - t)));
	elseif (z <= 4.7e-107)
		tmp = x + (t * (y / (t - a)));
	else
		tmp = x + (y / ((a - t) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.3e-44], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e-107], N[(x + N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.30000000000000013e-44

    1. Initial program 82.4%

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

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

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

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

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

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

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

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

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

    if -4.30000000000000013e-44 < z < 4.69999999999999998e-107

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

    if 4.69999999999999998e-107 < z

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

Alternative 12: 87.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{-44}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-107}:\\ \;\;\;\;x + y \cdot \frac{t}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.3e-44)
   (+ x (* z (/ y (- a t))))
   (if (<= z 5e-107) (+ x (* y (/ t (- t a)))) (+ x (/ y (/ (- a t) z))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.3e-44) {
		tmp = x + (z * (y / (a - t)));
	} else if (z <= 5e-107) {
		tmp = x + (y * (t / (t - a)));
	} else {
		tmp = x + (y / ((a - t) / z));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-4.3d-44)) then
        tmp = x + (z * (y / (a - t)))
    else if (z <= 5d-107) then
        tmp = x + (y * (t / (t - a)))
    else
        tmp = x + (y / ((a - t) / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.3e-44) {
		tmp = x + (z * (y / (a - t)));
	} else if (z <= 5e-107) {
		tmp = x + (y * (t / (t - a)));
	} else {
		tmp = x + (y / ((a - t) / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.3e-44:
		tmp = x + (z * (y / (a - t)))
	elif z <= 5e-107:
		tmp = x + (y * (t / (t - a)))
	else:
		tmp = x + (y / ((a - t) / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.3e-44)
		tmp = Float64(x + Float64(z * Float64(y / Float64(a - t))));
	elseif (z <= 5e-107)
		tmp = Float64(x + Float64(y * Float64(t / Float64(t - a))));
	else
		tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.3e-44)
		tmp = x + (z * (y / (a - t)));
	elseif (z <= 5e-107)
		tmp = x + (y * (t / (t - a)));
	else
		tmp = x + (y / ((a - t) / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.3e-44], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-107], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.30000000000000013e-44

    1. Initial program 82.4%

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

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

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

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

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

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

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

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

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

    if -4.30000000000000013e-44 < z < 4.99999999999999971e-107

    1. Initial program 91.0%

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{a - t}} \]
      3. *-commutative85.1%

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

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

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

    if 4.99999999999999971e-107 < z

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

Alternative 13: 73.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-119} \lor \neg \left(t \leq 1.8 \cdot 10^{+93}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.20000000000000004e-119 or 1.8e93 < t

    1. Initial program 78.6%

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

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

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

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

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

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

    if -1.20000000000000004e-119 < t < 1.8e93

    1. Initial program 92.8%

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

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

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

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

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

Alternative 14: 75.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-119} \lor \neg \left(t \leq 1.8 \cdot 10^{+93}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.20000000000000004e-119 or 1.8e93 < t

    1. Initial program 78.6%

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

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

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

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

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

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

    if -1.20000000000000004e-119 < t < 1.8e93

    1. Initial program 92.8%

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

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

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

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

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

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

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

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

Alternative 15: 98.4% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 16: 61.9% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 8 \cdot 10^{+124}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a) :precision binary64 (if (<= a 8e+124) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= 8e+124) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (a <= 8d+124) then
        tmp = x + y
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= 8e+124) {
		tmp = x + y;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= 8e+124:
		tmp = x + y
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= 8e+124)
		tmp = Float64(x + y);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= 8e+124)
		tmp = x + y;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 8e+124], N[(x + y), $MachinePrecision], x]
\begin{array}{l}

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

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


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

    1. Initial program 86.0%

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

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

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

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

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

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

    if 7.99999999999999959e124 < a

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification50.3%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 98.5% accurate, 1.0× speedup?

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

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

Reproduce

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

  :alt
  (+ x (/ y (/ (- a t) (- z t))))

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