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

Percentage Accurate: 85.4% → 98.2%
Time: 12.2s
Alternatives: 18
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 18 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.4% 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.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 86.7%

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

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

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

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

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

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

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

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

Alternative 2: 71.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+103}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{+58}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-86}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-191}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-104}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{+61}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -1.55e+103)
   (+ y x)
   (if (<= t -8.8e+58)
     (+ x (* y (/ z a)))
     (if (<= t -2.5e-86)
       (+ y x)
       (if (<= t 2.75e-191)
         (+ x (/ (* y z) a))
         (if (<= t 1.12e-104)
           (* z (/ y (- a t)))
           (if (<= t 9e-77)
             x
             (if (<= t 9.6e+61) (- x (* y (/ z t))) (+ y x)))))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.55e+103) {
		tmp = y + x;
	} else if (t <= -8.8e+58) {
		tmp = x + (y * (z / a));
	} else if (t <= -2.5e-86) {
		tmp = y + x;
	} else if (t <= 2.75e-191) {
		tmp = x + ((y * z) / a);
	} else if (t <= 1.12e-104) {
		tmp = z * (y / (a - t));
	} else if (t <= 9e-77) {
		tmp = x;
	} else if (t <= 9.6e+61) {
		tmp = x - (y * (z / t));
	} else {
		tmp = y + x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (t <= (-1.55d+103)) then
        tmp = y + x
    else if (t <= (-8.8d+58)) then
        tmp = x + (y * (z / a))
    else if (t <= (-2.5d-86)) then
        tmp = y + x
    else if (t <= 2.75d-191) then
        tmp = x + ((y * z) / a)
    else if (t <= 1.12d-104) then
        tmp = z * (y / (a - t))
    else if (t <= 9d-77) then
        tmp = x
    else if (t <= 9.6d+61) then
        tmp = x - (y * (z / t))
    else
        tmp = y + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -1.55e+103) {
		tmp = y + x;
	} else if (t <= -8.8e+58) {
		tmp = x + (y * (z / a));
	} else if (t <= -2.5e-86) {
		tmp = y + x;
	} else if (t <= 2.75e-191) {
		tmp = x + ((y * z) / a);
	} else if (t <= 1.12e-104) {
		tmp = z * (y / (a - t));
	} else if (t <= 9e-77) {
		tmp = x;
	} else if (t <= 9.6e+61) {
		tmp = x - (y * (z / t));
	} else {
		tmp = y + x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if t <= -1.55e+103:
		tmp = y + x
	elif t <= -8.8e+58:
		tmp = x + (y * (z / a))
	elif t <= -2.5e-86:
		tmp = y + x
	elif t <= 2.75e-191:
		tmp = x + ((y * z) / a)
	elif t <= 1.12e-104:
		tmp = z * (y / (a - t))
	elif t <= 9e-77:
		tmp = x
	elif t <= 9.6e+61:
		tmp = x - (y * (z / t))
	else:
		tmp = y + x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -1.55e+103)
		tmp = Float64(y + x);
	elseif (t <= -8.8e+58)
		tmp = Float64(x + Float64(y * Float64(z / a)));
	elseif (t <= -2.5e-86)
		tmp = Float64(y + x);
	elseif (t <= 2.75e-191)
		tmp = Float64(x + Float64(Float64(y * z) / a));
	elseif (t <= 1.12e-104)
		tmp = Float64(z * Float64(y / Float64(a - t)));
	elseif (t <= 9e-77)
		tmp = x;
	elseif (t <= 9.6e+61)
		tmp = Float64(x - Float64(y * Float64(z / t)));
	else
		tmp = Float64(y + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.55e+103)
		tmp = y + x;
	elseif (t <= -8.8e+58)
		tmp = x + (y * (z / a));
	elseif (t <= -2.5e-86)
		tmp = y + x;
	elseif (t <= 2.75e-191)
		tmp = x + ((y * z) / a);
	elseif (t <= 1.12e-104)
		tmp = z * (y / (a - t));
	elseif (t <= 9e-77)
		tmp = x;
	elseif (t <= 9.6e+61)
		tmp = x - (y * (z / t));
	else
		tmp = y + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.55e+103], N[(y + x), $MachinePrecision], If[LessEqual[t, -8.8e+58], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.5e-86], N[(y + x), $MachinePrecision], If[LessEqual[t, 2.75e-191], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.12e-104], N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e-77], x, If[LessEqual[t, 9.6e+61], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;t \leq 1.12 \cdot 10^{-104}:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\

\mathbf{elif}\;t \leq 9 \cdot 10^{-77}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.5500000000000001e103 or -8.8000000000000003e58 < t < -2.4999999999999999e-86 or 9.5999999999999995e61 < t

    1. Initial program 79.0%

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

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

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

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

    if -1.5500000000000001e103 < t < -8.8000000000000003e58

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -2.4999999999999999e-86 < t < 2.75000000000000005e-191

    1. Initial program 97.3%

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

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

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

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

    if 2.75000000000000005e-191 < t < 1.12e-104

    1. Initial program 88.7%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    5. Step-by-step derivation
      1. associate-/l*82.4%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
      2. div-inv82.4%

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

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

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

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

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

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

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

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

    if 1.12e-104 < t < 9.0000000000000001e-77

    1. Initial program 100.0%

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

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

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

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

    if 9.0000000000000001e-77 < t < 9.5999999999999995e61

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{y}{\frac{t}{z}}} \]
    10. Step-by-step derivation
      1. div-inv73.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+103}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{+58}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -2.5 \cdot 10^{-86}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-191}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{-104}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-77}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{+61}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 3: 71.5% accurate, 0.5× speedup?

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

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

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

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

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{-100}:\\
\;\;\;\;z \cdot \frac{y}{a - t}\\

