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

Percentage Accurate: 85.0% → 98.3%
Time: 10.4s
Alternatives: 14
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 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: 85.0% 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.3% 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 89.1%

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

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

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

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

Alternative 2: 76.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -8.2 \cdot 10^{+44} \lor \neg \left(t \leq 1500\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.1000000000000001e160 or -8.60000000000000003e143 < t < -8.1999999999999993e44 or 1500 < t

    1. Initial program 81.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

    if -5.1000000000000001e160 < t < -8.60000000000000003e143

    1. Initial program 85.0%

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

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

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

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

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

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

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

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

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

    if -8.1999999999999993e44 < t < 1500

    1. Initial program 95.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.1 \cdot 10^{+160}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -8.6 \cdot 10^{+143}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{+44} \lor \neg \left(t \leq 1500\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]

Alternative 3: 63.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{a - t}\\ \mathbf{if}\;z \leq -3.2 \cdot 10^{+146}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-134}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.82 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+239}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z (- a t)))))
   (if (<= z -3.2e+146)
     t_1
     (if (<= z 6.5e-134)
       (+ x y)
       (if (<= z 1.82e-53) x (if (<= z 1.4e+239) (+ x y) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / (a - t));
	double tmp;
	if (z <= -3.2e+146) {
		tmp = t_1;
	} else if (z <= 6.5e-134) {
		tmp = x + y;
	} else if (z <= 1.82e-53) {
		tmp = x;
	} else if (z <= 1.4e+239) {
		tmp = x + y;
	} 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 = y * (z / (a - t))
    if (z <= (-3.2d+146)) then
        tmp = t_1
    else if (z <= 6.5d-134) then
        tmp = x + y
    else if (z <= 1.82d-53) then
        tmp = x
    else if (z <= 1.4d+239) then
        tmp = x + y
    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 = y * (z / (a - t));
	double tmp;
	if (z <= -3.2e+146) {
		tmp = t_1;
	} else if (z <= 6.5e-134) {
		tmp = x + y;
	} else if (z <= 1.82e-53) {
		tmp = x;
	} else if (z <= 1.4e+239) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / (a - t))
	tmp = 0
	if z <= -3.2e+146:
		tmp = t_1
	elif z <= 6.5e-134:
		tmp = x + y
	elif z <= 1.82e-53:
		tmp = x
	elif z <= 1.4e+239:
		tmp = x + y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / Float64(a - t)))
	tmp = 0.0
	if (z <= -3.2e+146)
		tmp = t_1;
	elseif (z <= 6.5e-134)
		tmp = Float64(x + y);
	elseif (z <= 1.82e-53)
		tmp = x;
	elseif (z <= 1.4e+239)
		tmp = Float64(x + y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / (a - t));
	tmp = 0.0;
	if (z <= -3.2e+146)
		tmp = t_1;
	elseif (z <= 6.5e-134)
		tmp = x + y;
	elseif (z <= 1.82e-53)
		tmp = x;
	elseif (z <= 1.4e+239)
		tmp = x + y;
	else
		tmp = t_1;
	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[z, -3.2e+146], t$95$1, If[LessEqual[z, 6.5e-134], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.82e-53], x, If[LessEqual[z, 1.4e+239], N[(x + y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{-134}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 1.82 \cdot 10^{-53}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{+239}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.2e146 or 1.40000000000000001e239 < z

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified81.8%

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    9. Taylor expanded in z around inf 79.8%

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

    if -3.2e146 < z < 6.4999999999999998e-134 or 1.8199999999999999e-53 < z < 1.40000000000000001e239

    1. Initial program 91.5%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified71.2%

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

    if 6.4999999999999998e-134 < z < 1.8199999999999999e-53

    1. Initial program 94.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+146}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-134}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.82 \cdot 10^{-53}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+239}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \end{array} \]

Alternative 4: 59.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 1.06 \cdot 10^{-132}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-64}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+242}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.30000000000000005e190

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified74.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} \]
    12. Simplified61.9%

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

    if -1.30000000000000005e190 < z < 1.05999999999999997e-132 or 3.8000000000000002e-64 < z < 1.65000000000000011e242

    1. Initial program 90.8%

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

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

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

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

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

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

    if 1.05999999999999997e-132 < z < 3.8000000000000002e-64

    1. Initial program 94.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

    if 1.65000000000000011e242 < z

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+190}:\\ \;\;\;\;\frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 1.06 \cdot 10^{-132}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-64}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+242}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-z}{t}\\ \end{array} \]

Alternative 5: 59.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+190}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 3.9 \cdot 10^{-133}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 6.4 \cdot 10^{-61}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 3.45 \cdot 10^{+246}:\\
\;\;\;\;x + y\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.20000000000000022e190 or 3.45e246 < z

    1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

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

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

    if -5.20000000000000022e190 < z < 3.90000000000000029e-133 or 6.4000000000000003e-61 < z < 3.45e246

    1. Initial program 90.8%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified70.3%

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

    if 3.90000000000000029e-133 < z < 6.4000000000000003e-61

    1. Initial program 94.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+190}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-133}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 6.4 \cdot 10^{-61}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 3.45 \cdot 10^{+246}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \end{array} \]

Alternative 6: 60.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{-131}:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 4.6 \cdot 10^{-62}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 9.4 \cdot 10^{+250}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.40000000000000005e186

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified74.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} \]
    12. Simplified61.9%

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

    if -3.40000000000000005e186 < z < 2.4e-131 or 4.60000000000000001e-62 < z < 9.3999999999999999e250

    1. Initial program 90.8%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    6. Simplified70.3%

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

    if 2.4e-131 < z < 4.60000000000000001e-62

    1. Initial program 94.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

    if 9.3999999999999999e250 < z

    1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{+186}:\\ \;\;\;\;\frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-131}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{-62}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 9.4 \cdot 10^{+250}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \end{array} \]

