Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A

Percentage Accurate: 98.5% → 98.5%
Time: 16.6s
Alternatives: 24
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\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 24 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 98.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t - 1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

\\
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\end{array}

Alternative 1: 98.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (* x (exp (- (+ (* y (log z)) (* (+ t -1.0) (log a))) b))) y))
double code(double x, double y, double z, double t, double a, double b) {
	return (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = (x * exp((((y * log(z)) + ((t + (-1.0d0)) * log(a))) - b))) / y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x * Math.exp((((y * Math.log(z)) + ((t + -1.0) * Math.log(a))) - b))) / y;
}
def code(x, y, z, t, a, b):
	return (x * math.exp((((y * math.log(z)) + ((t + -1.0) * math.log(a))) - b))) / y
function code(x, y, z, t, a, b)
	return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t + -1.0) * log(a))) - b))) / y)
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x * exp((((y * log(z)) + ((t + -1.0) * log(a))) - b))) / y;
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x * N[Exp[N[(N[(N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}

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

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
  2. Add Preprocessing
  3. Final simplification97.9%

    \[\leadsto \frac{x \cdot e^{\left(y \cdot \log z + \left(t + -1\right) \cdot \log a\right) - b}}{y} \]
  4. Add Preprocessing

Alternative 2: 79.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := {a}^{\left(t + -1\right)}\\ t_2 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{if}\;y \leq -92:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -6.5 \cdot 10^{-213}:\\ \;\;\;\;x \cdot \frac{t\_1}{y}\\ \mathbf{elif}\;y \leq 47000000:\\ \;\;\;\;\frac{x \cdot \frac{t\_1}{e^{b}}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (pow a (+ t -1.0))) (t_2 (/ (* x (/ (pow z y) a)) y)))
   (if (<= y -92.0)
     t_2
     (if (<= y -6.5e-213)
       (* x (/ t_1 y))
       (if (<= y 47000000.0) (/ (* x (/ t_1 (exp b))) y) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = pow(a, (t + -1.0));
	double t_2 = (x * (pow(z, y) / a)) / y;
	double tmp;
	if (y <= -92.0) {
		tmp = t_2;
	} else if (y <= -6.5e-213) {
		tmp = x * (t_1 / y);
	} else if (y <= 47000000.0) {
		tmp = (x * (t_1 / exp(b))) / y;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a ** (t + (-1.0d0))
    t_2 = (x * ((z ** y) / a)) / y
    if (y <= (-92.0d0)) then
        tmp = t_2
    else if (y <= (-6.5d-213)) then
        tmp = x * (t_1 / y)
    else if (y <= 47000000.0d0) then
        tmp = (x * (t_1 / exp(b))) / y
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = Math.pow(a, (t + -1.0));
	double t_2 = (x * (Math.pow(z, y) / a)) / y;
	double tmp;
	if (y <= -92.0) {
		tmp = t_2;
	} else if (y <= -6.5e-213) {
		tmp = x * (t_1 / y);
	} else if (y <= 47000000.0) {
		tmp = (x * (t_1 / Math.exp(b))) / y;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = math.pow(a, (t + -1.0))
	t_2 = (x * (math.pow(z, y) / a)) / y
	tmp = 0
	if y <= -92.0:
		tmp = t_2
	elif y <= -6.5e-213:
		tmp = x * (t_1 / y)
	elif y <= 47000000.0:
		tmp = (x * (t_1 / math.exp(b))) / y
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = a ^ Float64(t + -1.0)
	t_2 = Float64(Float64(x * Float64((z ^ y) / a)) / y)
	tmp = 0.0
	if (y <= -92.0)
		tmp = t_2;
	elseif (y <= -6.5e-213)
		tmp = Float64(x * Float64(t_1 / y));
	elseif (y <= 47000000.0)
		tmp = Float64(Float64(x * Float64(t_1 / exp(b))) / y);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a ^ (t + -1.0);
	t_2 = (x * ((z ^ y) / a)) / y;
	tmp = 0.0;
	if (y <= -92.0)
		tmp = t_2;
	elseif (y <= -6.5e-213)
		tmp = x * (t_1 / y);
	elseif (y <= 47000000.0)
		tmp = (x * (t_1 / exp(b))) / y;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -92.0], t$95$2, If[LessEqual[y, -6.5e-213], N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 47000000.0], N[(N[(x * N[(t$95$1 / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := {a}^{\left(t + -1\right)}\\
t_2 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -92:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -6.5 \cdot 10^{-213}:\\
\;\;\;\;x \cdot \frac{t\_1}{y}\\

\mathbf{elif}\;y \leq 47000000:\\
\;\;\;\;\frac{x \cdot \frac{t\_1}{e^{b}}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -92 or 4.7e7 < y

    1. Initial program 100.0%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 89.8%

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}\right)}}{y} \]
      2. exp-to-pow67.4%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot \color{blue}{{a}^{\left(t - 1\right)}}\right)}{y} \]
      3. sub-neg67.4%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot {a}^{\color{blue}{\left(t + \left(-1\right)\right)}}\right)}{y} \]
      4. metadata-eval67.4%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot {a}^{\left(t + \color{blue}{-1}\right)}\right)}{y} \]
      5. *-commutative67.4%

        \[\leadsto \frac{x \cdot \left(e^{\color{blue}{\log z \cdot y}} \cdot {a}^{\left(t + -1\right)}\right)}{y} \]
      6. exp-to-pow67.4%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot \frac{{z}^{y}}{a}}}{y} \]
    8. Simplified78.8%

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

    if -92 < y < -6.5e-213

    1. Initial program 93.7%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative93.7%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+93.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define93.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg93.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval93.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified93.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 93.0%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. *-commutative93.0%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot e^{\log a \cdot \left(t - 1\right) - b}} \]
      2. clear-num93.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}}} \cdot e^{\log a \cdot \left(t - 1\right) - b} \]
      3. exp-diff75.5%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \color{blue}{\frac{e^{\log a \cdot \left(t - 1\right)}}{e^{b}}} \]
      4. sub-neg75.5%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{e^{\log a \cdot \color{blue}{\left(t + \left(-1\right)\right)}}}{e^{b}} \]
      5. metadata-eval75.5%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{e^{\log a \cdot \left(t + \color{blue}{-1}\right)}}{e^{b}} \]
      6. pow-to-exp77.3%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{\color{blue}{{a}^{\left(t + -1\right)}}}{e^{b}} \]
      7. frac-times77.3%

        \[\leadsto \color{blue}{\frac{1 \cdot {a}^{\left(t + -1\right)}}{\frac{y}{x} \cdot e^{b}}} \]
      8. *-un-lft-identity77.3%

        \[\leadsto \frac{\color{blue}{{a}^{\left(t + -1\right)}}}{\frac{y}{x} \cdot e^{b}} \]
    7. Applied egg-rr77.3%

      \[\leadsto \color{blue}{\frac{{a}^{\left(t + -1\right)}}{\frac{y}{x} \cdot e^{b}}} \]
    8. Taylor expanded in b around 0 86.4%

      \[\leadsto \color{blue}{\frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y}} \]
    9. Step-by-step derivation
      1. associate-/l*88.3%

        \[\leadsto \color{blue}{x \cdot \frac{e^{\log a \cdot \left(t - 1\right)}}{y}} \]
      2. exp-to-pow90.3%

        \[\leadsto x \cdot \frac{\color{blue}{{a}^{\left(t - 1\right)}}}{y} \]
      3. sub-neg90.3%

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

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

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

    if -6.5e-213 < y < 4.7e7

    1. Initial program 97.2%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 97.2%

      \[\leadsto \frac{\color{blue}{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}}{y} \]
    4. Step-by-step derivation
      1. div-exp90.2%

        \[\leadsto \frac{x \cdot \color{blue}{\frac{e^{\log a \cdot \left(t - 1\right)}}{e^{b}}}}{y} \]
      2. exp-to-pow91.0%

        \[\leadsto \frac{x \cdot \frac{\color{blue}{{a}^{\left(t - 1\right)}}}{e^{b}}}{y} \]
      3. sub-neg91.0%

        \[\leadsto \frac{x \cdot \frac{{a}^{\color{blue}{\left(t + \left(-1\right)\right)}}}{e^{b}}}{y} \]
      4. metadata-eval91.0%

        \[\leadsto \frac{x \cdot \frac{{a}^{\left(t + \color{blue}{-1}\right)}}{e^{b}}}{y} \]
    5. Simplified91.0%

      \[\leadsto \frac{\color{blue}{x \cdot \frac{{a}^{\left(t + -1\right)}}{e^{b}}}}{y} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 78.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{{a}^{\left(t + -1\right)}}{y}\\ t_2 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{if}\;y \leq -3.85:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.3 \cdot 10^{-214}:\\ \;\;\;\;x \cdot t\_1\\ \mathbf{elif}\;y \leq 2500000000:\\ \;\;\;\;t\_1 \cdot \frac{x}{e^{b}}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (pow a (+ t -1.0)) y)) (t_2 (/ (* x (/ (pow z y) a)) y)))
   (if (<= y -3.85)
     t_2
     (if (<= y -1.3e-214)
       (* x t_1)
       (if (<= y 2500000000.0) (* t_1 (/ x (exp b))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = pow(a, (t + -1.0)) / y;
	double t_2 = (x * (pow(z, y) / a)) / y;
	double tmp;
	if (y <= -3.85) {
		tmp = t_2;
	} else if (y <= -1.3e-214) {
		tmp = x * t_1;
	} else if (y <= 2500000000.0) {
		tmp = t_1 * (x / exp(b));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (a ** (t + (-1.0d0))) / y
    t_2 = (x * ((z ** y) / a)) / y
    if (y <= (-3.85d0)) then
        tmp = t_2
    else if (y <= (-1.3d-214)) then
        tmp = x * t_1
    else if (y <= 2500000000.0d0) then
        tmp = t_1 * (x / exp(b))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = Math.pow(a, (t + -1.0)) / y;
	double t_2 = (x * (Math.pow(z, y) / a)) / y;
	double tmp;
	if (y <= -3.85) {
		tmp = t_2;
	} else if (y <= -1.3e-214) {
		tmp = x * t_1;
	} else if (y <= 2500000000.0) {
		tmp = t_1 * (x / Math.exp(b));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = math.pow(a, (t + -1.0)) / y
	t_2 = (x * (math.pow(z, y) / a)) / y
	tmp = 0
	if y <= -3.85:
		tmp = t_2
	elif y <= -1.3e-214:
		tmp = x * t_1
	elif y <= 2500000000.0:
		tmp = t_1 * (x / math.exp(b))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64((a ^ Float64(t + -1.0)) / y)
	t_2 = Float64(Float64(x * Float64((z ^ y) / a)) / y)
	tmp = 0.0
	if (y <= -3.85)
		tmp = t_2;
	elseif (y <= -1.3e-214)
		tmp = Float64(x * t_1);
	elseif (y <= 2500000000.0)
		tmp = Float64(t_1 * Float64(x / exp(b)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (a ^ (t + -1.0)) / y;
	t_2 = (x * ((z ^ y) / a)) / y;
	tmp = 0.0;
	if (y <= -3.85)
		tmp = t_2;
	elseif (y <= -1.3e-214)
		tmp = x * t_1;
	elseif (y <= 2500000000.0)
		tmp = t_1 * (x / exp(b));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -3.85], t$95$2, If[LessEqual[y, -1.3e-214], N[(x * t$95$1), $MachinePrecision], If[LessEqual[y, 2500000000.0], N[(t$95$1 * N[(x / N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{{a}^{\left(t + -1\right)}}{y}\\
t_2 := \frac{x \cdot \frac{{z}^{y}}{a}}{y}\\
\mathbf{if}\;y \leq -3.85:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -1.3 \cdot 10^{-214}:\\
\;\;\;\;x \cdot t\_1\\

\mathbf{elif}\;y \leq 2500000000:\\
\;\;\;\;t\_1 \cdot \frac{x}{e^{b}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.85000000000000009 or 2.5e9 < y

    1. Initial program 100.0%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 89.8%

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

        \[\leadsto \frac{x \cdot \color{blue}{\left(e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}\right)}}{y} \]
      2. exp-to-pow67.4%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot \color{blue}{{a}^{\left(t - 1\right)}}\right)}{y} \]
      3. sub-neg67.4%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot {a}^{\color{blue}{\left(t + \left(-1\right)\right)}}\right)}{y} \]
      4. metadata-eval67.4%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot {a}^{\left(t + \color{blue}{-1}\right)}\right)}{y} \]
      5. *-commutative67.4%

        \[\leadsto \frac{x \cdot \left(e^{\color{blue}{\log z \cdot y}} \cdot {a}^{\left(t + -1\right)}\right)}{y} \]
      6. exp-to-pow67.4%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot \frac{{z}^{y}}{a}}}{y} \]
    8. Simplified78.8%

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

    if -3.85000000000000009 < y < -1.3e-214

    1. Initial program 93.7%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative93.7%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+93.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define93.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg93.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval93.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified93.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 93.0%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. *-commutative93.0%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot e^{\log a \cdot \left(t - 1\right) - b}} \]
      2. clear-num93.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}}} \cdot e^{\log a \cdot \left(t - 1\right) - b} \]
      3. exp-diff75.5%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \color{blue}{\frac{e^{\log a \cdot \left(t - 1\right)}}{e^{b}}} \]
      4. sub-neg75.5%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{e^{\log a \cdot \color{blue}{\left(t + \left(-1\right)\right)}}}{e^{b}} \]
      5. metadata-eval75.5%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{e^{\log a \cdot \left(t + \color{blue}{-1}\right)}}{e^{b}} \]
      6. pow-to-exp77.3%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{\color{blue}{{a}^{\left(t + -1\right)}}}{e^{b}} \]
      7. frac-times77.3%

        \[\leadsto \color{blue}{\frac{1 \cdot {a}^{\left(t + -1\right)}}{\frac{y}{x} \cdot e^{b}}} \]
      8. *-un-lft-identity77.3%

        \[\leadsto \frac{\color{blue}{{a}^{\left(t + -1\right)}}}{\frac{y}{x} \cdot e^{b}} \]
    7. Applied egg-rr77.3%

      \[\leadsto \color{blue}{\frac{{a}^{\left(t + -1\right)}}{\frac{y}{x} \cdot e^{b}}} \]
    8. Taylor expanded in b around 0 86.4%

      \[\leadsto \color{blue}{\frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y}} \]
    9. Step-by-step derivation
      1. associate-/l*88.3%

        \[\leadsto \color{blue}{x \cdot \frac{e^{\log a \cdot \left(t - 1\right)}}{y}} \]
      2. exp-to-pow90.3%

        \[\leadsto x \cdot \frac{\color{blue}{{a}^{\left(t - 1\right)}}}{y} \]
      3. sub-neg90.3%

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

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

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

    if -1.3e-214 < y < 2.5e9

    1. Initial program 97.2%

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

        \[\leadsto \color{blue}{x \cdot \frac{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}} \]
      2. associate--l+97.3%

        \[\leadsto x \cdot \frac{e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}}}{y} \]
      3. exp-sum97.3%

        \[\leadsto x \cdot \frac{\color{blue}{e^{y \cdot \log z} \cdot e^{\left(t - 1\right) \cdot \log a - b}}}{y} \]
      4. associate-/l*97.3%

        \[\leadsto x \cdot \color{blue}{\left(e^{y \cdot \log z} \cdot \frac{e^{\left(t - 1\right) \cdot \log a - b}}{y}\right)} \]
      5. *-commutative97.3%

        \[\leadsto x \cdot \left(e^{\color{blue}{\log z \cdot y}} \cdot \frac{e^{\left(t - 1\right) \cdot \log a - b}}{y}\right) \]
      6. exp-to-pow97.3%

        \[\leadsto x \cdot \left(\color{blue}{{z}^{y}} \cdot \frac{e^{\left(t - 1\right) \cdot \log a - b}}{y}\right) \]
      7. exp-diff90.3%

        \[\leadsto x \cdot \left({z}^{y} \cdot \frac{\color{blue}{\frac{e^{\left(t - 1\right) \cdot \log a}}{e^{b}}}}{y}\right) \]
      8. *-commutative90.3%

        \[\leadsto x \cdot \left({z}^{y} \cdot \frac{\frac{e^{\color{blue}{\log a \cdot \left(t - 1\right)}}}{e^{b}}}{y}\right) \]
      9. exp-to-pow91.0%

        \[\leadsto x \cdot \left({z}^{y} \cdot \frac{\frac{\color{blue}{{a}^{\left(t - 1\right)}}}{e^{b}}}{y}\right) \]
      10. sub-neg91.0%

        \[\leadsto x \cdot \left({z}^{y} \cdot \frac{\frac{{a}^{\color{blue}{\left(t + \left(-1\right)\right)}}}{e^{b}}}{y}\right) \]
      11. metadata-eval91.0%

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

      \[\leadsto \color{blue}{x \cdot \left({z}^{y} \cdot \frac{\frac{{a}^{\left(t + -1\right)}}{e^{b}}}{y}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 82.2%

      \[\leadsto \color{blue}{\frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y \cdot e^{b}}} \]
    6. Step-by-step derivation
      1. *-commutative82.2%

        \[\leadsto \frac{\color{blue}{e^{\log a \cdot \left(t - 1\right)} \cdot x}}{y \cdot e^{b}} \]
      2. exp-to-pow83.0%

        \[\leadsto \frac{\color{blue}{{a}^{\left(t - 1\right)}} \cdot x}{y \cdot e^{b}} \]
      3. sub-neg83.0%

        \[\leadsto \frac{{a}^{\color{blue}{\left(t + \left(-1\right)\right)}} \cdot x}{y \cdot e^{b}} \]
      4. metadata-eval83.0%

        \[\leadsto \frac{{a}^{\left(t + \color{blue}{-1}\right)} \cdot x}{y \cdot e^{b}} \]
      5. times-frac85.0%

        \[\leadsto \color{blue}{\frac{{a}^{\left(t + -1\right)}}{y} \cdot \frac{x}{e^{b}}} \]
    7. Simplified85.0%

      \[\leadsto \color{blue}{\frac{{a}^{\left(t + -1\right)}}{y} \cdot \frac{x}{e^{b}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 83.7% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+125} \lor \neg \left(y \leq 2.75 \cdot 10^{+38}\right):\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;e^{\left(t + -1\right) \cdot \log a - b} \cdot \frac{x}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= y -3.4e+125) (not (<= y 2.75e+38)))
   (/ (* x (/ (pow z y) a)) y)
   (* (exp (- (* (+ t -1.0) (log a)) b)) (/ x y))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -3.4e+125) || !(y <= 2.75e+38)) {
		tmp = (x * (pow(z, y) / a)) / y;
	} else {
		tmp = exp((((t + -1.0) * log(a)) - b)) * (x / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((y <= (-3.4d+125)) .or. (.not. (y <= 2.75d+38))) then
        tmp = (x * ((z ** y) / a)) / y
    else
        tmp = exp((((t + (-1.0d0)) * log(a)) - b)) * (x / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -3.4e+125) || !(y <= 2.75e+38)) {
		tmp = (x * (Math.pow(z, y) / a)) / y;
	} else {
		tmp = Math.exp((((t + -1.0) * Math.log(a)) - b)) * (x / y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -3.4e+125) or not (y <= 2.75e+38):
		tmp = (x * (math.pow(z, y) / a)) / y
	else:
		tmp = math.exp((((t + -1.0) * math.log(a)) - b)) * (x / y)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((y <= -3.4e+125) || !(y <= 2.75e+38))
		tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y);
	else
		tmp = Float64(exp(Float64(Float64(Float64(t + -1.0) * log(a)) - b)) * Float64(x / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((y <= -3.4e+125) || ~((y <= 2.75e+38)))
		tmp = (x * ((z ^ y) / a)) / y;
	else
		tmp = exp((((t + -1.0) * log(a)) - b)) * (x / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.4e+125], N[Not[LessEqual[y, 2.75e+38]], $MachinePrecision]], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[Exp[N[(N[(N[(t + -1.0), $MachinePrecision] * N[Log[a], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+125} \lor \neg \left(y \leq 2.75 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\

\mathbf{else}:\\
\;\;\;\;e^{\left(t + -1\right) \cdot \log a - b} \cdot \frac{x}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.3999999999999999e125 or 2.7500000000000002e38 < y

    1. Initial program 100.0%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 95.5%

      \[\leadsto \frac{\color{blue}{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
    4. Step-by-step derivation
      1. exp-sum73.9%

        \[\leadsto \frac{x \cdot \color{blue}{\left(e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}\right)}}{y} \]
      2. exp-to-pow73.9%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot \color{blue}{{a}^{\left(t - 1\right)}}\right)}{y} \]
      3. sub-neg73.9%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot {a}^{\color{blue}{\left(t + \left(-1\right)\right)}}\right)}{y} \]
      4. metadata-eval73.9%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot {a}^{\left(t + \color{blue}{-1}\right)}\right)}{y} \]
      5. *-commutative73.9%

        \[\leadsto \frac{x \cdot \left(e^{\color{blue}{\log z \cdot y}} \cdot {a}^{\left(t + -1\right)}\right)}{y} \]
      6. exp-to-pow73.9%

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot \frac{{z}^{y}}{a}}}{y} \]
    8. Simplified85.5%

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

    if -3.3999999999999999e125 < y < 2.7500000000000002e38

    1. Initial program 96.9%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative96.9%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+90.6%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define90.6%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg90.6%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval90.6%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified90.6%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 87.8%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+125} \lor \neg \left(y \leq 2.75 \cdot 10^{+38}\right):\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;e^{\left(t + -1\right) \cdot \log a - b} \cdot \frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.5% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x \cdot {a}^{t}}{y}\\ \mathbf{if}\;t \leq -1.75 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-117}:\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-8}:\\ \;\;\;\;x \cdot \frac{\frac{\frac{1}{a}}{e^{b}}}{y}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (* x (pow a t)) y)))
   (if (<= t -1.75e-16)
     t_1
     (if (<= t -4.6e-117)
       (/ (* x (/ (pow z y) a)) y)
       (if (<= t 1.7e-8) (* x (/ (/ (/ 1.0 a) (exp b)) y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * pow(a, t)) / y;
	double tmp;
	if (t <= -1.75e-16) {
		tmp = t_1;
	} else if (t <= -4.6e-117) {
		tmp = (x * (pow(z, y) / a)) / y;
	} else if (t <= 1.7e-8) {
		tmp = x * (((1.0 / a) / exp(b)) / y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * (a ** t)) / y
    if (t <= (-1.75d-16)) then
        tmp = t_1
    else if (t <= (-4.6d-117)) then
        tmp = (x * ((z ** y) / a)) / y
    else if (t <= 1.7d-8) then
        tmp = x * (((1.0d0 / a) / exp(b)) / y)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x * Math.pow(a, t)) / y;
	double tmp;
	if (t <= -1.75e-16) {
		tmp = t_1;
	} else if (t <= -4.6e-117) {
		tmp = (x * (Math.pow(z, y) / a)) / y;
	} else if (t <= 1.7e-8) {
		tmp = x * (((1.0 / a) / Math.exp(b)) / y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x * math.pow(a, t)) / y
	tmp = 0
	if t <= -1.75e-16:
		tmp = t_1
	elif t <= -4.6e-117:
		tmp = (x * (math.pow(z, y) / a)) / y
	elif t <= 1.7e-8:
		tmp = x * (((1.0 / a) / math.exp(b)) / y)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x * (a ^ t)) / y)
	tmp = 0.0
	if (t <= -1.75e-16)
		tmp = t_1;
	elseif (t <= -4.6e-117)
		tmp = Float64(Float64(x * Float64((z ^ y) / a)) / y);
	elseif (t <= 1.7e-8)
		tmp = Float64(x * Float64(Float64(Float64(1.0 / a) / exp(b)) / y));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x * (a ^ t)) / y;
	tmp = 0.0;
	if (t <= -1.75e-16)
		tmp = t_1;
	elseif (t <= -4.6e-117)
		tmp = (x * ((z ^ y) / a)) / y;
	elseif (t <= 1.7e-8)
		tmp = x * (((1.0 / a) / exp(b)) / y);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -1.75e-16], t$95$1, If[LessEqual[t, -4.6e-117], N[(N[(x * N[(N[Power[z, y], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 1.7e-8], N[(x * N[(N[(N[(1.0 / a), $MachinePrecision] / N[Exp[b], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{x \cdot {a}^{t}}{y}\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.7 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \frac{\frac{\frac{1}{a}}{e^{b}}}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.75000000000000009e-16 or 1.7e-8 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.9%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.9%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.9%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.9%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.9%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 75.7%

      \[\leadsto e^{\color{blue}{t \cdot \log a}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. *-commutative75.7%

        \[\leadsto e^{\color{blue}{\log a \cdot t}} \cdot \frac{x}{y} \]
    7. Simplified75.7%

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

        \[\leadsto \color{blue}{\frac{e^{\log a \cdot t} \cdot x}{y}} \]
      2. exp-to-pow82.9%

        \[\leadsto \frac{\color{blue}{{a}^{t}} \cdot x}{y} \]
    9. Applied egg-rr82.9%

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

    if -1.75000000000000009e-16 < t < -4.59999999999999989e-117

    1. Initial program 98.3%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 98.3%

      \[\leadsto \frac{\color{blue}{x \cdot e^{y \cdot \log z + \log a \cdot \left(t - 1\right)}}}{y} \]
    4. Step-by-step derivation
      1. exp-sum98.3%

        \[\leadsto \frac{x \cdot \color{blue}{\left(e^{y \cdot \log z} \cdot e^{\log a \cdot \left(t - 1\right)}\right)}}{y} \]
      2. exp-to-pow99.9%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot \color{blue}{{a}^{\left(t - 1\right)}}\right)}{y} \]
      3. sub-neg99.9%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot {a}^{\color{blue}{\left(t + \left(-1\right)\right)}}\right)}{y} \]
      4. metadata-eval99.9%

        \[\leadsto \frac{x \cdot \left(e^{y \cdot \log z} \cdot {a}^{\left(t + \color{blue}{-1}\right)}\right)}{y} \]
      5. *-commutative99.9%

        \[\leadsto \frac{x \cdot \left(e^{\color{blue}{\log z \cdot y}} \cdot {a}^{\left(t + -1\right)}\right)}{y} \]
      6. exp-to-pow99.9%

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

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

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

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

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

    if -4.59999999999999989e-117 < t < 1.7e-8

    1. Initial program 95.0%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative95.0%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+87.4%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define87.4%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg87.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval87.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified87.4%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 66.3%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in t around 0 71.9%

      \[\leadsto \color{blue}{\frac{x \cdot e^{-1 \cdot \log a - b}}{y}} \]
    7. Step-by-step derivation
      1. associate-/l*75.0%

        \[\leadsto \color{blue}{x \cdot \frac{e^{-1 \cdot \log a - b}}{y}} \]
      2. exp-diff75.0%

        \[\leadsto x \cdot \frac{\color{blue}{\frac{e^{-1 \cdot \log a}}{e^{b}}}}{y} \]
      3. mul-1-neg75.0%

        \[\leadsto x \cdot \frac{\frac{e^{\color{blue}{-\log a}}}{e^{b}}}{y} \]
      4. log-rec75.0%

        \[\leadsto x \cdot \frac{\frac{e^{\color{blue}{\log \left(\frac{1}{a}\right)}}}{e^{b}}}{y} \]
      5. rem-exp-log76.3%

        \[\leadsto x \cdot \frac{\frac{\color{blue}{\frac{1}{a}}}{e^{b}}}{y} \]
    8. Simplified76.3%

      \[\leadsto \color{blue}{x \cdot \frac{\frac{\frac{1}{a}}{e^{b}}}{y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{-16}:\\ \;\;\;\;\frac{x \cdot {a}^{t}}{y}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-117}:\\ \;\;\;\;\frac{x \cdot \frac{{z}^{y}}{a}}{y}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-8}:\\ \;\;\;\;x \cdot \frac{\frac{\frac{1}{a}}{e^{b}}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot {a}^{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 52.0% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.26 \cdot 10^{+23}:\\ \;\;\;\;\frac{x}{y} - b \cdot \left(\frac{x}{y} - b \cdot \left(x \cdot \left(\frac{0.5}{y} - 0.16666666666666666 \cdot \frac{b}{y}\right)\right)\right)\\ \mathbf{elif}\;b \leq 0.000375:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+80}:\\ \;\;\;\;x \cdot \frac{e^{b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -1.26e+23)
   (-
    (/ x y)
    (*
     b
     (- (/ x y) (* b (* x (- (/ 0.5 y) (* 0.16666666666666666 (/ b y))))))))
   (if (<= b 0.000375)
     (* (/ x y) (/ 1.0 a))
     (if (<= b 1.2e+80)
       (* x (/ (exp b) y))
       (/
        x
        (*
         y
         (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -1.26e+23) {
		tmp = (x / y) - (b * ((x / y) - (b * (x * ((0.5 / y) - (0.16666666666666666 * (b / y)))))));
	} else if (b <= 0.000375) {
		tmp = (x / y) * (1.0 / a);
	} else if (b <= 1.2e+80) {
		tmp = x * (exp(b) / y);
	} else {
		tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (b <= (-1.26d+23)) then
        tmp = (x / y) - (b * ((x / y) - (b * (x * ((0.5d0 / y) - (0.16666666666666666d0 * (b / y)))))))
    else if (b <= 0.000375d0) then
        tmp = (x / y) * (1.0d0 / a)
    else if (b <= 1.2d+80) then
        tmp = x * (exp(b) / y)
    else
        tmp = x / (y * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0)))))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -1.26e+23) {
		tmp = (x / y) - (b * ((x / y) - (b * (x * ((0.5 / y) - (0.16666666666666666 * (b / y)))))));
	} else if (b <= 0.000375) {
		tmp = (x / y) * (1.0 / a);
	} else if (b <= 1.2e+80) {
		tmp = x * (Math.exp(b) / y);
	} else {
		tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -1.26e+23:
		tmp = (x / y) - (b * ((x / y) - (b * (x * ((0.5 / y) - (0.16666666666666666 * (b / y)))))))
	elif b <= 0.000375:
		tmp = (x / y) * (1.0 / a)
	elif b <= 1.2e+80:
		tmp = x * (math.exp(b) / y)
	else:
		tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -1.26e+23)
		tmp = Float64(Float64(x / y) - Float64(b * Float64(Float64(x / y) - Float64(b * Float64(x * Float64(Float64(0.5 / y) - Float64(0.16666666666666666 * Float64(b / y))))))));
	elseif (b <= 0.000375)
		tmp = Float64(Float64(x / y) * Float64(1.0 / a));
	elseif (b <= 1.2e+80)
		tmp = Float64(x * Float64(exp(b) / y));
	else
		tmp = Float64(x / Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666))))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -1.26e+23)
		tmp = (x / y) - (b * ((x / y) - (b * (x * ((0.5 / y) - (0.16666666666666666 * (b / y)))))));
	elseif (b <= 0.000375)
		tmp = (x / y) * (1.0 / a);
	elseif (b <= 1.2e+80)
		tmp = x * (exp(b) / y);
	else
		tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.26e+23], N[(N[(x / y), $MachinePrecision] - N[(b * N[(N[(x / y), $MachinePrecision] - N[(b * N[(x * N[(N[(0.5 / y), $MachinePrecision] - N[(0.16666666666666666 * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 0.000375], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.2e+80], N[(x * N[(N[Exp[b], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * N[(0.5 + N[(b * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.26 \cdot 10^{+23}:\\
\;\;\;\;\frac{x}{y} - b \cdot \left(\frac{x}{y} - b \cdot \left(x \cdot \left(\frac{0.5}{y} - 0.16666666666666666 \cdot \frac{b}{y}\right)\right)\right)\\

\mathbf{elif}\;b \leq 0.000375:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\

\mathbf{elif}\;b \leq 1.2 \cdot 10^{+80}:\\
\;\;\;\;x \cdot \frac{e^{b}}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.26000000000000004e23

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.7%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.7%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 72.6%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-172.6%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified72.6%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg72.6%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times81.3%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity81.3%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr81.3%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 53.2%

      \[\leadsto \color{blue}{b \cdot \left(b \cdot \left(-1 \cdot \left(b \cdot \left(-1 \cdot \left(-1 \cdot \frac{x}{y} + 0.5 \cdot \frac{x}{y}\right) + \left(-0.5 \cdot \frac{x}{y} + 0.16666666666666666 \cdot \frac{x}{y}\right)\right)\right) - \left(-1 \cdot \frac{x}{y} + 0.5 \cdot \frac{x}{y}\right)\right) - \frac{x}{y}\right) + \frac{x}{y}} \]
    11. Taylor expanded in x around -inf 66.6%

      \[\leadsto b \cdot \left(\color{blue}{-1 \cdot \left(b \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - 0.5 \cdot \frac{1}{y}\right)\right)\right)} - \frac{x}{y}\right) + \frac{x}{y} \]
    12. Step-by-step derivation
      1. associate-*r*66.6%

        \[\leadsto b \cdot \left(\color{blue}{\left(-1 \cdot b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - 0.5 \cdot \frac{1}{y}\right)\right)} - \frac{x}{y}\right) + \frac{x}{y} \]
      2. neg-mul-166.6%

        \[\leadsto b \cdot \left(\color{blue}{\left(-b\right)} \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - 0.5 \cdot \frac{1}{y}\right)\right) - \frac{x}{y}\right) + \frac{x}{y} \]
      3. associate-*r/66.6%

        \[\leadsto b \cdot \left(\left(-b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - \color{blue}{\frac{0.5 \cdot 1}{y}}\right)\right) - \frac{x}{y}\right) + \frac{x}{y} \]
      4. metadata-eval66.6%

        \[\leadsto b \cdot \left(\left(-b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - \frac{\color{blue}{0.5}}{y}\right)\right) - \frac{x}{y}\right) + \frac{x}{y} \]
    13. Simplified66.6%

      \[\leadsto b \cdot \left(\color{blue}{\left(-b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - \frac{0.5}{y}\right)\right)} - \frac{x}{y}\right) + \frac{x}{y} \]

    if -1.26000000000000004e23 < b < 3.7500000000000001e-4

    1. Initial program 95.9%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative95.9%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+92.4%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define92.4%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg92.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval92.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified92.4%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.3%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 71.3%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow72.6%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg72.6%

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

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

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

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

    if 3.7500000000000001e-4 < b < 1.1999999999999999e80

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+79.2%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define79.2%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg79.2%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval79.2%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified79.2%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 42.3%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-142.3%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified42.3%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. clear-num42.3%

        \[\leadsto e^{-b} \cdot \color{blue}{\frac{1}{\frac{y}{x}}} \]
      2. un-div-inv42.3%

        \[\leadsto \color{blue}{\frac{e^{-b}}{\frac{y}{x}}} \]
      3. add-sqr-sqrt0.0%

        \[\leadsto \frac{e^{\color{blue}{\sqrt{-b} \cdot \sqrt{-b}}}}{\frac{y}{x}} \]
      4. sqrt-unprod42.4%

        \[\leadsto \frac{e^{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}}}}{\frac{y}{x}} \]
      5. sqr-neg42.4%

        \[\leadsto \frac{e^{\sqrt{\color{blue}{b \cdot b}}}}{\frac{y}{x}} \]
      6. sqrt-unprod42.4%

        \[\leadsto \frac{e^{\color{blue}{\sqrt{b} \cdot \sqrt{b}}}}{\frac{y}{x}} \]
      7. add-sqr-sqrt42.4%

        \[\leadsto \frac{e^{\color{blue}{b}}}{\frac{y}{x}} \]
    9. Applied egg-rr42.4%

      \[\leadsto \color{blue}{\frac{e^{b}}{\frac{y}{x}}} \]
    10. Step-by-step derivation
      1. associate-/r/46.7%

        \[\leadsto \color{blue}{\frac{e^{b}}{y} \cdot x} \]
    11. Simplified46.7%

      \[\leadsto \color{blue}{\frac{e^{b}}{y} \cdot x} \]

    if 1.1999999999999999e80 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+82.6%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define82.6%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg82.6%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval82.6%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified82.6%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 74.1%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-174.1%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified74.1%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg74.1%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times89.3%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity89.3%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr89.3%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 82.9%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + 0.16666666666666666 \cdot b\right)\right)\right)} \cdot y} \]
    11. Step-by-step derivation
      1. *-commutative82.9%

        \[\leadsto \frac{x}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + \color{blue}{b \cdot 0.16666666666666666}\right)\right)\right) \cdot y} \]
    12. Simplified82.9%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)} \cdot y} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification55.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.26 \cdot 10^{+23}:\\ \;\;\;\;\frac{x}{y} - b \cdot \left(\frac{x}{y} - b \cdot \left(x \cdot \left(\frac{0.5}{y} - 0.16666666666666666 \cdot \frac{b}{y}\right)\right)\right)\\ \mathbf{elif}\;b \leq 0.000375:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+80}:\\ \;\;\;\;x \cdot \frac{e^{b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 51.7% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{+24}:\\ \;\;\;\;\frac{x}{y} - b \cdot \left(\frac{x}{y} - b \cdot \left(x \cdot \left(\frac{0.5}{y} - 0.16666666666666666 \cdot \frac{b}{y}\right)\right)\right)\\ \mathbf{elif}\;b \leq 0.000375:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+79}:\\ \;\;\;\;\frac{x}{y} \cdot e^{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -6.8e+24)
   (-
    (/ x y)
    (*
     b
     (- (/ x y) (* b (* x (- (/ 0.5 y) (* 0.16666666666666666 (/ b y))))))))
   (if (<= b 0.000375)
     (* (/ x y) (/ 1.0 a))
     (if (<= b 1.35e+79)
       (* (/ x y) (exp b))
       (/
        x
        (*
         y
         (+ 1.0 (* b (+ 1.0 (* b (+ 0.5 (* b 0.16666666666666666))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -6.8e+24) {
		tmp = (x / y) - (b * ((x / y) - (b * (x * ((0.5 / y) - (0.16666666666666666 * (b / y)))))));
	} else if (b <= 0.000375) {
		tmp = (x / y) * (1.0 / a);
	} else if (b <= 1.35e+79) {
		tmp = (x / y) * exp(b);
	} else {
		tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (b <= (-6.8d+24)) then
        tmp = (x / y) - (b * ((x / y) - (b * (x * ((0.5d0 / y) - (0.16666666666666666d0 * (b / y)))))))
    else if (b <= 0.000375d0) then
        tmp = (x / y) * (1.0d0 / a)
    else if (b <= 1.35d+79) then
        tmp = (x / y) * exp(b)
    else
        tmp = x / (y * (1.0d0 + (b * (1.0d0 + (b * (0.5d0 + (b * 0.16666666666666666d0)))))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -6.8e+24) {
		tmp = (x / y) - (b * ((x / y) - (b * (x * ((0.5 / y) - (0.16666666666666666 * (b / y)))))));
	} else if (b <= 0.000375) {
		tmp = (x / y) * (1.0 / a);
	} else if (b <= 1.35e+79) {
		tmp = (x / y) * Math.exp(b);
	} else {
		tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -6.8e+24:
		tmp = (x / y) - (b * ((x / y) - (b * (x * ((0.5 / y) - (0.16666666666666666 * (b / y)))))))
	elif b <= 0.000375:
		tmp = (x / y) * (1.0 / a)
	elif b <= 1.35e+79:
		tmp = (x / y) * math.exp(b)
	else:
		tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -6.8e+24)
		tmp = Float64(Float64(x / y) - Float64(b * Float64(Float64(x / y) - Float64(b * Float64(x * Float64(Float64(0.5 / y) - Float64(0.16666666666666666 * Float64(b / y))))))));
	elseif (b <= 0.000375)
		tmp = Float64(Float64(x / y) * Float64(1.0 / a));
	elseif (b <= 1.35e+79)
		tmp = Float64(Float64(x / y) * exp(b));
	else
		tmp = Float64(x / Float64(y * Float64(1.0 + Float64(b * Float64(1.0 + Float64(b * Float64(0.5 + Float64(b * 0.16666666666666666))))))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -6.8e+24)
		tmp = (x / y) - (b * ((x / y) - (b * (x * ((0.5 / y) - (0.16666666666666666 * (b / y)))))));
	elseif (b <= 0.000375)
		tmp = (x / y) * (1.0 / a);
	elseif (b <= 1.35e+79)
		tmp = (x / y) * exp(b);
	else
		tmp = x / (y * (1.0 + (b * (1.0 + (b * (0.5 + (b * 0.16666666666666666)))))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.8e+24], N[(N[(x / y), $MachinePrecision] - N[(b * N[(N[(x / y), $MachinePrecision] - N[(b * N[(x * N[(N[(0.5 / y), $MachinePrecision] - N[(0.16666666666666666 * N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 0.000375], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.35e+79], N[(N[(x / y), $MachinePrecision] * N[Exp[b], $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(1.0 + N[(b * N[(1.0 + N[(b * N[(0.5 + N[(b * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{y} - b \cdot \left(\frac{x}{y} - b \cdot \left(x \cdot \left(\frac{0.5}{y} - 0.16666666666666666 \cdot \frac{b}{y}\right)\right)\right)\\

\mathbf{elif}\;b \leq 0.000375:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\

\mathbf{elif}\;b \leq 1.35 \cdot 10^{+79}:\\
\;\;\;\;\frac{x}{y} \cdot e^{b}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -6.8000000000000001e24

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.7%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.7%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 72.6%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-172.6%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified72.6%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg72.6%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times81.3%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity81.3%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr81.3%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 53.2%

      \[\leadsto \color{blue}{b \cdot \left(b \cdot \left(-1 \cdot \left(b \cdot \left(-1 \cdot \left(-1 \cdot \frac{x}{y} + 0.5 \cdot \frac{x}{y}\right) + \left(-0.5 \cdot \frac{x}{y} + 0.16666666666666666 \cdot \frac{x}{y}\right)\right)\right) - \left(-1 \cdot \frac{x}{y} + 0.5 \cdot \frac{x}{y}\right)\right) - \frac{x}{y}\right) + \frac{x}{y}} \]
    11. Taylor expanded in x around -inf 66.6%

      \[\leadsto b \cdot \left(\color{blue}{-1 \cdot \left(b \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - 0.5 \cdot \frac{1}{y}\right)\right)\right)} - \frac{x}{y}\right) + \frac{x}{y} \]
    12. Step-by-step derivation
      1. associate-*r*66.6%

        \[\leadsto b \cdot \left(\color{blue}{\left(-1 \cdot b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - 0.5 \cdot \frac{1}{y}\right)\right)} - \frac{x}{y}\right) + \frac{x}{y} \]
      2. neg-mul-166.6%

        \[\leadsto b \cdot \left(\color{blue}{\left(-b\right)} \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - 0.5 \cdot \frac{1}{y}\right)\right) - \frac{x}{y}\right) + \frac{x}{y} \]
      3. associate-*r/66.6%

        \[\leadsto b \cdot \left(\left(-b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - \color{blue}{\frac{0.5 \cdot 1}{y}}\right)\right) - \frac{x}{y}\right) + \frac{x}{y} \]
      4. metadata-eval66.6%

        \[\leadsto b \cdot \left(\left(-b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - \frac{\color{blue}{0.5}}{y}\right)\right) - \frac{x}{y}\right) + \frac{x}{y} \]
    13. Simplified66.6%

      \[\leadsto b \cdot \left(\color{blue}{\left(-b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - \frac{0.5}{y}\right)\right)} - \frac{x}{y}\right) + \frac{x}{y} \]

    if -6.8000000000000001e24 < b < 3.7500000000000001e-4

    1. Initial program 95.9%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative95.9%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+92.4%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define92.4%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg92.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval92.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified92.4%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.3%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 71.3%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow72.6%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg72.6%

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

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

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

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

    if 3.7500000000000001e-4 < b < 1.35e79

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+79.2%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define79.2%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg79.2%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval79.2%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified79.2%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 42.3%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-142.3%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified42.3%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. associate-*r/59.0%

        \[\leadsto \color{blue}{\frac{e^{-b} \cdot x}{y}} \]
      2. add-sqr-sqrt0.0%

        \[\leadsto \frac{e^{\color{blue}{\sqrt{-b} \cdot \sqrt{-b}}} \cdot x}{y} \]
      3. sqrt-unprod46.7%

        \[\leadsto \frac{e^{\color{blue}{\sqrt{\left(-b\right) \cdot \left(-b\right)}}} \cdot x}{y} \]
      4. sqr-neg46.7%

        \[\leadsto \frac{e^{\sqrt{\color{blue}{b \cdot b}}} \cdot x}{y} \]
      5. sqrt-unprod46.7%

        \[\leadsto \frac{e^{\color{blue}{\sqrt{b} \cdot \sqrt{b}}} \cdot x}{y} \]
      6. add-sqr-sqrt46.7%

        \[\leadsto \frac{e^{\color{blue}{b}} \cdot x}{y} \]
    9. Applied egg-rr46.7%

      \[\leadsto \color{blue}{\frac{e^{b} \cdot x}{y}} \]
    10. Step-by-step derivation
      1. associate-/l*42.4%

        \[\leadsto \color{blue}{e^{b} \cdot \frac{x}{y}} \]
      2. *-commutative42.4%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot e^{b}} \]
    11. Simplified42.4%

      \[\leadsto \color{blue}{\frac{x}{y} \cdot e^{b}} \]

    if 1.35e79 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+82.6%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define82.6%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg82.6%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval82.6%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified82.6%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 74.1%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-174.1%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified74.1%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg74.1%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times89.3%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity89.3%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr89.3%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 82.9%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + 0.16666666666666666 \cdot b\right)\right)\right)} \cdot y} \]
    11. Step-by-step derivation
      1. *-commutative82.9%

        \[\leadsto \frac{x}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + \color{blue}{b \cdot 0.16666666666666666}\right)\right)\right) \cdot y} \]
    12. Simplified82.9%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)} \cdot y} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification54.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6.8 \cdot 10^{+24}:\\ \;\;\;\;\frac{x}{y} - b \cdot \left(\frac{x}{y} - b \cdot \left(x \cdot \left(\frac{0.5}{y} - 0.16666666666666666 \cdot \frac{b}{y}\right)\right)\right)\\ \mathbf{elif}\;b \leq 0.000375:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+79}:\\ \;\;\;\;\frac{x}{y} \cdot e^{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 75.2% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -26500 \lor \neg \left(b \leq 560000000\right):\\ \;\;\;\;\frac{x}{y \cdot e^{b}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= b -26500.0) (not (<= b 560000000.0)))
   (/ x (* y (exp b)))
   (* x (/ (pow a (+ t -1.0)) y))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -26500.0) || !(b <= 560000000.0)) {
		tmp = x / (y * exp(b));
	} else {
		tmp = x * (pow(a, (t + -1.0)) / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((b <= (-26500.0d0)) .or. (.not. (b <= 560000000.0d0))) then
        tmp = x / (y * exp(b))
    else
        tmp = x * ((a ** (t + (-1.0d0))) / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -26500.0) || !(b <= 560000000.0)) {
		tmp = x / (y * Math.exp(b));
	} else {
		tmp = x * (Math.pow(a, (t + -1.0)) / y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (b <= -26500.0) or not (b <= 560000000.0):
		tmp = x / (y * math.exp(b))
	else:
		tmp = x * (math.pow(a, (t + -1.0)) / y)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((b <= -26500.0) || !(b <= 560000000.0))
		tmp = Float64(x / Float64(y * exp(b)));
	else
		tmp = Float64(x * Float64((a ^ Float64(t + -1.0)) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((b <= -26500.0) || ~((b <= 560000000.0)))
		tmp = x / (y * exp(b));
	else
		tmp = x * ((a ^ (t + -1.0)) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -26500.0], N[Not[LessEqual[b, 560000000.0]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Power[a, N[(t + -1.0), $MachinePrecision]], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -26500 \lor \neg \left(b \leq 560000000\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -26500 or 5.6e8 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+85.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define85.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg85.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval85.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified85.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 68.8%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-168.8%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified68.8%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg68.8%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times81.4%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity81.4%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr81.4%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]

    if -26500 < b < 5.6e8

    1. Initial program 95.9%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative95.9%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+92.4%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define92.4%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg92.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval92.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified92.4%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 72.3%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. *-commutative72.3%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot e^{\log a \cdot \left(t - 1\right) - b}} \]
      2. clear-num72.3%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}}} \cdot e^{\log a \cdot \left(t - 1\right) - b} \]
      3. exp-diff68.4%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \color{blue}{\frac{e^{\log a \cdot \left(t - 1\right)}}{e^{b}}} \]
      4. sub-neg68.4%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{e^{\log a \cdot \color{blue}{\left(t + \left(-1\right)\right)}}}{e^{b}} \]
      5. metadata-eval68.4%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{e^{\log a \cdot \left(t + \color{blue}{-1}\right)}}{e^{b}} \]
      6. pow-to-exp69.6%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{\color{blue}{{a}^{\left(t + -1\right)}}}{e^{b}} \]
      7. frac-times69.7%

        \[\leadsto \color{blue}{\frac{1 \cdot {a}^{\left(t + -1\right)}}{\frac{y}{x} \cdot e^{b}}} \]
      8. *-un-lft-identity69.7%

        \[\leadsto \frac{\color{blue}{{a}^{\left(t + -1\right)}}}{\frac{y}{x} \cdot e^{b}} \]
    7. Applied egg-rr69.7%

      \[\leadsto \color{blue}{\frac{{a}^{\left(t + -1\right)}}{\frac{y}{x} \cdot e^{b}}} \]
    8. Taylor expanded in b around 0 74.5%

      \[\leadsto \color{blue}{\frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y}} \]
    9. Step-by-step derivation
      1. associate-/l*75.7%

        \[\leadsto \color{blue}{x \cdot \frac{e^{\log a \cdot \left(t - 1\right)}}{y}} \]
      2. exp-to-pow76.9%

        \[\leadsto x \cdot \frac{\color{blue}{{a}^{\left(t - 1\right)}}}{y} \]
      3. sub-neg76.9%

        \[\leadsto x \cdot \frac{{a}^{\color{blue}{\left(t + \left(-1\right)\right)}}}{y} \]
      4. metadata-eval76.9%

        \[\leadsto x \cdot \frac{{a}^{\left(t + \color{blue}{-1}\right)}}{y} \]
    10. Simplified76.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -26500 \lor \neg \left(b \leq 560000000\right):\\ \;\;\;\;\frac{x}{y \cdot e^{b}}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{{a}^{\left(t + -1\right)}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 75.1% accurate, 2.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.5e18 or 1.7e-8 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+91.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define91.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg91.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval91.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified91.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 78.4%

      \[\leadsto e^{\color{blue}{t \cdot \log a}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. *-commutative78.4%

        \[\leadsto e^{\color{blue}{\log a \cdot t}} \cdot \frac{x}{y} \]
    7. Simplified78.4%

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

        \[\leadsto \color{blue}{\frac{e^{\log a \cdot t} \cdot x}{y}} \]
      2. exp-to-pow85.2%

        \[\leadsto \frac{\color{blue}{{a}^{t}} \cdot x}{y} \]
    9. Applied egg-rr85.2%

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

    if -6.5e18 < t < 1.7e-8

    1. Initial program 95.7%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 70.5%

      \[\leadsto \frac{\color{blue}{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}}{y} \]
    4. Step-by-step derivation
      1. div-exp69.7%

        \[\leadsto \frac{x \cdot \color{blue}{\frac{e^{\log a \cdot \left(t - 1\right)}}{e^{b}}}}{y} \]
      2. exp-to-pow70.9%

        \[\leadsto \frac{x \cdot \frac{\color{blue}{{a}^{\left(t - 1\right)}}}{e^{b}}}{y} \]
      3. sub-neg70.9%

        \[\leadsto \frac{x \cdot \frac{{a}^{\color{blue}{\left(t + \left(-1\right)\right)}}}{e^{b}}}{y} \]
      4. metadata-eval70.9%

        \[\leadsto \frac{x \cdot \frac{{a}^{\left(t + \color{blue}{-1}\right)}}{e^{b}}}{y} \]
    5. Simplified70.9%

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

      \[\leadsto \frac{\color{blue}{\frac{x}{a \cdot e^{b}}}}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+18} \lor \neg \left(t \leq 1.7 \cdot 10^{-8}\right):\\ \;\;\;\;\frac{x \cdot {a}^{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{a \cdot e^{b}}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 72.7% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+15} \lor \neg \left(t \leq 1.7 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x \cdot {a}^{t}}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{e^{b} \cdot \left(y \cdot a\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.2e15 or 1.7e-8 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+91.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define91.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg91.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval91.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified91.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 78.4%

      \[\leadsto e^{\color{blue}{t \cdot \log a}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. *-commutative78.4%

        \[\leadsto e^{\color{blue}{\log a \cdot t}} \cdot \frac{x}{y} \]
    7. Simplified78.4%

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

        \[\leadsto \color{blue}{\frac{e^{\log a \cdot t} \cdot x}{y}} \]
      2. exp-to-pow85.2%

        \[\leadsto \frac{\color{blue}{{a}^{t}} \cdot x}{y} \]
    9. Applied egg-rr85.2%

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

    if -1.2e15 < t < 1.7e-8

    1. Initial program 95.7%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 70.5%

      \[\leadsto \frac{\color{blue}{x \cdot e^{\log a \cdot \left(t - 1\right) - b}}}{y} \]
    4. Step-by-step derivation
      1. div-exp69.7%

        \[\leadsto \frac{x \cdot \color{blue}{\frac{e^{\log a \cdot \left(t - 1\right)}}{e^{b}}}}{y} \]
      2. exp-to-pow70.9%

        \[\leadsto \frac{x \cdot \frac{\color{blue}{{a}^{\left(t - 1\right)}}}{e^{b}}}{y} \]
      3. sub-neg70.9%

        \[\leadsto \frac{x \cdot \frac{{a}^{\color{blue}{\left(t + \left(-1\right)\right)}}}{e^{b}}}{y} \]
      4. metadata-eval70.9%

        \[\leadsto \frac{x \cdot \frac{{a}^{\left(t + \color{blue}{-1}\right)}}{e^{b}}}{y} \]
    5. Simplified70.9%

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

      \[\leadsto \color{blue}{\frac{x}{a \cdot \left(y \cdot e^{b}\right)}} \]
    7. Step-by-step derivation
      1. associate-*r*64.7%

        \[\leadsto \frac{x}{\color{blue}{\left(a \cdot y\right) \cdot e^{b}}} \]
    8. Simplified64.7%

      \[\leadsto \color{blue}{\frac{x}{\left(a \cdot y\right) \cdot e^{b}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification75.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{+15} \lor \neg \left(t \leq 1.7 \cdot 10^{-8}\right):\\ \;\;\;\;\frac{x \cdot {a}^{t}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{e^{b} \cdot \left(y \cdot a\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 66.0% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -17500 \lor \neg \left(b \leq 26500000\right):\\ \;\;\;\;\frac{x}{y \cdot e^{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot {a}^{t}}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= b -17500.0) (not (<= b 26500000.0)))
   (/ x (* y (exp b)))
   (/ (* x (pow a t)) y)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -17500.0) || !(b <= 26500000.0)) {
		tmp = x / (y * exp(b));
	} else {
		tmp = (x * pow(a, t)) / y;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((b <= (-17500.0d0)) .or. (.not. (b <= 26500000.0d0))) then
        tmp = x / (y * exp(b))
    else
        tmp = (x * (a ** t)) / y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -17500.0) || !(b <= 26500000.0)) {
		tmp = x / (y * Math.exp(b));
	} else {
		tmp = (x * Math.pow(a, t)) / y;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (b <= -17500.0) or not (b <= 26500000.0):
		tmp = x / (y * math.exp(b))
	else:
		tmp = (x * math.pow(a, t)) / y
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((b <= -17500.0) || !(b <= 26500000.0))
		tmp = Float64(x / Float64(y * exp(b)));
	else
		tmp = Float64(Float64(x * (a ^ t)) / y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((b <= -17500.0) || ~((b <= 26500000.0)))
		tmp = x / (y * exp(b));
	else
		tmp = (x * (a ^ t)) / y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -17500.0], N[Not[LessEqual[b, 26500000.0]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Power[a, t], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -17500 \lor \neg \left(b \leq 26500000\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -17500 or 2.65e7 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+85.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define85.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg85.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval85.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified85.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 68.8%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-168.8%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified68.8%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg68.8%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times81.4%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity81.4%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr81.4%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]

    if -17500 < b < 2.65e7

    1. Initial program 95.9%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative95.9%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+92.4%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define92.4%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg92.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval92.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified92.4%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 54.6%

      \[\leadsto e^{\color{blue}{t \cdot \log a}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. *-commutative54.6%

        \[\leadsto e^{\color{blue}{\log a \cdot t}} \cdot \frac{x}{y} \]
    7. Simplified54.6%

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

        \[\leadsto \color{blue}{\frac{e^{\log a \cdot t} \cdot x}{y}} \]
      2. exp-to-pow58.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -17500 \lor \neg \left(b \leq 26500000\right):\\ \;\;\;\;\frac{x}{y \cdot e^{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot {a}^{t}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 58.4% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -7600 \lor \neg \left(b \leq 9500000\right):\\ \;\;\;\;\frac{x}{y \cdot e^{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= b -7600.0) (not (<= b 9500000.0)))
   (/ x (* y (exp b)))
   (* (/ x y) (/ 1.0 a))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -7600.0) || !(b <= 9500000.0)) {
		tmp = x / (y * exp(b));
	} else {
		tmp = (x / y) * (1.0 / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if ((b <= (-7600.0d0)) .or. (.not. (b <= 9500000.0d0))) then
        tmp = x / (y * exp(b))
    else
        tmp = (x / y) * (1.0d0 / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((b <= -7600.0) || !(b <= 9500000.0)) {
		tmp = x / (y * Math.exp(b));
	} else {
		tmp = (x / y) * (1.0 / a);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (b <= -7600.0) or not (b <= 9500000.0):
		tmp = x / (y * math.exp(b))
	else:
		tmp = (x / y) * (1.0 / a)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((b <= -7600.0) || !(b <= 9500000.0))
		tmp = Float64(x / Float64(y * exp(b)));
	else
		tmp = Float64(Float64(x / y) * Float64(1.0 / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((b <= -7600.0) || ~((b <= 9500000.0)))
		tmp = x / (y * exp(b));
	else
		tmp = (x / y) * (1.0 / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7600.0], N[Not[LessEqual[b, 9500000.0]], $MachinePrecision]], N[(x / N[(y * N[Exp[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -7600 \lor \neg \left(b \leq 9500000\right):\\
\;\;\;\;\frac{x}{y \cdot e^{b}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7600 or 9.5e6 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+85.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define85.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg85.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval85.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified85.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 68.8%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-168.8%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified68.8%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg68.8%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times81.4%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity81.4%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr81.4%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]

    if -7600 < b < 9.5e6

    1. Initial program 95.9%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative95.9%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+92.4%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define92.4%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg92.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval92.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified92.4%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 72.3%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 72.3%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow73.5%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg73.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7600 \lor \neg \left(b \leq 9500000\right):\\ \;\;\;\;\frac{x}{y \cdot e^{b}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 51.2% accurate, 11.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{y} - b \cdot \left(\frac{x}{y} - b \cdot \left(x \cdot \left(\frac{0.5}{y} - 0.16666666666666666 \cdot \frac{b}{y}\right)\right)\right)\\

\mathbf{elif}\;b \leq 1.25 \cdot 10^{+27}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.60000000000000014e26

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.7%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.7%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 72.6%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-172.6%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified72.6%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg72.6%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times81.3%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity81.3%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr81.3%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 53.2%

      \[\leadsto \color{blue}{b \cdot \left(b \cdot \left(-1 \cdot \left(b \cdot \left(-1 \cdot \left(-1 \cdot \frac{x}{y} + 0.5 \cdot \frac{x}{y}\right) + \left(-0.5 \cdot \frac{x}{y} + 0.16666666666666666 \cdot \frac{x}{y}\right)\right)\right) - \left(-1 \cdot \frac{x}{y} + 0.5 \cdot \frac{x}{y}\right)\right) - \frac{x}{y}\right) + \frac{x}{y}} \]
    11. Taylor expanded in x around -inf 66.6%

      \[\leadsto b \cdot \left(\color{blue}{-1 \cdot \left(b \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - 0.5 \cdot \frac{1}{y}\right)\right)\right)} - \frac{x}{y}\right) + \frac{x}{y} \]
    12. Step-by-step derivation
      1. associate-*r*66.6%

        \[\leadsto b \cdot \left(\color{blue}{\left(-1 \cdot b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - 0.5 \cdot \frac{1}{y}\right)\right)} - \frac{x}{y}\right) + \frac{x}{y} \]
      2. neg-mul-166.6%

        \[\leadsto b \cdot \left(\color{blue}{\left(-b\right)} \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - 0.5 \cdot \frac{1}{y}\right)\right) - \frac{x}{y}\right) + \frac{x}{y} \]
      3. associate-*r/66.6%

        \[\leadsto b \cdot \left(\left(-b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - \color{blue}{\frac{0.5 \cdot 1}{y}}\right)\right) - \frac{x}{y}\right) + \frac{x}{y} \]
      4. metadata-eval66.6%

        \[\leadsto b \cdot \left(\left(-b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - \frac{\color{blue}{0.5}}{y}\right)\right) - \frac{x}{y}\right) + \frac{x}{y} \]
    13. Simplified66.6%

      \[\leadsto b \cdot \left(\color{blue}{\left(-b\right) \cdot \left(x \cdot \left(0.16666666666666666 \cdot \frac{b}{y} - \frac{0.5}{y}\right)\right)} - \frac{x}{y}\right) + \frac{x}{y} \]

    if -1.60000000000000014e26 < b < 1.24999999999999995e27

    1. Initial program 96.1%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+92.2%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define92.2%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg92.2%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval92.2%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified92.2%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.8%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 71.1%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow72.2%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg72.2%

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

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

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

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

    if 1.24999999999999995e27 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+80.3%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define80.3%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg80.3%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval80.3%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified80.3%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 67.5%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-167.5%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified67.5%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg67.5%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times83.9%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity83.9%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr83.9%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 68.8%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + 0.16666666666666666 \cdot b\right)\right)\right)} \cdot y} \]
    11. Step-by-step derivation
      1. *-commutative68.8%

        \[\leadsto \frac{x}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + \color{blue}{b \cdot 0.16666666666666666}\right)\right)\right) \cdot y} \]
    12. Simplified68.8%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)} \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification53.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.6 \cdot 10^{+26}:\\ \;\;\;\;\frac{x}{y} - b \cdot \left(\frac{x}{y} - b \cdot \left(x \cdot \left(\frac{0.5}{y} - 0.16666666666666666 \cdot \frac{b}{y}\right)\right)\right)\\ \mathbf{elif}\;b \leq 1.25 \cdot 10^{+27}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 52.6% accurate, 11.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.1 \cdot 10^{+63}:\\
\;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)\right)}{y}\\

\mathbf{elif}\;b \leq 3.4 \cdot 10^{+27}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.09999999999999993e63

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.6%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.6%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.6%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.6%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.6%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 75.2%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-175.2%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified75.2%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Taylor expanded in b around 0 65.4%

      \[\leadsto \color{blue}{\left(1 + b \cdot \left(b \cdot \left(0.5 + -0.16666666666666666 \cdot b\right) - 1\right)\right)} \cdot \frac{x}{y} \]
    9. Taylor expanded in x around 0 73.7%

      \[\leadsto \color{blue}{\frac{x \cdot \left(1 + b \cdot \left(b \cdot \left(0.5 + -0.16666666666666666 \cdot b\right) - 1\right)\right)}{y}} \]

    if -4.09999999999999993e63 < b < 3.4e27

    1. Initial program 96.4%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative96.4%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+92.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define92.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg92.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval92.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified92.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.7%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 69.7%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow70.8%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg70.8%

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

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

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

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

    if 3.4e27 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+80.3%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define80.3%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg80.3%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval80.3%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified80.3%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 67.5%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-167.5%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified67.5%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg67.5%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times83.9%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity83.9%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr83.9%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 68.8%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + 0.16666666666666666 \cdot b\right)\right)\right)} \cdot y} \]
    11. Step-by-step derivation
      1. *-commutative68.8%

        \[\leadsto \frac{x}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + \color{blue}{b \cdot 0.16666666666666666}\right)\right)\right) \cdot y} \]
    12. Simplified68.8%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)} \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification52.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.1 \cdot 10^{+63}:\\ \;\;\;\;\frac{x \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(0.5 + b \cdot -0.16666666666666666\right)\right)\right)}{y}\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{+27}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 51.4% accurate, 11.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{+30}:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(b \cdot -0.16666666666666666\right)\right)\right)\\

\mathbf{elif}\;b \leq 1.16 \cdot 10^{+27}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.0000000000000001e30

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.7%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.7%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 72.6%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-172.6%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified72.6%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Taylor expanded in b around 0 58.1%

      \[\leadsto \color{blue}{\left(1 + b \cdot \left(b \cdot \left(0.5 + -0.16666666666666666 \cdot b\right) - 1\right)\right)} \cdot \frac{x}{y} \]
    9. Taylor expanded in b around inf 58.1%

      \[\leadsto \left(1 + b \cdot \left(b \cdot \color{blue}{\left(-0.16666666666666666 \cdot b\right)} - 1\right)\right) \cdot \frac{x}{y} \]
    10. Step-by-step derivation
      1. *-commutative58.1%

        \[\leadsto \left(1 + b \cdot \left(b \cdot \color{blue}{\left(b \cdot -0.16666666666666666\right)} - 1\right)\right) \cdot \frac{x}{y} \]
    11. Simplified58.1%

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

    if -4.0000000000000001e30 < b < 1.16e27

    1. Initial program 96.1%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+92.2%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define92.2%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg92.2%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval92.2%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified92.2%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.8%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 71.1%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow72.2%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg72.2%

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

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

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

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

    if 1.16e27 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+80.3%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define80.3%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg80.3%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval80.3%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified80.3%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 67.5%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-167.5%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified67.5%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg67.5%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times83.9%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity83.9%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr83.9%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 68.8%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + 0.16666666666666666 \cdot b\right)\right)\right)} \cdot y} \]
    11. Step-by-step derivation
      1. *-commutative68.8%

        \[\leadsto \frac{x}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + \color{blue}{b \cdot 0.16666666666666666}\right)\right)\right) \cdot y} \]
    12. Simplified68.8%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)} \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4 \cdot 10^{+30}:\\ \;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(b \cdot -0.16666666666666666\right)\right)\right)\\ \mathbf{elif}\;b \leq 1.16 \cdot 10^{+27}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot \left(0.5 + b \cdot 0.16666666666666666\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 49.5% accurate, 13.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(b \cdot -0.16666666666666666\right)\right)\right)\\