\mathbf{elif}\;t \leq 1.8 \cdot 10^{-84}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.59999999999999996e103 or -1.2000000000000001e59 < t < -3.20000000000000006e-86 or 7.9999999999999996e61 < t

    1. Initial program 79.0%

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

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

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

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

    if -1.59999999999999996e103 < t < -1.2000000000000001e59

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -3.20000000000000006e-86 < t < 2.75000000000000005e-191

    1. Initial program 97.3%

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

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

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

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

    if 2.75000000000000005e-191 < t < 7.50000000000000015e-100

    1. Initial program 88.7%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    5. Step-by-step derivation
      1. associate-/l*82.4%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
      2. div-inv82.4%

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

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

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

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

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

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

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

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

    if 7.50000000000000015e-100 < t < 1.80000000000000002e-84

    1. Initial program 100.0%

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

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

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

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

    if 1.80000000000000002e-84 < t < 7.9999999999999996e61

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+103}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq -1.2 \cdot 10^{+59}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-86}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 2.75 \cdot 10^{-191}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-100}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-84}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+61}:\\ \;\;\;\;x - \frac{y}{\frac{t}{z}}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 4: 70.2% accurate, 0.6× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.0999999999999998e104 or -8.2e58 < t < -3.09999999999999989e-86 or 6.1999999999999998e-15 < t

    1. Initial program 80.2%

      \[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}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified94.3%

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

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

    if -2.0999999999999998e104 < t < -8.2e58

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

    if -3.09999999999999989e-86 < t < 1.5e-191

    1. Initial program 97.3%

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

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

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

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

    if 1.5e-191 < t < 6.1999999999999998e-15

    1. Initial program 89.3%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    5. Step-by-step derivation
      1. associate-/l*74.3%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
      2. div-inv74.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+104}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{+58}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -3.1 \cdot 10^{-86}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-191}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-15}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 5: 84.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq 6.3 \cdot 10^{-145}:\\
\;\;\;\;x - t \cdot t_1\\

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

\mathbf{elif}\;z \leq 120000000000:\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.1199999999999999e61 or 1.2e11 < z

    1. Initial program 88.0%

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

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

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

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

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

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

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

    if -2.1199999999999999e61 < z < 6.3000000000000001e-145

    1. Initial program 84.0%

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-y \cdot t}}{a - t} \]
      3. distribute-rgt-neg-out75.4%

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

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

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

    if 6.3000000000000001e-145 < z < 3.29999999999999994e-63

    1. Initial program 90.1%

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

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

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

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

    if 3.29999999999999994e-63 < z < 1.2e11

    1. Initial program 92.9%

      \[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}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.12 \cdot 10^{+61}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 6.3 \cdot 10^{-145}:\\ \;\;\;\;x - t \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{y \cdot z}{a - t}\\ \mathbf{elif}\;z \leq 120000000000:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \end{array} \]

Alternative 6: 75.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+103} \lor \neg \left(t \leq -4.9 \cdot 10^{+58}\right) \land \left(t \leq -1.75 \cdot 10^{-7} \lor \neg \left(t \leq 2.25 \cdot 10^{-14}\right)\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.5500000000000001e103 or -4.90000000000000018e58 < t < -1.74999999999999992e-7 or 2.2499999999999999e-14 < t

    1. Initial program 78.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}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified93.5%

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

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

    if -1.5500000000000001e103 < t < -4.90000000000000018e58 or -1.74999999999999992e-7 < t < 2.2499999999999999e-14

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.55 \cdot 10^{+103} \lor \neg \left(t \leq -4.9 \cdot 10^{+58}\right) \land \left(t \leq -1.75 \cdot 10^{-7} \lor \neg \left(t \leq 2.25 \cdot 10^{-14}\right)\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \end{array} \]

