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

Percentage Accurate: 85.5% → 98.2%
Time: 12.7s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 72.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{if}\;z \leq -1.85 \cdot 10^{+169}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+65}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.66 \cdot 10^{+30}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-133}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-64}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+19}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{+67}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- z t) (/ y (- z a)))))
   (if (<= z -1.85e+169)
     (+ x y)
     (if (<= z -5e+65)
       (- x (* t (/ y z)))
       (if (<= z -1.66e+30)
         (+ x y)
         (if (<= z -4.5e-133)
           t_1
           (if (<= z 1.9e-64)
             (+ x (/ y (/ a t)))
             (if (<= z 3.2e+19)
               t_1
               (if (<= z 8.6e+67) (- x (/ y (/ a z))) (+ x y))))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) * (y / (z - a));
	double tmp;
	if (z <= -1.85e+169) {
		tmp = x + y;
	} else if (z <= -5e+65) {
		tmp = x - (t * (y / z));
	} else if (z <= -1.66e+30) {
		tmp = x + y;
	} else if (z <= -4.5e-133) {
		tmp = t_1;
	} else if (z <= 1.9e-64) {
		tmp = x + (y / (a / t));
	} else if (z <= 3.2e+19) {
		tmp = t_1;
	} else if (z <= 8.6e+67) {
		tmp = x - (y / (a / z));
	} else {
		tmp = x + y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z - t) * (y / (z - a))
    if (z <= (-1.85d+169)) then
        tmp = x + y
    else if (z <= (-5d+65)) then
        tmp = x - (t * (y / z))
    else if (z <= (-1.66d+30)) then
        tmp = x + y
    else if (z <= (-4.5d-133)) then
        tmp = t_1
    else if (z <= 1.9d-64) then
        tmp = x + (y / (a / t))
    else if (z <= 3.2d+19) then
        tmp = t_1
    else if (z <= 8.6d+67) then
        tmp = x - (y / (a / z))
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (z - t) * (y / (z - a));
	double tmp;
	if (z <= -1.85e+169) {
		tmp = x + y;
	} else if (z <= -5e+65) {
		tmp = x - (t * (y / z));
	} else if (z <= -1.66e+30) {
		tmp = x + y;
	} else if (z <= -4.5e-133) {
		tmp = t_1;
	} else if (z <= 1.9e-64) {
		tmp = x + (y / (a / t));
	} else if (z <= 3.2e+19) {
		tmp = t_1;
	} else if (z <= 8.6e+67) {
		tmp = x - (y / (a / z));
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (z - t) * (y / (z - a))
	tmp = 0
	if z <= -1.85e+169:
		tmp = x + y
	elif z <= -5e+65:
		tmp = x - (t * (y / z))
	elif z <= -1.66e+30:
		tmp = x + y
	elif z <= -4.5e-133:
		tmp = t_1
	elif z <= 1.9e-64:
		tmp = x + (y / (a / t))
	elif z <= 3.2e+19:
		tmp = t_1
	elif z <= 8.6e+67:
		tmp = x - (y / (a / z))
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(z - t) * Float64(y / Float64(z - a)))
	tmp = 0.0
	if (z <= -1.85e+169)
		tmp = Float64(x + y);
	elseif (z <= -5e+65)
		tmp = Float64(x - Float64(t * Float64(y / z)));
	elseif (z <= -1.66e+30)
		tmp = Float64(x + y);
	elseif (z <= -4.5e-133)
		tmp = t_1;
	elseif (z <= 1.9e-64)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	elseif (z <= 3.2e+19)
		tmp = t_1;
	elseif (z <= 8.6e+67)
		tmp = Float64(x - Float64(y / Float64(a / z)));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (z - t) * (y / (z - a));
	tmp = 0.0;
	if (z <= -1.85e+169)
		tmp = x + y;
	elseif (z <= -5e+65)
		tmp = x - (t * (y / z));
	elseif (z <= -1.66e+30)
		tmp = x + y;
	elseif (z <= -4.5e-133)
		tmp = t_1;
	elseif (z <= 1.9e-64)
		tmp = x + (y / (a / t));
	elseif (z <= 3.2e+19)
		tmp = t_1;
	elseif (z <= 8.6e+67)
		tmp = x - (y / (a / z));
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+169], N[(x + y), $MachinePrecision], If[LessEqual[z, -5e+65], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.66e+30], N[(x + y), $MachinePrecision], If[LessEqual[z, -4.5e-133], t$95$1, If[LessEqual[z, 1.9e-64], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+19], t$95$1, If[LessEqual[z, 8.6e+67], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+169}:\\
\;\;\;\;x + y\\

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

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

\mathbf{elif}\;z \leq -4.5 \cdot 10^{-133}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+19}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.85e169 or -4.99999999999999973e65 < z < -1.66e30 or 8.6000000000000002e67 < z

    1. Initial program 70.5%

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

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

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

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

    if -1.85e169 < z < -4.99999999999999973e65

    1. Initial program 70.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Taylor expanded in t around inf 86.4%

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

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

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

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{-t}{z - a}}, x\right) \]
    7. Taylor expanded in z around inf 65.1%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
      5. associate-/r/81.9%

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

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

    if -1.66e30 < z < -4.50000000000000009e-133 or 1.9000000000000001e-64 < z < 3.2e19

    1. Initial program 91.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{\frac{1}{z - t}}} \cdot \frac{y}{z - a} \]
      4. times-frac72.1%

        \[\leadsto \color{blue}{\frac{1 \cdot y}{\frac{1}{z - t} \cdot \left(z - a\right)}} \]
      5. *-un-lft-identity72.1%

        \[\leadsto \frac{\color{blue}{y}}{\frac{1}{z - t} \cdot \left(z - a\right)} \]
      6. associate-/l/74.1%

        \[\leadsto \color{blue}{\frac{\frac{y}{z - a}}{\frac{1}{z - t}}} \]
      7. associate-/r/74.3%

        \[\leadsto \color{blue}{\frac{\frac{y}{z - a}}{1} \cdot \left(z - t\right)} \]
      8. /-rgt-identity74.3%

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

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

    if -4.50000000000000009e-133 < z < 1.9000000000000001e-64

    1. Initial program 95.8%

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

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

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

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

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

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

    if 3.2e19 < z < 8.6000000000000002e67

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+169}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+65}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.66 \cdot 10^{+30}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-133}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-64}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+19}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{+67}:\\ \;\;\;\;x - \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 76.8% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;z \leq -1.46 \cdot 10^{+38} \lor \neg \left(z \leq 1.9 \cdot 10^{+16}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.15000000000000004e166 or -5.2000000000000002e63 < z < -1.46000000000000008e38 or 1.9e16 < z

    1. Initial program 72.5%

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

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

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

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

    if -1.15000000000000004e166 < z < -5.2000000000000002e63

    1. Initial program 70.3%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Taylor expanded in t around inf 86.4%

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

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

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

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{-t}{z - a}}, x\right) \]
    7. Taylor expanded in z around inf 65.1%

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
      5. associate-/r/81.9%

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

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

    if -1.46000000000000008e38 < z < 1.9e16

    1. Initial program 93.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified74.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{+166}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -5.2 \cdot 10^{+63}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq -1.46 \cdot 10^{+38} \lor \neg \left(z \leq 1.9 \cdot 10^{+16}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \end{array} \]