Alternative 7: 72.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{a}\\ \mathbf{if}\;x \leq -4.5 \cdot 10^{-63}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-95}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+96}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ y a)))))
   (if (<= x -4.5e-63)
     t_1
     (if (<= x 2.3e-95)
       (* y (/ (- z t) (- a t)))
       (if (<= x 1.35e+96) t_1 (+ x y))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / a));
	double tmp;
	if (x <= -4.5e-63) {
		tmp = t_1;
	} else if (x <= 2.3e-95) {
		tmp = y * ((z - t) / (a - t));
	} else if (x <= 1.35e+96) {
		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 + (z * (y / a))
    if (x <= (-4.5d-63)) then
        tmp = t_1
    else if (x <= 2.3d-95) then
        tmp = y * ((z - t) / (a - t))
    else if (x <= 1.35d+96) 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 + (z * (y / a));
	double tmp;
	if (x <= -4.5e-63) {
		tmp = t_1;
	} else if (x <= 2.3e-95) {
		tmp = y * ((z - t) / (a - t));
	} else if (x <= 1.35e+96) {
		tmp = t_1;
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * (y / a))
	tmp = 0
	if x <= -4.5e-63:
		tmp = t_1
	elif x <= 2.3e-95:
		tmp = y * ((z - t) / (a - t))
	elif x <= 1.35e+96:
		tmp = t_1
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(y / a)))
	tmp = 0.0
	if (x <= -4.5e-63)
		tmp = t_1;
	elseif (x <= 2.3e-95)
		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
	elseif (x <= 1.35e+96)
		tmp = t_1;
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * (y / a));
	tmp = 0.0;
	if (x <= -4.5e-63)
		tmp = t_1;
	elseif (x <= 2.3e-95)
		tmp = y * ((z - t) / (a - t));
	elseif (x <= 1.35e+96)
		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[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e-63], t$95$1, If[LessEqual[x, 2.3e-95], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e+96], t$95$1, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq 1.35 \cdot 10^{+96}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.5e-63 or 2.29999999999999999e-95 < x < 1.35000000000000011e96

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

    if -4.5e-63 < x < 2.29999999999999999e-95

    1. Initial program 88.0%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
    8. Simplified81.1%

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

    if 1.35000000000000011e96 < x

    1. Initial program 85.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.5 \cdot 10^{-63}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-95}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;x \leq 1.35 \cdot 10^{+96}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 81.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{-210} \lor \neg \left(x \leq 3.5 \cdot 10^{-95}\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 -3.7e-210) (not (<= x 3.5e-95)))
   (+ 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 <= -3.7e-210) || !(x <= 3.5e-95)) {
		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 <= (-3.7d-210)) .or. (.not. (x <= 3.5d-95))) 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 <= -3.7e-210) || !(x <= 3.5e-95)) {
		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 <= -3.7e-210) or not (x <= 3.5e-95):
		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 <= -3.7e-210) || !(x <= 3.5e-95))
		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 <= -3.7e-210) || ~((x <= 3.5e-95)))
		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, -3.7e-210], N[Not[LessEqual[x, 3.5e-95]], $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 -3.7 \cdot 10^{-210} \lor \neg \left(x \leq 3.5 \cdot 10^{-95}\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 < -3.7000000000000003e-210 or 3.4999999999999997e-95 < x

    1. Initial program 90.5%

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

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

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

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

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

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

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

    if -3.7000000000000003e-210 < x < 3.4999999999999997e-95

    1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{-210} \lor \neg \left(x \leq 3.5 \cdot 10^{-95}\right):\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 9: 85.8% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.45e-26 or 2.1999999999999999e-109 < z

    1. Initial program 87.9%

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

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

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

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

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

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

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

    if -2.45e-26 < z < 2.1999999999999999e-109

    1. Initial program 90.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.45 \cdot 10^{-26} \lor \neg \left(z \leq 2.2 \cdot 10^{-109}\right):\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t}{\frac{a - t}{y}}\\ \end{array} \]

Alternative 10: 87.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.19999999999999993e49 or 65200 < t

    1. Initial program 81.7%

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

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

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

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

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

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

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

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

    if -7.19999999999999993e49 < t < 65200

    1. Initial program 95.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified97.3%

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

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

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

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

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

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

Alternative 11: 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 89.1%

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

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

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

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

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

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

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

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

Alternative 12: 52.1% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.95 \cdot 10^{-211}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 3.7 \cdot 10^{-96}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.9500000000000001e-211 or 3.69999999999999986e-96 < x

    1. Initial program 90.5%

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

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

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

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

    if -2.9500000000000001e-211 < x < 3.69999999999999986e-96

    1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
    9. Taylor expanded in t around inf 34.2%

      \[\leadsto y \cdot \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.95 \cdot 10^{-211}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-96}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 13: 59.3% accurate, 3.7× speedup?

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

\\
x + y
\end{array}
Derivation
  1. Initial program 89.1%

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

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

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

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

      \[\leadsto \color{blue}{y + x} \]
  6. Simplified58.9%

    \[\leadsto \color{blue}{y + x} \]
  7. Final simplification58.9%

    \[\leadsto x + y \]

Alternative 14: 49.6% 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 89.1%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification49.7%

    \[\leadsto x \]

Developer target: 98.3% 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 2023308 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

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

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