Alternative 7: 61.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 2.2 \cdot 10^{+121}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+163}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+252}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.4e124 or 2.20000000000000001e121 < z < 2.30000000000000002e163

    1. Initial program 78.4%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    5. Step-by-step derivation
      1. associate-/l*75.9%

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

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{1}{\frac{a - t}{y}}} \]
      3. clear-num75.9%

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

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

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

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

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

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

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

    if -1.4e124 < z < 2.20000000000000001e121

    1. Initial program 87.3%

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

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

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

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

    if 2.30000000000000002e163 < z < 4.4000000000000001e252

    1. Initial program 95.5%

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

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

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

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

    if 4.4000000000000001e252 < z

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-z \cdot y}}{t} \]
      4. distribute-rgt-neg-in62.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+124}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+121}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+163}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+252}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{z \cdot \left(-y\right)}{t}\\ \end{array} \]

Alternative 8: 72.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+18} \lor \neg \left(y \leq 7 \cdot 10^{+99}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.6e18 or 6.9999999999999995e99 < y

    1. Initial program 70.2%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    5. Step-by-step derivation
      1. associate-/l*79.3%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
      2. div-inv78.7%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{1}{\frac{a - t}{y}}} \]
      3. clear-num78.7%

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

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

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

    if -1.6e18 < y < 6.9999999999999995e99

    1. Initial program 99.3%

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

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

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

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

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

Alternative 9: 73.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+18} \lor \neg \left(y \leq 6.8 \cdot 10^{+99}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.5e18 or 6.79999999999999968e99 < y

    1. Initial program 70.2%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    5. Step-by-step derivation
      1. associate-*l/81.2%

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    6. Applied egg-rr81.2%

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

    if -6.5e18 < y < 6.79999999999999968e99

    1. Initial program 99.3%

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

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

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

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

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

Alternative 10: 86.8% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.1000000000000002e103 or 1.51999999999999998e57 < t

    1. Initial program 72.2%

      \[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 z around 0 87.1%

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

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

        \[\leadsto x + \frac{y}{\frac{\color{blue}{-\left(a - t\right)}}{t}} \]
    6. Simplified87.1%

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

    if -2.1000000000000002e103 < t < 1.51999999999999998e57

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

Alternative 11: 83.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0999999999999998e104 or 1.8e62 < t

    1. Initial program 73.5%

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

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

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

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

    if -2.0999999999999998e104 < t < 1.8e62

    1. Initial program 95.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+104}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+62}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 12: 61.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 7.5 \cdot 10^{-207}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.55 \cdot 10^{-105}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.70000000000000001e-127 or 2.55000000000000004e-105 < t

    1. Initial program 82.9%

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

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

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

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

    if -4.70000000000000001e-127 < t < 7.5000000000000006e-207

    1. Initial program 96.8%

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

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

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

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

    if 7.5000000000000006e-207 < t < 2.55000000000000004e-105

    1. Initial program 89.9%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    5. Step-by-step derivation
      1. associate-/l*79.2%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
      2. div-inv79.2%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    9. Simplified51.8%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    10. Step-by-step derivation
      1. div-inv51.9%

        \[\leadsto \color{blue}{y \cdot \frac{1}{\frac{a}{z}}} \]
      2. clear-num51.9%

        \[\leadsto y \cdot \color{blue}{\frac{z}{a}} \]
    11. Applied egg-rr51.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{-127}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-207}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{-105}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 13: 61.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 1.55 \cdot 10^{-246}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 2.8 \cdot 10^{-106}:\\
\;\;\;\;z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.0000000000000001e-127 or 2.79999999999999988e-106 < t

    1. Initial program 82.9%

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

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

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

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

    if -4.0000000000000001e-127 < t < 1.55e-246

    1. Initial program 96.4%

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

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

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

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

    if 1.55e-246 < t < 2.79999999999999988e-106

    1. Initial program 92.6%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    5. Step-by-step derivation
      1. associate-/l*74.3%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
      2. div-inv73.6%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{1}{\frac{a - t}{y}}} \]
      3. clear-num73.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    9. Simplified42.8%

      \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    10. Step-by-step derivation
      1. associate-/r/51.8%

        \[\leadsto \color{blue}{\frac{y}{a} \cdot z} \]
    11. Applied egg-rr51.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{-127}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-246}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{-106}:\\ \;\;\;\;z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 14: 95.9% 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 86.7%

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

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

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

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

Alternative 15: 98.4% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 16: 52.5% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;x \leq 4.4 \cdot 10^{-176}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.7000000000000001e-73 or 4.3999999999999997e-176 < x

    1. Initial program 85.6%

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

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

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

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

    if -3.7000000000000001e-73 < x < 4.3999999999999997e-176

    1. Initial program 88.8%

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

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

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

      \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a - t}} \]
    5. Step-by-step derivation
      1. associate-/l*73.8%

        \[\leadsto \color{blue}{\frac{z - t}{\frac{a - t}{y}}} \]
      2. div-inv73.4%

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{1}{\frac{a - t}{y}}} \]
      3. clear-num74.7%

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

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

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

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

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

Alternative 17: 60.3% accurate, 3.7× speedup?

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

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

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

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

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

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

    \[\leadsto y + x \]

Alternative 18: 50.2% accurate, 11.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification46.4%

    \[\leadsto x \]

Developer target: 98.4% 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 2023176 
(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))))