Alternative 4: 80.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{-30}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.9999999999999999e-30 or 1.25000000000000005e-43 < z

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

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

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

    if -2.9999999999999999e-30 < z < -4.5000000000000005e-134

    1. Initial program 84.9%

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

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

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

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

        \[\leadsto \frac{\left(z - t\right) \cdot y}{\color{blue}{1 \cdot \left(z - a\right)}} \]
      2. times-frac84.9%

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

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

        \[\leadsto \color{blue}{\frac{1 \cdot y}{\frac{1}{z - t} \cdot \left(z - a\right)}} \]
      5. *-un-lft-identity74.6%

        \[\leadsto \frac{\color{blue}{y}}{\frac{1}{z - t} \cdot \left(z - a\right)} \]
      6. associate-/l/84.6%

        \[\leadsto \color{blue}{\frac{\frac{y}{z - a}}{\frac{1}{z - t}}} \]
      7. associate-/r/84.9%

        \[\leadsto \color{blue}{\frac{\frac{y}{z - a}}{1} \cdot \left(z - t\right)} \]
      8. /-rgt-identity84.9%

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

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

    if -4.5000000000000005e-134 < z < 1.25000000000000005e-43

    1. Initial program 95.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified85.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-30}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq -4.5 \cdot 10^{-134}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{-43}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \end{array} \]