\mathbf{elif}\;b \leq 2.9 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.55000000000000005e24

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.7%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.7%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 72.6%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-172.6%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified72.6%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Taylor expanded in b around 0 58.1%

      \[\leadsto \color{blue}{\left(1 + b \cdot \left(b \cdot \left(0.5 + -0.16666666666666666 \cdot b\right) - 1\right)\right)} \cdot \frac{x}{y} \]
    9. Taylor expanded in b around inf 58.1%

      \[\leadsto \left(1 + b \cdot \left(b \cdot \color{blue}{\left(-0.16666666666666666 \cdot b\right)} - 1\right)\right) \cdot \frac{x}{y} \]
    10. Step-by-step derivation
      1. *-commutative58.1%

        \[\leadsto \left(1 + b \cdot \left(b \cdot \color{blue}{\left(b \cdot -0.16666666666666666\right)} - 1\right)\right) \cdot \frac{x}{y} \]
    11. Simplified58.1%

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

    if -1.55000000000000005e24 < b < 2.9000000000000002e44

    1. Initial program 96.3%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative96.3%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+91.8%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define91.8%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg91.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval91.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified91.8%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.6%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 70.9%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow72.0%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg72.0%

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

        \[\leadsto {a}^{\left(t + \color{blue}{-1}\right)} \cdot \frac{x}{y} \]
    8. Simplified72.0%

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

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

    if 2.9000000000000002e44 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+80.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define80.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg80.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval80.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified80.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 67.5%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-167.5%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified67.5%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg67.5%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times83.9%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity83.9%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr83.9%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 59.9%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + 0.5 \cdot b\right)\right)} \cdot y} \]
    11. Step-by-step derivation
      1. *-commutative59.9%

        \[\leadsto \frac{x}{\left(1 + b \cdot \left(1 + \color{blue}{b \cdot 0.5}\right)\right) \cdot y} \]
    12. Simplified59.9%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)} \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.55 \cdot 10^{+24}:\\ \;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(-1 + b \cdot \left(b \cdot -0.16666666666666666\right)\right)\right)\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{+44}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 48.0% accurate, 13.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.3 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)\\

