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

Percentage Accurate: 84.8% → 98.4%
Time: 9.1s
Alternatives: 13
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 13 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: 84.8% 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.4% 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 86.1%

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

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

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

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

Alternative 2: 75.8% accurate, 0.6× speedup?

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -6.40000000000000009e44 or 5.30000000000000028e126 < z

    1. Initial program 73.8%

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

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

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

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

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

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

    if -6.40000000000000009e44 < z < 1.05e32

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

    if 1.05e32 < z < 2.2999999999999999e74

    1. Initial program 63.7%

      \[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 inf 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2999999999999999e74 < z < 1.45000000000000007e95

    1. Initial program 61.5%

      \[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 inf 81.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.45000000000000007e95 < z < 5.30000000000000028e126

    1. Initial program 81.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{z}} \]
    6. Step-by-step derivation
      1. *-commutative81.3%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} \]
      3. associate-/r/99.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+44}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+32}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+74}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+95}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 5.3 \cdot 10^{+126}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{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 -4.6 \cdot 10^{+44}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+32}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+89}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+93}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.6e+44)
   (+ x y)
   (if (<= z 1.6e+32)
     (+ x (/ y (/ a t)))
     (if (<= z 1.8e+89)
       (- x (* t (/ y z)))
       (if (<= z 2.5e+93) (* (/ y a) (- t z)) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.6e+44) {
		tmp = x + y;
	} else if (z <= 1.6e+32) {
		tmp = x + (y / (a / t));
	} else if (z <= 1.8e+89) {
		tmp = x - (t * (y / z));
	} else if (z <= 2.5e+93) {
		tmp = (y / a) * (t - z);
	} else {
		tmp = x + y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-4.6d+44)) then
        tmp = x + y
    else if (z <= 1.6d+32) then
        tmp = x + (y / (a / t))
    else if (z <= 1.8d+89) then
        tmp = x - (t * (y / z))
    else if (z <= 2.5d+93) then
        tmp = (y / a) * (t - z)
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.6e+44) {
		tmp = x + y;
	} else if (z <= 1.6e+32) {
		tmp = x + (y / (a / t));
	} else if (z <= 1.8e+89) {
		tmp = x - (t * (y / z));
	} else if (z <= 2.5e+93) {
		tmp = (y / a) * (t - z);
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.6e+44:
		tmp = x + y
	elif z <= 1.6e+32:
		tmp = x + (y / (a / t))
	elif z <= 1.8e+89:
		tmp = x - (t * (y / z))
	elif z <= 2.5e+93:
		tmp = (y / a) * (t - z)
	else:
		tmp = x + y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.6e+44)
		tmp = Float64(x + y);
	elseif (z <= 1.6e+32)
		tmp = Float64(x + Float64(y / Float64(a / t)));
	elseif (z <= 1.8e+89)
		tmp = Float64(x - Float64(t * Float64(y / z)));
	elseif (z <= 2.5e+93)
		tmp = Float64(Float64(y / a) * Float64(t - z));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.6e+44)
		tmp = x + y;
	elseif (z <= 1.6e+32)
		tmp = x + (y / (a / t));
	elseif (z <= 1.8e+89)
		tmp = x - (t * (y / z));
	elseif (z <= 2.5e+93)
		tmp = (y / a) * (t - z);
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.6e+44], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.6e+32], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+89], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+93], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.60000000000000009e44 or 2.5000000000000001e93 < z

    1. Initial program 74.2%

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

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

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

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

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

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

    if -4.60000000000000009e44 < z < 1.5999999999999999e32

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

    if 1.5999999999999999e32 < z < 1.8e89

    1. Initial program 72.1%

      \[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 inf 84.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e89 < z < 2.5000000000000001e93

    1. Initial program 3.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{1}{\frac{a}{y}}\right)} \cdot \left(z - t\right) \]
      6. distribute-lft-neg-in100.0%

        \[\leadsto \color{blue}{-\frac{1}{\frac{a}{y}} \cdot \left(z - t\right)} \]
      7. distribute-rgt-neg-in100.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+44}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+32}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+89}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{+93}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 4: 86.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.03 \cdot 10^{+158} \lor \neg \left(z \leq 4.4 \cdot 10^{+104}\right):\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.03000000000000002e158 or 4.40000000000000001e104 < z

    1. Initial program 65.8%

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{1} - \frac{a}{z}} \]
    6. Simplified91.7%

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

    if -1.03000000000000002e158 < z < 4.40000000000000001e104

    1. Initial program 94.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 87.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+44} \lor \neg \left(z \leq 2.15 \cdot 10^{+32}\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.19999999999999974e44 or 2.1499999999999999e32 < z

    1. Initial program 72.7%

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

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

        \[\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. Taylor expanded in a around 0 67.2%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    6. Simplified91.2%

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

    if -4.19999999999999974e44 < z < 2.1499999999999999e32

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 87.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+44} \lor \neg \left(z \leq 1.15 \cdot 10^{+32}\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.50000000000000027e44 or 1.15e32 < z

    1. Initial program 72.7%

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

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

        \[\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. Taylor expanded in a around 0 67.2%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    6. Simplified91.2%

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

    if -7.50000000000000027e44 < z < 1.15e32

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.9% accurate, 0.8× speedup?

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

\mathbf{elif}\;a \leq 2.1 \cdot 10^{-146}:\\
\;\;\;\;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 3 regimes
  2. if a < -7.19999999999999996e56

    1. Initial program 88.2%

      \[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}{\frac{z - a}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.19999999999999996e56 < a < 2.0999999999999999e-146

    1. Initial program 87.2%

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

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

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

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

    if 2.0999999999999999e-146 < a

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

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

Alternative 8: 77.0% accurate, 1.0× speedup?

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

    1. Initial program 72.2%

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

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

        \[\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. Taylor expanded in z around inf 80.5%

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

    if -8.1999999999999993e44 < z < 2.00000000000000009e42

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 77.1% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.4e44 or 4.4000000000000003e42 < z

    1. Initial program 72.2%

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

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

        \[\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. Taylor expanded in z around inf 80.5%

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

    if -3.4e44 < z < 4.4000000000000003e42

    1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

Alternative 10: 95.7% 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 86.1%

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

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

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

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

Alternative 11: 62.7% accurate, 1.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.20000000000000016e60 or 1.3999999999999999e37 < z

    1. Initial program 71.4%

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

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

        \[\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. Taylor expanded in z around inf 80.7%

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

    if -5.20000000000000016e60 < z < 1.3999999999999999e37

    1. Initial program 96.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+60}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+37}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 12: 51.6% accurate, 3.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.02 \cdot 10^{+114}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.01999999999999999e114

    1. Initial program 89.6%

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

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

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

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

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

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

    if 1.01999999999999999e114 < y

    1. Initial program 65.1%

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

        \[\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 x around 0 54.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.02 \cdot 10^{+114}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 13: 50.5% 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.1%

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

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

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

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

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

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

    \[\leadsto x \]

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