Alternative 5: 80.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2e-123 or 1.4500000000000001e-43 < z

    1. Initial program 77.2%

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

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

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

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

    if -1.2e-123 < z < 1.4500000000000001e-43

    1. Initial program 95.0%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified84.2%

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

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

Alternative 6: 80.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-125}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\

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

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


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

    1. Initial program 78.1%

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

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

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

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

    if -1.5999999999999999e-125 < z < 3.09999999999999991e-30

    1. Initial program 95.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified82.8%

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

    if 3.09999999999999991e-30 < z

    1. Initial program 75.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{-125}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{-30}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \end{array} \]

Alternative 7: 86.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-47}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


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

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

    if -5.5000000000000002e-47 < z < 7.5e16

    1. Initial program 94.4%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Taylor expanded in t around inf 90.5%

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

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

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

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{-t}{z - a}}, x\right) \]
    7. Taylor expanded in y around 0 88.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\left(-y\right) \cdot \frac{t}{z - a}} \]
      5. cancel-sign-sub-inv90.4%

        \[\leadsto \color{blue}{x - y \cdot \frac{t}{z - a}} \]
      6. associate-*r/88.9%

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

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

    if 7.5e16 < z

    1. Initial program 71.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-47}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+16}:\\ \;\;\;\;x - \frac{y \cdot t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \end{array} \]

Alternative 8: 87.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+45}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.34999999999999992e45

    1. Initial program 72.3%

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

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

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

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

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

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

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

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

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

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

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

    if -1.34999999999999992e45 < z < 9.8e16

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\frac{\left(-z\right) + \left(-\color{blue}{\left(-a\right)}\right)}{t}} \]
      7. remove-double-neg89.1%

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

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

    if 9.8e16 < z

    1. Initial program 71.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{+45}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+16}:\\ \;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \end{array} \]

Alternative 9: 77.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+38} \lor \neg \left(z \leq 8.5 \cdot 10^{+16}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.45000000000000003e38 or 8.5e16 < z

    1. Initial program 72.1%

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

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

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

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

    if -1.45000000000000003e38 < z < 8.5e16

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

Alternative 10: 77.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.8000000000000005e42 or 7.5e16 < z

    1. Initial program 72.1%

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

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

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

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

    if -8.8000000000000005e42 < z < 7.5e16

    1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+42}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{+16}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 11: 77.5% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.80000000000000019e43 or 5.6e16 < z

    1. Initial program 72.1%

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

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

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

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

    if -2.80000000000000019e43 < z < 5.6e16

    1. Initial program 93.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{t}}} + x \]
    6. Simplified74.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+43}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 5.6 \cdot 10^{+16}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 12: 96.1% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 13: 61.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+216} \lor \neg \left(t \leq 4 \cdot 10^{+199}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.29999999999999996e216 or 4.00000000000000039e199 < t

    1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999996e216 < t < 4.00000000000000039e199

    1. Initial program 84.3%

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

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

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

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

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

Alternative 14: 61.2% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+215} \lor \neg \left(t \leq 7.8 \cdot 10^{+199}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.8000000000000002e215 or 7.8000000000000004e199 < t

    1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    10. Simplified56.1%

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

    if -4.8000000000000002e215 < t < 7.8000000000000004e199

    1. Initial program 84.3%

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

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

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

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

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

Alternative 15: 60.9% accurate, 3.7× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{y + x} \]
  5. Final simplification56.0%

    \[\leadsto x + y \]

Alternative 16: 50.7% accurate, 11.0× speedup?

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

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

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

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

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

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

    \[\leadsto x \]

Developer target: 98.2% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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