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

Percentage Accurate: 98.2% → 96.2%
Time: 13.3s
Alternatives: 14
Speedup: 1.0×

Specification

?
\[\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}

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 14 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: 98.2% 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}

Alternative 1: 96.2% accurate, 1.0× speedup?

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

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

    \[x + y \cdot \frac{z - t}{a - t} \]
  2. Step-by-step derivation
    1. associate-*r/87.5%

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

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

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

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

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

Alternative 2: 77.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{z}{t - a}\\ \mathbf{if}\;t \leq -1.52 \cdot 10^{+240}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{+86}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{-10}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 10^{-124}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+42}:\\ \;\;\;\;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 a))))))
   (if (<= t -1.52e+240)
     (+ x y)
     (if (<= t -1.8e+86)
       t_1
       (if (<= t -4.3e-10)
         (+ x y)
         (if (<= t 1e-124)
           (+ x (* z (/ y a)))
           (if (<= t 7.5e+42) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * (z / (t - a)));
	double tmp;
	if (t <= -1.52e+240) {
		tmp = x + y;
	} else if (t <= -1.8e+86) {
		tmp = t_1;
	} else if (t <= -4.3e-10) {
		tmp = x + y;
	} else if (t <= 1e-124) {
		tmp = x + (z * (y / a));
	} else if (t <= 7.5e+42) {
		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 - a)))
    if (t <= (-1.52d+240)) then
        tmp = x + y
    else if (t <= (-1.8d+86)) then
        tmp = t_1
    else if (t <= (-4.3d-10)) then
        tmp = x + y
    else if (t <= 1d-124) then
        tmp = x + (z * (y / a))
    else if (t <= 7.5d+42) 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 - a)));
	double tmp;
	if (t <= -1.52e+240) {
		tmp = x + y;
	} else if (t <= -1.8e+86) {
		tmp = t_1;
	} else if (t <= -4.3e-10) {
		tmp = x + y;
	} else if (t <= 1e-124) {
		tmp = x + (z * (y / a));
	} else if (t <= 7.5e+42) {
		tmp = t_1;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * (z / (t - a)))
	tmp = 0
	if t <= -1.52e+240:
		tmp = x + y
	elif t <= -1.8e+86:
		tmp = t_1
	elif t <= -4.3e-10:
		tmp = x + y
	elif t <= 1e-124:
		tmp = x + (z * (y / a))
	elif t <= 7.5e+42:
		tmp = t_1
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(z / Float64(t - a))))
	tmp = 0.0
	if (t <= -1.52e+240)
		tmp = Float64(x + y);
	elseif (t <= -1.8e+86)
		tmp = t_1;
	elseif (t <= -4.3e-10)
		tmp = Float64(x + y);
	elseif (t <= 1e-124)
		tmp = Float64(x + Float64(z * Float64(y / a)));
	elseif (t <= 7.5e+42)
		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 - a)));
	tmp = 0.0;
	if (t <= -1.52e+240)
		tmp = x + y;
	elseif (t <= -1.8e+86)
		tmp = t_1;
	elseif (t <= -4.3e-10)
		tmp = x + y;
	elseif (t <= 1e-124)
		tmp = x + (z * (y / a));
	elseif (t <= 7.5e+42)
		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 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.52e+240], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.8e+86], t$95$1, If[LessEqual[t, -4.3e-10], N[(x + y), $MachinePrecision], If[LessEqual[t, 1e-124], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+42], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.8 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -4.3 \cdot 10^{-10}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.5200000000000001e240 or -1.80000000000000003e86 < t < -4.30000000000000014e-10 or 7.50000000000000041e42 < t

    1. Initial program 100.0%

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

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

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

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

    if -1.5200000000000001e240 < t < -1.80000000000000003e86 or 9.99999999999999933e-125 < t < 7.50000000000000041e42

    1. Initial program 99.8%

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

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

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

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

    if -4.30000000000000014e-10 < t < 9.99999999999999933e-125

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.52 \cdot 10^{+240}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{+86}:\\ \;\;\;\;x - y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{-10}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 10^{-124}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+42}:\\ \;\;\;\;x - y \cdot \frac{z}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 87.0% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+83}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.5e22 or 5.4999999999999996e83 < z

    1. Initial program 96.1%

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

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

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

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

    if -1.5e22 < z < 2.2e17

    1. Initial program 98.6%

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

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

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

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

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

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

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

    if 2.2e17 < z < 5.20000000000000013e35

    1. Initial program 100.0%

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

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

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

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

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

    if 5.20000000000000013e35 < z < 5.4999999999999996e83

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+22}:\\ \;\;\;\;x - y \cdot \frac{z}{t - a}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+17}:\\ \;\;\;\;x + y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+35}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+83}:\\ \;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{z}{t - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 77.1% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.8000000000000002e122 or 1.4499999999999999e48 < t

    1. Initial program 99.9%

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

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

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

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

    if -5.8000000000000002e122 < t < -3.4999999999999998e36

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{z \cdot \frac{y}{t}} \]
      2. *-commutative80.5%

        \[\leadsto x - \color{blue}{\frac{y}{t} \cdot z} \]
    12. Applied egg-rr80.5%

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

    if -3.4999999999999998e36 < t < 1.4499999999999999e48

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.1% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+47}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.7999999999999998e122 or 1.6999999999999999e47 < t

    1. Initial program 99.9%

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

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

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

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

    if -3.7999999999999998e122 < t < -1.95e40

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

    if -1.95e40 < t < 1.6999999999999999e47

    1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 76.7% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.7999999999999999e-15 or 3.59999999999999983e48 < t

    1. Initial program 99.9%

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

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

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

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

    if -4.7999999999999999e-15 < t < -5.7999999999999998e-83

    1. Initial program 99.9%

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

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

    if -5.7999999999999998e-83 < t < 3.59999999999999983e48

    1. Initial program 95.3%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. associate-*r/94.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-15}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -5.8 \cdot 10^{-83}:\\ \;\;\;\;x + \frac{z \cdot y}{a}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+48}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 82.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -7.2000000000000001e-55 or 4.0000000000000001e-54 < a

    1. Initial program 98.8%

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

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

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

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

    if -7.2000000000000001e-55 < a < 4.0000000000000001e-54

    1. Initial program 95.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 76.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+122} \lor \neg \left(t \leq 5 \cdot 10^{+49}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.8000000000000002e122 or 5.0000000000000004e49 < t

    1. Initial program 99.9%

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

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

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

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

    if -5.8000000000000002e122 < t < 5.0000000000000004e49

    1. Initial program 96.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 60.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+193}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq -7 \cdot 10^{+163}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\

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


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

    1. Initial program 99.9%

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

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

    if -1.39999999999999993e193 < a < -7.0000000000000005e163

    1. Initial program 99.2%

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(\frac{y}{a} + \frac{x}{z}\right)} \]
    8. Simplified97.0%

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

      \[\leadsto z \cdot \color{blue}{\frac{y}{a}} \]
    10. Taylor expanded in z around 0 66.9%

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    12. Simplified82.7%

      \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    13. Step-by-step derivation
      1. clear-num83.0%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      2. un-div-inv83.2%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    14. Applied egg-rr83.2%

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

    if -7.0000000000000005e163 < a

    1. Initial program 97.4%

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

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

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

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

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