\mathbf{elif}\;b \leq 2.6 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3.3e21

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.7%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.7%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 72.6%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-172.6%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified72.6%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Taylor expanded in b around 0 50.2%

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

    if -3.3e21 < b < 2.5999999999999999e44

    1. Initial program 96.3%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative96.3%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+91.8%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define91.8%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg91.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval91.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified91.8%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.6%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 70.9%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow72.0%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg72.0%

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

        \[\leadsto {a}^{\left(t + \color{blue}{-1}\right)} \cdot \frac{x}{y} \]
    8. Simplified72.0%

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

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

    if 2.5999999999999999e44 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+80.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define80.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg80.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval80.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified80.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 67.5%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-167.5%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified67.5%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg67.5%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times83.9%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity83.9%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr83.9%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 59.9%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + 0.5 \cdot b\right)\right)} \cdot y} \]
    11. Step-by-step derivation
      1. *-commutative59.9%

        \[\leadsto \frac{x}{\left(1 + b \cdot \left(1 + \color{blue}{b \cdot 0.5}\right)\right) \cdot y} \]
    12. Simplified59.9%

      \[\leadsto \frac{x}{\color{blue}{\left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)} \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.3 \cdot 10^{+21}:\\ \;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)\\ \mathbf{elif}\;b \leq 2.6 \cdot 10^{+44}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \left(1 + b \cdot \left(1 + b \cdot 0.5\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 41.3% accurate, 17.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.8 \cdot 10^{+25}:\\
\;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)\\

\mathbf{elif}\;b \leq 3.1 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.79999999999999992e25

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.7%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.7%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 72.6%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-172.6%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified72.6%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Taylor expanded in b around 0 50.2%

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

    if -4.79999999999999992e25 < b < 3.09999999999999996e44

    1. Initial program 96.3%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative96.3%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+91.8%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define91.8%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg91.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval91.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified91.8%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.6%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 70.9%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow72.0%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg72.0%

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

        \[\leadsto {a}^{\left(t + \color{blue}{-1}\right)} \cdot \frac{x}{y} \]
    8. Simplified72.0%

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

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

    if 3.09999999999999996e44 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+80.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define80.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg80.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval80.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified80.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 67.5%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-167.5%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified67.5%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg67.5%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times83.9%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity83.9%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr83.9%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 30.2%

      \[\leadsto \frac{x}{\color{blue}{y + b \cdot y}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification40.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.8 \cdot 10^{+25}:\\ \;\;\;\;\frac{x}{y} \cdot \left(1 + b \cdot \left(-1 + b \cdot 0.5\right)\right)\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{+44}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y + y \cdot b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 36.8% accurate, 18.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -7.2 \cdot 10^{+29}:\\ \;\;\;\;x \cdot \frac{b}{-y}\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{+44}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y + y \cdot b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -7.2e+29)
   (* x (/ b (- y)))
   (if (<= b 2.9e+44) (* (/ x y) (/ 1.0 a)) (/ x (+ y (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -7.2e+29) {
		tmp = x * (b / -y);
	} else if (b <= 2.9e+44) {
		tmp = (x / y) * (1.0 / a);
	} else {
		tmp = x / (y + (y * b));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (b <= (-7.2d+29)) then
        tmp = x * (b / -y)
    else if (b <= 2.9d+44) then
        tmp = (x / y) * (1.0d0 / a)
    else
        tmp = x / (y + (y * b))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -7.2e+29) {
		tmp = x * (b / -y);
	} else if (b <= 2.9e+44) {
		tmp = (x / y) * (1.0 / a);
	} else {
		tmp = x / (y + (y * b));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -7.2e+29:
		tmp = x * (b / -y)
	elif b <= 2.9e+44:
		tmp = (x / y) * (1.0 / a)
	else:
		tmp = x / (y + (y * b))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -7.2e+29)
		tmp = Float64(x * Float64(b / Float64(-y)));
	elseif (b <= 2.9e+44)
		tmp = Float64(Float64(x / y) * Float64(1.0 / a));
	else
		tmp = Float64(x / Float64(y + Float64(y * b)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -7.2e+29)
		tmp = x * (b / -y);
	elseif (b <= 2.9e+44)
		tmp = (x / y) * (1.0 / a);
	else
		tmp = x / (y + (y * b));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.2e+29], N[(x * N[(b / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.9e+44], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision], N[(x / N[(y + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{+29}:\\
\;\;\;\;x \cdot \frac{b}{-y}\\

\mathbf{elif}\;b \leq 2.9 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -7.19999999999999952e29

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.7%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.7%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 72.6%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-172.6%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified72.6%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Taylor expanded in b around 0 36.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{b \cdot x}{y} + \frac{x}{y}} \]
    9. Step-by-step derivation
      1. +-commutative36.2%

        \[\leadsto \color{blue}{\frac{x}{y} + -1 \cdot \frac{b \cdot x}{y}} \]
      2. mul-1-neg36.2%

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

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

        \[\leadsto \frac{x}{y} - \color{blue}{b \cdot \frac{x}{y}} \]
    10. Simplified32.1%

      \[\leadsto \color{blue}{\frac{x}{y} - b \cdot \frac{x}{y}} \]
    11. Taylor expanded in b around inf 36.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{b \cdot x}{y}} \]
    12. Step-by-step derivation
      1. associate-*r/36.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(b \cdot x\right)}{y}} \]
      2. associate-*r*36.2%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot b\right) \cdot x}}{y} \]
      3. associate-*r/32.1%

        \[\leadsto \color{blue}{\left(-1 \cdot b\right) \cdot \frac{x}{y}} \]
      4. *-commutative32.1%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(-1 \cdot b\right)} \]
      5. associate-*l/36.2%

        \[\leadsto \color{blue}{\frac{x \cdot \left(-1 \cdot b\right)}{y}} \]
      6. associate-*r/44.3%

        \[\leadsto \color{blue}{x \cdot \frac{-1 \cdot b}{y}} \]
      7. associate-*r/44.3%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{b}{y}\right)} \]
      8. mul-1-neg44.3%

        \[\leadsto x \cdot \color{blue}{\left(-\frac{b}{y}\right)} \]
      9. distribute-neg-frac244.3%

        \[\leadsto x \cdot \color{blue}{\frac{b}{-y}} \]
    13. Simplified44.3%

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

    if -7.19999999999999952e29 < b < 2.9000000000000002e44

    1. Initial program 96.3%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative96.3%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+91.8%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define91.8%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg91.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval91.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified91.8%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.6%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 70.9%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow72.0%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg72.0%

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

        \[\leadsto {a}^{\left(t + \color{blue}{-1}\right)} \cdot \frac{x}{y} \]
    8. Simplified72.0%

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

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

    if 2.9000000000000002e44 < b

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+80.0%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define80.0%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg80.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval80.0%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified80.0%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 67.5%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-167.5%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified67.5%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Step-by-step derivation
      1. exp-neg67.5%

        \[\leadsto \color{blue}{\frac{1}{e^{b}}} \cdot \frac{x}{y} \]
      2. frac-times83.9%

        \[\leadsto \color{blue}{\frac{1 \cdot x}{e^{b} \cdot y}} \]
      3. *-un-lft-identity83.9%

        \[\leadsto \frac{\color{blue}{x}}{e^{b} \cdot y} \]
    9. Applied egg-rr83.9%

      \[\leadsto \color{blue}{\frac{x}{e^{b} \cdot y}} \]
    10. Taylor expanded in b around 0 30.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -7.2 \cdot 10^{+29}:\\ \;\;\;\;x \cdot \frac{b}{-y}\\ \mathbf{elif}\;b \leq 2.9 \cdot 10^{+44}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y + y \cdot b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 33.8% accurate, 26.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{+27}:\\ \;\;\;\;x \cdot \frac{b}{-y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= b -4.6e+27) (* x (/ b (- y))) (* (/ x y) (/ 1.0 a))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -4.6e+27) {
		tmp = x * (b / -y);
	} else {
		tmp = (x / y) * (1.0 / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (b <= (-4.6d+27)) then
        tmp = x * (b / -y)
    else
        tmp = (x / y) * (1.0d0 / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (b <= -4.6e+27) {
		tmp = x * (b / -y);
	} else {
		tmp = (x / y) * (1.0 / a);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if b <= -4.6e+27:
		tmp = x * (b / -y)
	else:
		tmp = (x / y) * (1.0 / a)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (b <= -4.6e+27)
		tmp = Float64(x * Float64(b / Float64(-y)));
	else
		tmp = Float64(Float64(x / y) * Float64(1.0 / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (b <= -4.6e+27)
		tmp = x * (b / -y);
	else
		tmp = (x / y) * (1.0 / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.6e+27], N[(x * N[(b / (-y)), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.6 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \frac{b}{-y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.6000000000000001e27

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+89.7%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define89.7%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval89.7%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified89.7%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 72.6%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-172.6%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified72.6%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Taylor expanded in b around 0 36.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{b \cdot x}{y} + \frac{x}{y}} \]
    9. Step-by-step derivation
      1. +-commutative36.2%

        \[\leadsto \color{blue}{\frac{x}{y} + -1 \cdot \frac{b \cdot x}{y}} \]
      2. mul-1-neg36.2%

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

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

        \[\leadsto \frac{x}{y} - \color{blue}{b \cdot \frac{x}{y}} \]
    10. Simplified32.1%

      \[\leadsto \color{blue}{\frac{x}{y} - b \cdot \frac{x}{y}} \]
    11. Taylor expanded in b around inf 36.2%

      \[\leadsto \color{blue}{-1 \cdot \frac{b \cdot x}{y}} \]
    12. Step-by-step derivation
      1. associate-*r/36.2%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(b \cdot x\right)}{y}} \]
      2. associate-*r*36.2%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot b\right) \cdot x}}{y} \]
      3. associate-*r/32.1%

        \[\leadsto \color{blue}{\left(-1 \cdot b\right) \cdot \frac{x}{y}} \]
      4. *-commutative32.1%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(-1 \cdot b\right)} \]
      5. associate-*l/36.2%

        \[\leadsto \color{blue}{\frac{x \cdot \left(-1 \cdot b\right)}{y}} \]
      6. associate-*r/44.3%

        \[\leadsto \color{blue}{x \cdot \frac{-1 \cdot b}{y}} \]
      7. associate-*r/44.3%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{b}{y}\right)} \]
      8. mul-1-neg44.3%

        \[\leadsto x \cdot \color{blue}{\left(-\frac{b}{y}\right)} \]
      9. distribute-neg-frac244.3%

        \[\leadsto x \cdot \color{blue}{\frac{b}{-y}} \]
    13. Simplified44.3%

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

    if -4.6000000000000001e27 < b

    1. Initial program 97.3%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative97.3%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+88.5%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define88.5%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg88.5%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval88.5%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified88.5%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 71.9%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 61.2%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow62.0%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg62.0%

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

        \[\leadsto {a}^{\left(t + \color{blue}{-1}\right)} \cdot \frac{x}{y} \]
    8. Simplified62.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.6 \cdot 10^{+27}:\\ \;\;\;\;x \cdot \frac{b}{-y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y} \cdot \frac{1}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 32.2% accurate, 26.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 7 \cdot 10^{-12}:\\ \;\;\;\;x \cdot \frac{\frac{1}{a}}{y}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{b}{-y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t 7e-12) (* x (/ (/ 1.0 a) y)) (* x (/ b (- y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= 7e-12) {
		tmp = x * ((1.0 / a) / y);
	} else {
		tmp = x * (b / -y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (t <= 7d-12) then
        tmp = x * ((1.0d0 / a) / y)
    else
        tmp = x * (b / -y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= 7e-12) {
		tmp = x * ((1.0 / a) / y);
	} else {
		tmp = x * (b / -y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= 7e-12:
		tmp = x * ((1.0 / a) / y)
	else:
		tmp = x * (b / -y)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= 7e-12)
		tmp = Float64(x * Float64(Float64(1.0 / a) / y));
	else
		tmp = Float64(x * Float64(b / Float64(-y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= 7e-12)
		tmp = x * ((1.0 / a) / y);
	else
		tmp = x * (b / -y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 7e-12], N[(x * N[(N[(1.0 / a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x * N[(b / (-y)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 7 \cdot 10^{-12}:\\
\;\;\;\;x \cdot \frac{\frac{1}{a}}{y}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{b}{-y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7.0000000000000001e-12

    1. Initial program 97.1%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative97.1%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+86.8%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define86.8%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg86.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval86.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified86.8%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 67.5%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. *-commutative67.5%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot e^{\log a \cdot \left(t - 1\right) - b}} \]
      2. clear-num67.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{y}{x}}} \cdot e^{\log a \cdot \left(t - 1\right) - b} \]
      3. exp-diff63.5%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \color{blue}{\frac{e^{\log a \cdot \left(t - 1\right)}}{e^{b}}} \]
      4. sub-neg63.5%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{e^{\log a \cdot \color{blue}{\left(t + \left(-1\right)\right)}}}{e^{b}} \]
      5. metadata-eval63.5%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{e^{\log a \cdot \left(t + \color{blue}{-1}\right)}}{e^{b}} \]
      6. pow-to-exp64.4%

        \[\leadsto \frac{1}{\frac{y}{x}} \cdot \frac{\color{blue}{{a}^{\left(t + -1\right)}}}{e^{b}} \]
      7. frac-times64.4%

        \[\leadsto \color{blue}{\frac{1 \cdot {a}^{\left(t + -1\right)}}{\frac{y}{x} \cdot e^{b}}} \]
      8. *-un-lft-identity64.4%

        \[\leadsto \frac{\color{blue}{{a}^{\left(t + -1\right)}}}{\frac{y}{x} \cdot e^{b}} \]
    7. Applied egg-rr64.4%

      \[\leadsto \color{blue}{\frac{{a}^{\left(t + -1\right)}}{\frac{y}{x} \cdot e^{b}}} \]
    8. Taylor expanded in b around 0 52.3%

      \[\leadsto \color{blue}{\frac{x \cdot e^{\log a \cdot \left(t - 1\right)}}{y}} \]
    9. Step-by-step derivation
      1. associate-/l*53.2%

        \[\leadsto \color{blue}{x \cdot \frac{e^{\log a \cdot \left(t - 1\right)}}{y}} \]
      2. exp-to-pow54.1%

        \[\leadsto x \cdot \frac{\color{blue}{{a}^{\left(t - 1\right)}}}{y} \]
      3. sub-neg54.1%

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

        \[\leadsto x \cdot \frac{{a}^{\left(t + \color{blue}{-1}\right)}}{y} \]
    10. Simplified54.1%

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

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

    if 7.0000000000000001e-12 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+93.4%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define93.4%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg93.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval93.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified93.4%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 46.0%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-146.0%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified46.0%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Taylor expanded in b around 0 22.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{b \cdot x}{y} + \frac{x}{y}} \]
    9. Step-by-step derivation
      1. +-commutative22.1%

        \[\leadsto \color{blue}{\frac{x}{y} + -1 \cdot \frac{b \cdot x}{y}} \]
      2. mul-1-neg22.1%

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

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

        \[\leadsto \frac{x}{y} - \color{blue}{b \cdot \frac{x}{y}} \]
    10. Simplified20.7%

      \[\leadsto \color{blue}{\frac{x}{y} - b \cdot \frac{x}{y}} \]
    11. Taylor expanded in b around inf 23.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{b \cdot x}{y}} \]
    12. Step-by-step derivation
      1. associate-*r/23.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(b \cdot x\right)}{y}} \]
      2. associate-*r*23.5%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot b\right) \cdot x}}{y} \]
      3. associate-*r/23.3%

        \[\leadsto \color{blue}{\left(-1 \cdot b\right) \cdot \frac{x}{y}} \]
      4. *-commutative23.3%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(-1 \cdot b\right)} \]
      5. associate-*l/23.5%

        \[\leadsto \color{blue}{\frac{x \cdot \left(-1 \cdot b\right)}{y}} \]
      6. associate-*r/27.1%

        \[\leadsto \color{blue}{x \cdot \frac{-1 \cdot b}{y}} \]
      7. associate-*r/27.1%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{b}{y}\right)} \]
      8. mul-1-neg27.1%

        \[\leadsto x \cdot \color{blue}{\left(-\frac{b}{y}\right)} \]
      9. distribute-neg-frac227.1%

        \[\leadsto x \cdot \color{blue}{\frac{b}{-y}} \]
    13. Simplified27.1%

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