Alternative 10: 60.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+193}:\\
\;\;\;\;x\\

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

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


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

    1. Initial program 99.9%

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

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

    if -1.39999999999999993e193 < a < -6.4999999999999998e163

    1. Initial program 99.2%

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\left(\frac{y}{a} + \frac{x}{z}\right)} \]
    8. Simplified97.0%

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

      \[\leadsto z \cdot \color{blue}{\frac{y}{a}} \]
    10. Taylor expanded in z around 0 66.9%

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
    12. Simplified82.7%

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

    if -6.4999999999999998e163 < a

    1. Initial program 97.4%

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

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

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

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

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

Alternative 11: 61.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.8e-10 or -6.6000000000000004e-299 < t

    1. Initial program 98.5%

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

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

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

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

    if -1.8e-10 < t < -6.6000000000000004e-299

    1. Initial program 95.0%

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

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

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

Alternative 12: 53.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+138}:\\
\;\;\;\;y\\

\mathbf{elif}\;y \leq 1.76 \cdot 10^{+137}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.20000000000000014e138 or 1.76e137 < y

    1. Initial program 96.8%

      \[x + y \cdot \frac{z - t}{a - t} \]
    2. Step-by-step derivation
      1. associate-*r/65.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{t}} \]
    14. Step-by-step derivation
      1. mul-1-neg26.8%

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

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

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

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

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

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

        \[\leadsto y \cdot \left(-\left(\frac{z}{t} + \color{blue}{-1}\right)\right) \]
      8. distribute-neg-in48.7%

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

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

        \[\leadsto y \cdot \color{blue}{\left(1 + \left(-\frac{z}{t}\right)\right)} \]
      11. sub-neg48.7%

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

      \[\leadsto \color{blue}{y \cdot \left(1 - \frac{z}{t}\right)} \]
    16. Taylor expanded in z around 0 33.7%

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

    if -4.20000000000000014e138 < y < 1.76e137

    1. Initial program 98.0%

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 98.2% 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 97.7%

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

Alternative 14: 50.7% 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 97.7%

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

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

Developer target: 99.4% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))

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