Alternative 22: 32.3% accurate, 28.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.06 \cdot 10^{-11}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{b}{-y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t 1.06e-11) (/ x (* y a)) (* x (/ b (- y)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= 1.06e-11) {
		tmp = x / (y * a);
	} else {
		tmp = x * (b / -y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (t <= 1.06d-11) then
        tmp = x / (y * a)
    else
        tmp = x * (b / -y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= 1.06e-11) {
		tmp = x / (y * a);
	} else {
		tmp = x * (b / -y);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= 1.06e-11:
		tmp = x / (y * a)
	else:
		tmp = x * (b / -y)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= 1.06e-11)
		tmp = Float64(x / Float64(y * a));
	else
		tmp = Float64(x * Float64(b / Float64(-y)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= 1.06e-11)
		tmp = x / (y * a);
	else
		tmp = x * (b / -y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 1.06e-11], N[(x / N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x * N[(b / (-y)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.06 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{y \cdot a}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \frac{b}{-y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.05999999999999993e-11

    1. Initial program 97.1%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative97.1%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+86.8%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define86.8%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg86.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval86.8%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified86.8%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 67.5%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 47.3%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow48.1%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg48.1%

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

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

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

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

    if 1.05999999999999993e-11 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+93.4%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define93.4%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg93.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval93.4%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified93.4%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 46.0%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-146.0%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified46.0%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Taylor expanded in b around 0 22.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{b \cdot x}{y} + \frac{x}{y}} \]
    9. Step-by-step derivation
      1. +-commutative22.1%

        \[\leadsto \color{blue}{\frac{x}{y} + -1 \cdot \frac{b \cdot x}{y}} \]
      2. mul-1-neg22.1%

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

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

        \[\leadsto \frac{x}{y} - \color{blue}{b \cdot \frac{x}{y}} \]
    10. Simplified20.7%

      \[\leadsto \color{blue}{\frac{x}{y} - b \cdot \frac{x}{y}} \]
    11. Taylor expanded in b around inf 23.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{b \cdot x}{y}} \]
    12. Step-by-step derivation
      1. associate-*r/23.5%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(b \cdot x\right)}{y}} \]
      2. associate-*r*23.5%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot b\right) \cdot x}}{y} \]
      3. associate-*r/23.3%

        \[\leadsto \color{blue}{\left(-1 \cdot b\right) \cdot \frac{x}{y}} \]
      4. *-commutative23.3%

        \[\leadsto \color{blue}{\frac{x}{y} \cdot \left(-1 \cdot b\right)} \]
      5. associate-*l/23.5%

        \[\leadsto \color{blue}{\frac{x \cdot \left(-1 \cdot b\right)}{y}} \]
      6. associate-*r/27.1%

        \[\leadsto \color{blue}{x \cdot \frac{-1 \cdot b}{y}} \]
      7. associate-*r/27.1%

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{b}{y}\right)} \]
      8. mul-1-neg27.1%

        \[\leadsto x \cdot \color{blue}{\left(-\frac{b}{y}\right)} \]
      9. distribute-neg-frac227.1%

        \[\leadsto x \cdot \color{blue}{\frac{b}{-y}} \]
    13. Simplified27.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.06 \cdot 10^{-11}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{b}{-y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 31.0% accurate, 31.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{y \cdot a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.2e-10

    1. Initial program 97.1%

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
    2. Step-by-step derivation
      1. *-commutative97.1%

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+86.9%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define86.9%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg86.9%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval86.9%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified86.9%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 67.6%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right) - b}} \cdot \frac{x}{y} \]
    6. Taylor expanded in b around 0 47.0%

      \[\leadsto \color{blue}{e^{\log a \cdot \left(t - 1\right)}} \cdot \frac{x}{y} \]
    7. Step-by-step derivation
      1. exp-to-pow47.9%

        \[\leadsto \color{blue}{{a}^{\left(t - 1\right)}} \cdot \frac{x}{y} \]
      2. sub-neg47.9%

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

        \[\leadsto {a}^{\left(t + \color{blue}{-1}\right)} \cdot \frac{x}{y} \]
    8. Simplified47.9%

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

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

    if 4.2e-10 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
      3. associate--l+93.3%

        \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      4. fma-define93.3%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
      5. sub-neg93.3%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
      6. metadata-eval93.3%

        \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    3. Simplified93.3%

      \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
    4. Add Preprocessing
    5. Taylor expanded in b around inf 45.3%

      \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
    6. Step-by-step derivation
      1. neg-mul-145.3%

        \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    7. Simplified45.3%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
    8. Taylor expanded in b around 0 23.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.2 \cdot 10^{-10}:\\ \;\;\;\;\frac{x}{y \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 16.2% accurate, 105.0× speedup?

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

\\
\frac{x}{y}
\end{array}
Derivation
  1. Initial program 97.9%

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y} \]
  2. Step-by-step derivation
    1. *-commutative97.9%

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

      \[\leadsto \color{blue}{e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b} \cdot \frac{x}{y}} \]
    3. associate--l+88.8%

      \[\leadsto e^{\color{blue}{y \cdot \log z + \left(\left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
    4. fma-define88.8%

      \[\leadsto e^{\color{blue}{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a - b\right)}} \cdot \frac{x}{y} \]
    5. sub-neg88.8%

      \[\leadsto e^{\mathsf{fma}\left(y, \log z, \color{blue}{\left(t + \left(-1\right)\right)} \cdot \log a - b\right)} \cdot \frac{x}{y} \]
    6. metadata-eval88.8%

      \[\leadsto e^{\mathsf{fma}\left(y, \log z, \left(t + \color{blue}{-1}\right) \cdot \log a - b\right)} \cdot \frac{x}{y} \]
  3. Simplified88.8%

    \[\leadsto \color{blue}{e^{\mathsf{fma}\left(y, \log z, \left(t + -1\right) \cdot \log a - b\right)} \cdot \frac{x}{y}} \]
  4. Add Preprocessing
  5. Taylor expanded in b around inf 43.2%

    \[\leadsto e^{\color{blue}{-1 \cdot b}} \cdot \frac{x}{y} \]
  6. Step-by-step derivation
    1. neg-mul-143.2%

      \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
  7. Simplified43.2%

    \[\leadsto e^{\color{blue}{-b}} \cdot \frac{x}{y} \]
  8. Taylor expanded in b around 0 15.0%

    \[\leadsto \color{blue}{\frac{x}{y}} \]
  9. Add Preprocessing

Developer Target 1: 72.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := {a}^{\left(t - 1\right)}\\ t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{if}\;t < -0.8845848504127471:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < 852031.2288374073:\\ \;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (pow a (- t 1.0)))
        (t_2 (/ (* x (/ t_1 y)) (- (+ b 1.0) (* y (log z))))))
   (if (< t -0.8845848504127471)
     t_2
     (if (< t 852031.2288374073)
       (/ (* (/ x y) t_1) (exp (- b (* (log z) y))))
       t_2))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = pow(a, (t - 1.0));
	double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
	double tmp;
	if (t < -0.8845848504127471) {
		tmp = t_2;
	} else if (t < 852031.2288374073) {
		tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = a ** (t - 1.0d0)
    t_2 = (x * (t_1 / y)) / ((b + 1.0d0) - (y * log(z)))
    if (t < (-0.8845848504127471d0)) then
        tmp = t_2
    else if (t < 852031.2288374073d0) then
        tmp = ((x / y) * t_1) / exp((b - (log(z) * y)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = Math.pow(a, (t - 1.0));
	double t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * Math.log(z)));
	double tmp;
	if (t < -0.8845848504127471) {
		tmp = t_2;
	} else if (t < 852031.2288374073) {
		tmp = ((x / y) * t_1) / Math.exp((b - (Math.log(z) * y)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = math.pow(a, (t - 1.0))
	t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * math.log(z)))
	tmp = 0
	if t < -0.8845848504127471:
		tmp = t_2
	elif t < 852031.2288374073:
		tmp = ((x / y) * t_1) / math.exp((b - (math.log(z) * y)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = a ^ Float64(t - 1.0)
	t_2 = Float64(Float64(x * Float64(t_1 / y)) / Float64(Float64(b + 1.0) - Float64(y * log(z))))
	tmp = 0.0
	if (t < -0.8845848504127471)
		tmp = t_2;
	elseif (t < 852031.2288374073)
		tmp = Float64(Float64(Float64(x / y) * t_1) / exp(Float64(b - Float64(log(z) * y))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = a ^ (t - 1.0);
	t_2 = (x * (t_1 / y)) / ((b + 1.0) - (y * log(z)));
	tmp = 0.0;
	if (t < -0.8845848504127471)
		tmp = t_2;
	elseif (t < 852031.2288374073)
		tmp = ((x / y) * t_1) / exp((b - (log(z) * y)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[Power[a, N[(t - 1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] / N[(N[(b + 1.0), $MachinePrecision] - N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -0.8845848504127471], t$95$2, If[Less[t, 852031.2288374073], N[(N[(N[(x / y), $MachinePrecision] * t$95$1), $MachinePrecision] / N[Exp[N[(b - N[(N[Log[z], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := {a}^{\left(t - 1\right)}\\
t_2 := \frac{x \cdot \frac{t\_1}{y}}{\left(b + 1\right) - y \cdot \log z}\\
\mathbf{if}\;t < -0.8845848504127471:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < 852031.2288374073:\\
\;\;\;\;\frac{\frac{x}{y} \cdot t\_1}{e^{b - \log z \cdot y}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024170 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -8845848504127471/10000000000000000) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 8520312288374073/10000000000) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))))))

  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))