Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B

Percentage Accurate: 96.5% → 99.3%
Time: 16.7s
Alternatives: 19
Speedup: 1.5×

Specification

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

\\
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
\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 19 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: 96.5% accurate, 1.0× speedup?

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

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

Alternative 1: 99.3% accurate, 1.5× speedup?

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

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

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

    \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right) + \left(-1 \cdot \left(a \cdot z\right) + y \cdot \left(\log z - t\right)\right)\right)}\right)\right) \]
  4. Step-by-step derivation
    1. associate-+r+N/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\left(-1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)\right) + y \cdot \left(\log z - t\right)\right)\right)\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(y \cdot \left(\log z - t\right) + \left(-1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)\right)\right)\right)\right) \]
    3. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\left(y \cdot \left(\log z - t\right)\right), \left(-1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)\right)\right)\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \left(\log z - t\right)\right), \left(-1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)\right)\right)\right)\right) \]
    5. --lowering--.f64N/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\log z, t\right)\right), \left(-1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)\right)\right)\right)\right) \]
    6. log-lowering-log.f64N/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right), \left(-1 \cdot \left(a \cdot b\right) + -1 \cdot \left(a \cdot z\right)\right)\right)\right)\right) \]
    7. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right), \left(\left(-1 \cdot a\right) \cdot b + -1 \cdot \left(a \cdot z\right)\right)\right)\right)\right) \]
    8. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right), \left(\left(-1 \cdot a\right) \cdot b + \left(-1 \cdot a\right) \cdot z\right)\right)\right)\right) \]
    9. distribute-lft-outN/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right), \left(\left(-1 \cdot a\right) \cdot \left(b + z\right)\right)\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right), \mathsf{*.f64}\left(\left(-1 \cdot a\right), \left(b + z\right)\right)\right)\right)\right) \]
    11. mul-1-negN/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right), \mathsf{*.f64}\left(\left(\mathsf{neg}\left(a\right)\right), \left(b + z\right)\right)\right)\right)\right) \]
    12. neg-sub0N/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right), \mathsf{*.f64}\left(\left(0 - a\right), \left(b + z\right)\right)\right)\right)\right) \]
    13. --lowering--.f64N/A

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, a\right), \left(b + z\right)\right)\right)\right)\right) \]
    14. +-lowering-+.f6499.6%

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, a\right), \mathsf{+.f64}\left(b, z\right)\right)\right)\right)\right) \]
  5. Simplified99.6%

    \[\leadsto x \cdot e^{\color{blue}{y \cdot \left(\log z - t\right) + \left(0 - a\right) \cdot \left(b + z\right)}} \]
  6. Final simplification99.6%

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

Alternative 2: 84.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{if}\;y \leq -9.5 \cdot 10^{-19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{-64}:\\ \;\;\;\;x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (exp (* y (- (log z) t))))))
   (if (<= y -9.5e-19)
     t_1
     (if (<= y 1.15e-64) (* x (exp (* a (- (log (- 1.0 z)) b)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * exp((y * (log(z) - t)));
	double tmp;
	if (y <= -9.5e-19) {
		tmp = t_1;
	} else if (y <= 1.15e-64) {
		tmp = x * exp((a * (log((1.0 - z)) - b)));
	} 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 * exp((y * (log(z) - t)))
    if (y <= (-9.5d-19)) then
        tmp = t_1
    else if (y <= 1.15d-64) then
        tmp = x * exp((a * (log((1.0d0 - z)) - b)))
    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.exp((y * (Math.log(z) - t)));
	double tmp;
	if (y <= -9.5e-19) {
		tmp = t_1;
	} else if (y <= 1.15e-64) {
		tmp = x * Math.exp((a * (Math.log((1.0 - z)) - b)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.exp((y * (math.log(z) - t)))
	tmp = 0
	if y <= -9.5e-19:
		tmp = t_1
	elif y <= 1.15e-64:
		tmp = x * math.exp((a * (math.log((1.0 - z)) - b)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * exp(Float64(y * Float64(log(z) - t))))
	tmp = 0.0
	if (y <= -9.5e-19)
		tmp = t_1;
	elseif (y <= 1.15e-64)
		tmp = Float64(x * exp(Float64(a * Float64(log(Float64(1.0 - z)) - b))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * exp((y * (log(z) - t)));
	tmp = 0.0;
	if (y <= -9.5e-19)
		tmp = t_1;
	elseif (y <= 1.15e-64)
		tmp = x * exp((a * (log((1.0 - z)) - b)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.5e-19], t$95$1, If[LessEqual[y, 1.15e-64], N[(x * N[Exp[N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{-64}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.4999999999999995e-19 or 1.1500000000000001e-64 < y

    1. Initial program 98.6%

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

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(e^{y \cdot \left(\log z - t\right)}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(y \cdot \left(\log z - t\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \left(\log z - t\right)\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\log z, t\right)\right)\right)\right) \]
      5. log-lowering-log.f6488.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right)\right)\right) \]
    5. Simplified88.0%

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]

    if -9.4999999999999995e-19 < y < 1.1500000000000001e-64

    1. Initial program 96.6%

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

      \[\leadsto \color{blue}{x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right)}} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(e^{a \cdot \left(\log \left(1 - z\right) - b\right)}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(a \cdot \left(\log \left(1 - z\right) - b\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, \left(\log \left(1 - z\right) - b\right)\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\log \left(1 - z\right), b\right)\right)\right)\right) \]
      5. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(\left(1 - z\right)\right), b\right)\right)\right)\right) \]
      6. --lowering--.f6486.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(\mathsf{\_.f64}\left(1, z\right)\right), b\right)\right)\right)\right) \]
    5. Simplified86.5%

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

Alternative 3: 84.0% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\ \mathbf{if}\;y \leq -2.3 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.35 \cdot 10^{-59}:\\ \;\;\;\;x \cdot e^{0 - a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (exp (* y (- (log z) t))))))
   (if (<= y -2.3e-18)
     t_1
     (if (<= y 3.35e-59) (* x (exp (- 0.0 (* a b)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * exp((y * (log(z) - t)));
	double tmp;
	if (y <= -2.3e-18) {
		tmp = t_1;
	} else if (y <= 3.35e-59) {
		tmp = x * exp((0.0 - (a * b)));
	} 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 * exp((y * (log(z) - t)))
    if (y <= (-2.3d-18)) then
        tmp = t_1
    else if (y <= 3.35d-59) then
        tmp = x * exp((0.0d0 - (a * b)))
    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.exp((y * (Math.log(z) - t)));
	double tmp;
	if (y <= -2.3e-18) {
		tmp = t_1;
	} else if (y <= 3.35e-59) {
		tmp = x * Math.exp((0.0 - (a * b)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.exp((y * (math.log(z) - t)))
	tmp = 0
	if y <= -2.3e-18:
		tmp = t_1
	elif y <= 3.35e-59:
		tmp = x * math.exp((0.0 - (a * b)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * exp(Float64(y * Float64(log(z) - t))))
	tmp = 0.0
	if (y <= -2.3e-18)
		tmp = t_1;
	elseif (y <= 3.35e-59)
		tmp = Float64(x * exp(Float64(0.0 - Float64(a * b))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * exp((y * (log(z) - t)));
	tmp = 0.0;
	if (y <= -2.3e-18)
		tmp = t_1;
	elseif (y <= 3.35e-59)
		tmp = x * exp((0.0 - (a * b)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.3e-18], t$95$1, If[LessEqual[y, 3.35e-59], N[(x * N[Exp[N[(0.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.35 \cdot 10^{-59}:\\
\;\;\;\;x \cdot e^{0 - a \cdot b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.3000000000000001e-18 or 3.35e-59 < y

    1. Initial program 98.6%

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

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(e^{y \cdot \left(\log z - t\right)}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(y \cdot \left(\log z - t\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \left(\log z - t\right)\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\log z, t\right)\right)\right)\right) \]
      5. log-lowering-log.f6488.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right)\right)\right) \]
    5. Simplified88.0%

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]

    if -2.3000000000000001e-18 < y < 3.35e-59

    1. Initial program 96.6%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6485.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified85.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 72.8% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
t_2 := \frac{x}{e^{y \cdot t}}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+168}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -1.02 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.22 \cdot 10^{-59}:\\
\;\;\;\;x \cdot e^{0 - a \cdot b}\\

\mathbf{elif}\;y \leq 7:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.40000000000000003e168 or 1.22e-59 < y < 7

    1. Initial program 99.9%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - t \cdot y\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(t \cdot y\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot t\right)\right)\right)\right) \]
      5. *-lowering-*.f6483.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, t\right)\right)\right)\right) \]
    5. Simplified83.3%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto x \cdot \frac{e^{0}}{\color{blue}{e^{y \cdot t}}} \]
      2. 1-expN/A

        \[\leadsto x \cdot \frac{1}{e^{\color{blue}{y \cdot t}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(e^{y \cdot t}\right)}\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\left(y \cdot t\right)\right)\right) \]
      6. *-lowering-*.f6483.3%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, t\right)\right)\right) \]
    7. Applied egg-rr83.3%

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

    if -3.40000000000000003e168 < y < -1.02e-14 or 7 < y

    1. Initial program 98.0%

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

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(e^{y \cdot \left(\log z - t\right)}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(y \cdot \left(\log z - t\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \left(\log z - t\right)\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\log z, t\right)\right)\right)\right) \]
      5. log-lowering-log.f6487.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right)\right)\right) \]
    5. Simplified87.9%

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    6. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left({z}^{y}\right)}\right) \]
      2. pow-lowering-pow.f6471.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{pow.f64}\left(z, \color{blue}{y}\right)\right) \]
    8. Simplified71.9%

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

    if -1.02e-14 < y < 1.22e-59

    1. Initial program 96.6%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6485.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified85.5%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 72.8% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
t_2 := \frac{x}{e^{y \cdot t}}\\
\mathbf{if}\;y \leq -1.85 \cdot 10^{+167}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y \leq -1.02 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 5.6 \cdot 10^{-59}:\\
\;\;\;\;\frac{x}{e^{a \cdot b}}\\

\mathbf{elif}\;y \leq 3.8:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.85e167 or 5.59999999999999961e-59 < y < 3.7999999999999998

    1. Initial program 99.9%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - t \cdot y\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(t \cdot y\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot t\right)\right)\right)\right) \]
      5. *-lowering-*.f6483.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, t\right)\right)\right)\right) \]
    5. Simplified83.3%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto x \cdot \frac{e^{0}}{\color{blue}{e^{y \cdot t}}} \]
      2. 1-expN/A

        \[\leadsto x \cdot \frac{1}{e^{\color{blue}{y \cdot t}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{e^{y \cdot t}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(e^{y \cdot t}\right)}\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\left(y \cdot t\right)\right)\right) \]
      6. *-lowering-*.f6483.3%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, t\right)\right)\right) \]
    7. Applied egg-rr83.3%

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

    if -1.85e167 < y < -1.02e-14 or 3.7999999999999998 < y

    1. Initial program 98.0%

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

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(e^{y \cdot \left(\log z - t\right)}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(y \cdot \left(\log z - t\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \left(\log z - t\right)\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\log z, t\right)\right)\right)\right) \]
      5. log-lowering-log.f6487.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right)\right)\right) \]
    5. Simplified87.9%

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    6. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left({z}^{y}\right)}\right) \]
      2. pow-lowering-pow.f6471.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{pow.f64}\left(z, \color{blue}{y}\right)\right) \]
    8. Simplified71.9%

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

    if -1.02e-14 < y < 5.59999999999999961e-59

    1. Initial program 96.6%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6485.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified85.5%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto x \cdot \frac{e^{0}}{\color{blue}{e^{a \cdot b}}} \]
      2. 1-expN/A

        \[\leadsto x \cdot \frac{1}{e^{\color{blue}{a \cdot b}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(e^{a \cdot b}\right)}\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\left(a \cdot b\right)\right)\right) \]
      6. *-lowering-*.f6485.5%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, b\right)\right)\right) \]
    7. Applied egg-rr85.5%

      \[\leadsto \color{blue}{\frac{x}{e^{a \cdot b}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 59.2% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot {z}^{y}\\ \mathbf{if}\;y \leq -1.02 \cdot 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-145}:\\ \;\;\;\;\frac{x}{1 + a \cdot \left(b + a \cdot \left(0.16666666666666666 \cdot \left(a \cdot \left(b \cdot \left(b \cdot b\right)\right)\right) + \left(b \cdot b\right) \cdot 0.5\right)\right)}\\ \mathbf{elif}\;y \leq 0.17:\\ \;\;\;\;x + x \cdot \left(a \cdot \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(0.5 + \left(a \cdot b\right) \cdot -0.16666666666666666\right)\right) - b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* x (pow z y))))
   (if (<= y -1.02e-14)
     t_1
     (if (<= y -5.8e-145)
       (/
        x
        (+
         1.0
         (*
          a
          (+
           b
           (*
            a
            (+
             (* 0.16666666666666666 (* a (* b (* b b))))
             (* (* b b) 0.5)))))))
       (if (<= y 0.17)
         (+
          x
          (*
           x
           (*
            a
            (- (* a (* (* b b) (+ 0.5 (* (* a b) -0.16666666666666666)))) b))))
         t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x * pow(z, y);
	double tmp;
	if (y <= -1.02e-14) {
		tmp = t_1;
	} else if (y <= -5.8e-145) {
		tmp = x / (1.0 + (a * (b + (a * ((0.16666666666666666 * (a * (b * (b * b)))) + ((b * b) * 0.5))))));
	} else if (y <= 0.17) {
		tmp = x + (x * (a * ((a * ((b * b) * (0.5 + ((a * b) * -0.16666666666666666)))) - b)));
	} 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 * (z ** y)
    if (y <= (-1.02d-14)) then
        tmp = t_1
    else if (y <= (-5.8d-145)) then
        tmp = x / (1.0d0 + (a * (b + (a * ((0.16666666666666666d0 * (a * (b * (b * b)))) + ((b * b) * 0.5d0))))))
    else if (y <= 0.17d0) then
        tmp = x + (x * (a * ((a * ((b * b) * (0.5d0 + ((a * b) * (-0.16666666666666666d0))))) - b)))
    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(z, y);
	double tmp;
	if (y <= -1.02e-14) {
		tmp = t_1;
	} else if (y <= -5.8e-145) {
		tmp = x / (1.0 + (a * (b + (a * ((0.16666666666666666 * (a * (b * (b * b)))) + ((b * b) * 0.5))))));
	} else if (y <= 0.17) {
		tmp = x + (x * (a * ((a * ((b * b) * (0.5 + ((a * b) * -0.16666666666666666)))) - b)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x * math.pow(z, y)
	tmp = 0
	if y <= -1.02e-14:
		tmp = t_1
	elif y <= -5.8e-145:
		tmp = x / (1.0 + (a * (b + (a * ((0.16666666666666666 * (a * (b * (b * b)))) + ((b * b) * 0.5))))))
	elif y <= 0.17:
		tmp = x + (x * (a * ((a * ((b * b) * (0.5 + ((a * b) * -0.16666666666666666)))) - b)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x * (z ^ y))
	tmp = 0.0
	if (y <= -1.02e-14)
		tmp = t_1;
	elseif (y <= -5.8e-145)
		tmp = Float64(x / Float64(1.0 + Float64(a * Float64(b + Float64(a * Float64(Float64(0.16666666666666666 * Float64(a * Float64(b * Float64(b * b)))) + Float64(Float64(b * b) * 0.5)))))));
	elseif (y <= 0.17)
		tmp = Float64(x + Float64(x * Float64(a * Float64(Float64(a * Float64(Float64(b * b) * Float64(0.5 + Float64(Float64(a * b) * -0.16666666666666666)))) - b))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x * (z ^ y);
	tmp = 0.0;
	if (y <= -1.02e-14)
		tmp = t_1;
	elseif (y <= -5.8e-145)
		tmp = x / (1.0 + (a * (b + (a * ((0.16666666666666666 * (a * (b * (b * b)))) + ((b * b) * 0.5))))));
	elseif (y <= 0.17)
		tmp = x + (x * (a * ((a * ((b * b) * (0.5 + ((a * b) * -0.16666666666666666)))) - b)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.02e-14], t$95$1, If[LessEqual[y, -5.8e-145], N[(x / N[(1.0 + N[(a * N[(b + N[(a * N[(N[(0.16666666666666666 * N[(a * N[(b * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * b), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.17], N[(x + N[(x * N[(a * N[(N[(a * N[(N[(b * b), $MachinePrecision] * N[(0.5 + N[(N[(a * b), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -5.8 \cdot 10^{-145}:\\
\;\;\;\;\frac{x}{1 + a \cdot \left(b + a \cdot \left(0.16666666666666666 \cdot \left(a \cdot \left(b \cdot \left(b \cdot b\right)\right)\right) + \left(b \cdot b\right) \cdot 0.5\right)\right)}\\

\mathbf{elif}\;y \leq 0.17:\\
\;\;\;\;x + x \cdot \left(a \cdot \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(0.5 + \left(a \cdot b\right) \cdot -0.16666666666666666\right)\right) - b\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.02e-14 or 0.170000000000000012 < y

    1. Initial program 98.4%

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

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(e^{y \cdot \left(\log z - t\right)}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(y \cdot \left(\log z - t\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \left(\log z - t\right)\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\log z, t\right)\right)\right)\right) \]
      5. log-lowering-log.f6488.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right)\right)\right) \]
    5. Simplified88.4%

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    6. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left({z}^{y}\right)}\right) \]
      2. pow-lowering-pow.f6469.8%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{pow.f64}\left(z, \color{blue}{y}\right)\right) \]
    8. Simplified69.8%

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

    if -1.02e-14 < y < -5.79999999999999968e-145

    1. Initial program 96.7%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6479.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified79.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto x \cdot \frac{e^{0}}{\color{blue}{e^{a \cdot b}}} \]
      2. 1-expN/A

        \[\leadsto x \cdot \frac{1}{e^{\color{blue}{a \cdot b}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(e^{a \cdot b}\right)}\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\left(a \cdot b\right)\right)\right) \]
      6. *-lowering-*.f6479.7%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, b\right)\right)\right) \]
    7. Applied egg-rr79.7%

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

      \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + a \cdot \left(b + a \cdot \left(\frac{1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)\right)}\right) \]
    9. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(a \cdot \left(b + a \cdot \left(\frac{1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \color{blue}{\left(b + a \cdot \left(\frac{1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)}\right)\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \color{blue}{\left(a \cdot \left(\frac{1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)}\right)\right)\right)\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left(\frac{1}{6} \cdot \left(a \cdot {b}^{3}\right)\right), \color{blue}{\left(\frac{1}{2} \cdot {b}^{2}\right)}\right)\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \left(a \cdot {b}^{3}\right)\right), \left(\color{blue}{\frac{1}{2}} \cdot {b}^{2}\right)\right)\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(a, \left({b}^{3}\right)\right)\right), \left(\frac{1}{2} \cdot {b}^{2}\right)\right)\right)\right)\right)\right)\right) \]
      8. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(a, \left(b \cdot \left(b \cdot b\right)\right)\right)\right), \left(\frac{1}{2} \cdot {b}^{2}\right)\right)\right)\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(a, \left(b \cdot {b}^{2}\right)\right)\right), \left(\frac{1}{2} \cdot {b}^{2}\right)\right)\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(b, \left({b}^{2}\right)\right)\right)\right), \left(\frac{1}{2} \cdot {b}^{2}\right)\right)\right)\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(b, \left(b \cdot b\right)\right)\right)\right), \left(\frac{1}{2} \cdot {b}^{2}\right)\right)\right)\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right), \left(\frac{1}{2} \cdot {b}^{2}\right)\right)\right)\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right), \left({b}^{2} \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right), \mathsf{*.f64}\left(\left({b}^{2}\right), \color{blue}{\frac{1}{2}}\right)\right)\right)\right)\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right), \mathsf{*.f64}\left(\left(b \cdot b\right), \frac{1}{2}\right)\right)\right)\right)\right)\right)\right) \]
      16. *-lowering-*.f6469.8%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(b, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{6}, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, b\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, b\right), \frac{1}{2}\right)\right)\right)\right)\right)\right)\right) \]
    10. Simplified69.8%

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

    if -5.79999999999999968e-145 < y < 0.170000000000000012

    1. Initial program 97.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6481.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified81.4%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(a \cdot \left(-1 \cdot b + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \color{blue}{\left(-1 \cdot b + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)}\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \left(\left(\mathsf{neg}\left(b\right)\right) + \color{blue}{a} \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \left(a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right) + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \left(a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right) - \color{blue}{b}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\left(a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right), \color{blue}{b}\right)\right)\right)\right) \]
    8. Simplified54.6%

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(a \cdot \left(\left(-0.16666666666666666 \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) + 0.5 \cdot \left(b \cdot b\right)\right) - b\right)\right)} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \left(a \cdot \left(a \cdot \left(\left(\frac{-1}{6} \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) + \frac{1}{2} \cdot \left(b \cdot b\right)\right) - b\right) + \color{blue}{1}\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \left(a \cdot \left(a \cdot \left(\left(\frac{-1}{6} \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) + \frac{1}{2} \cdot \left(b \cdot b\right)\right) - b\right)\right) \cdot x + \color{blue}{1 \cdot x} \]
      3. *-lft-identityN/A

        \[\leadsto \left(a \cdot \left(a \cdot \left(\left(\frac{-1}{6} \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) + \frac{1}{2} \cdot \left(b \cdot b\right)\right) - b\right)\right) \cdot x + x \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(a \cdot \left(a \cdot \left(\left(\frac{-1}{6} \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) + \frac{1}{2} \cdot \left(b \cdot b\right)\right) - b\right)\right) \cdot x\right), \color{blue}{x}\right) \]
    10. Applied egg-rr58.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.02 \cdot 10^{-14}:\\ \;\;\;\;x \cdot {z}^{y}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-145}:\\ \;\;\;\;\frac{x}{1 + a \cdot \left(b + a \cdot \left(0.16666666666666666 \cdot \left(a \cdot \left(b \cdot \left(b \cdot b\right)\right)\right) + \left(b \cdot b\right) \cdot 0.5\right)\right)}\\ \mathbf{elif}\;y \leq 0.17:\\ \;\;\;\;x + x \cdot \left(a \cdot \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(0.5 + \left(a \cdot b\right) \cdot -0.16666666666666666\right)\right) - b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot {z}^{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.2% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{x}{e^{a \cdot b}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.5000000000000005e-6 or 3.1999999999999999e25 < y

    1. Initial program 98.3%

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

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(e^{y \cdot \left(\log z - t\right)}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(y \cdot \left(\log z - t\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \left(\log z - t\right)\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\log z, t\right)\right)\right)\right) \]
      5. log-lowering-log.f6490.1%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{log.f64}\left(z\right), t\right)\right)\right)\right) \]
    5. Simplified90.1%

      \[\leadsto \color{blue}{x \cdot e^{y \cdot \left(\log z - t\right)}} \]
    6. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x \cdot {z}^{y}} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left({z}^{y}\right)}\right) \]
      2. pow-lowering-pow.f6470.2%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{pow.f64}\left(z, \color{blue}{y}\right)\right) \]
    8. Simplified70.2%

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

    if -9.5000000000000005e-6 < y < 3.1999999999999999e25

    1. Initial program 97.1%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6480.1%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified80.1%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto x \cdot \frac{e^{0}}{\color{blue}{e^{a \cdot b}}} \]
      2. 1-expN/A

        \[\leadsto x \cdot \frac{1}{e^{\color{blue}{a \cdot b}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(e^{a \cdot b}\right)}\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\left(a \cdot b\right)\right)\right) \]
      6. *-lowering-*.f6480.1%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, b\right)\right)\right) \]
    7. Applied egg-rr80.1%

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

Alternative 8: 51.5% accurate, 10.2× speedup?

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

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

\mathbf{elif}\;y \leq 0.00245:\\
\;\;\;\;x + x \cdot \left(a \cdot \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(0.5 + \left(a \cdot b\right) \cdot -0.16666666666666666\right)\right) - b\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(b \cdot \left(b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right)\right)\right)\\


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

    1. Initial program 100.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - t \cdot y\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(t \cdot y\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot t\right)\right)\right)\right) \]
      5. *-lowering-*.f6463.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, t\right)\right)\right)\right) \]
    5. Simplified63.3%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{\left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)}\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\left(\mathsf{neg}\left(t\right)\right) + \color{blue}{\frac{1}{2}} \cdot \left({t}^{2} \cdot y\right)\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) - \color{blue}{t}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right), \color{blue}{t}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({t}^{2} \cdot y\right)\right), t\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot {t}^{2}\right)\right), t\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \left({t}^{2}\right)\right)\right), t\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \left(t \cdot t\right)\right)\right), t\right)\right)\right)\right) \]
      11. *-lowering-*.f6438.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(t, t\right)\right)\right), t\right)\right)\right)\right) \]
    8. Simplified38.0%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(x \cdot {y}^{2}\right) \cdot \color{blue}{{t}^{2}}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(x \cdot {y}^{2}\right) \cdot \left(t \cdot \color{blue}{t}\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(\left(x \cdot {y}^{2}\right) \cdot t\right) \cdot \color{blue}{t}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(t \cdot \left(x \cdot {y}^{2}\right)\right) \cdot t\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(t \cdot \left(x \cdot {y}^{2}\right)\right), \color{blue}{t}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(x \cdot {y}^{2}\right)\right), t\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \left({y}^{2}\right)\right)\right), t\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \left(y \cdot y\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f6458.7%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, y\right)\right)\right), t\right)\right) \]
    11. Simplified58.7%

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right) \cdot t\right)} \]

    if -1.6000000000000001e45 < y < 0.0024499999999999999

    1. Initial program 97.2%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6477.8%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified77.8%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(a \cdot \left(-1 \cdot b + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \color{blue}{\left(-1 \cdot b + a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)}\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \left(\left(\mathsf{neg}\left(b\right)\right) + \color{blue}{a} \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \left(a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right) + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \left(a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right) - \color{blue}{b}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\left(a \cdot \left(\frac{-1}{6} \cdot \left(a \cdot {b}^{3}\right) + \frac{1}{2} \cdot {b}^{2}\right)\right), \color{blue}{b}\right)\right)\right)\right) \]
    8. Simplified51.0%

      \[\leadsto x \cdot \color{blue}{\left(1 + a \cdot \left(a \cdot \left(\left(-0.16666666666666666 \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) + 0.5 \cdot \left(b \cdot b\right)\right) - b\right)\right)} \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto x \cdot \left(a \cdot \left(a \cdot \left(\left(\frac{-1}{6} \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) + \frac{1}{2} \cdot \left(b \cdot b\right)\right) - b\right) + \color{blue}{1}\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \left(a \cdot \left(a \cdot \left(\left(\frac{-1}{6} \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) + \frac{1}{2} \cdot \left(b \cdot b\right)\right) - b\right)\right) \cdot x + \color{blue}{1 \cdot x} \]
      3. *-lft-identityN/A

        \[\leadsto \left(a \cdot \left(a \cdot \left(\left(\frac{-1}{6} \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) + \frac{1}{2} \cdot \left(b \cdot b\right)\right) - b\right)\right) \cdot x + x \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\left(\left(a \cdot \left(a \cdot \left(\left(\frac{-1}{6} \cdot a\right) \cdot \left(b \cdot \left(b \cdot b\right)\right) + \frac{1}{2} \cdot \left(b \cdot b\right)\right) - b\right)\right) \cdot x\right), \color{blue}{x}\right) \]
    10. Applied egg-rr55.0%

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

    if 0.0024499999999999999 < y

    1. Initial program 97.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6435.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified35.3%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6418.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified18.9%

      \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right) \cdot \color{blue}{b}\right)\right)\right) \]
      2. flip3--N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)} \cdot b\right)\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b}{\color{blue}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b\right), \color{blue}{\left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)\right)}\right)\right)\right) \]
    10. Applied egg-rr0.8%

      \[\leadsto x \cdot \left(1 + \color{blue}{\frac{\left(\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot 0.125\right) \cdot \left(\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(a \cdot a\right)\right)\right) - a \cdot \left(a \cdot a\right)\right) \cdot b}{0.25 \cdot \left(\left(b \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + a \cdot \left(a + 0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}}\right) \]
    11. Taylor expanded in b around inf

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)}\right) \]
    12. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \color{blue}{{b}^{2}}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \left(b \cdot \color{blue}{b}\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b\right) \cdot \color{blue}{b}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right) \cdot b\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left({a}^{2} \cdot b\right) \cdot \frac{1}{2}\right) \cdot b\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(b \cdot {a}^{2}\right) \cdot \frac{1}{2}\right) \cdot b\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(b \cdot \left({a}^{2} \cdot \frac{1}{2}\right)\right) \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(b \cdot \left(\frac{1}{2} \cdot {a}^{2}\right)\right) \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(b \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b\right)}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{\left({a}^{2} \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(\left({a}^{2} \cdot b\right) \cdot \color{blue}{\frac{1}{2}}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(\left(b \cdot {a}^{2}\right) \cdot \frac{1}{2}\right)\right)\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(b \cdot \color{blue}{\left({a}^{2} \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{{a}^{2}}\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({a}^{2}\right)}\right)\right)\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \left(a \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
      19. *-lowering-*.f6451.2%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right)\right)\right) \]
    13. Simplified51.2%

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

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

Alternative 9: 50.1% accurate, 12.6× speedup?

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

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

\mathbf{elif}\;y \leq 4.4 \cdot 10^{-105}:\\
\;\;\;\;x \cdot \left(1 + a \cdot \left(0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right) - b\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(b \cdot \left(b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right)\right)\right)\\


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

    1. Initial program 100.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - t \cdot y\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(t \cdot y\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot t\right)\right)\right)\right) \]
      5. *-lowering-*.f6463.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, t\right)\right)\right)\right) \]
    5. Simplified63.3%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{\left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)}\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\left(\mathsf{neg}\left(t\right)\right) + \color{blue}{\frac{1}{2}} \cdot \left({t}^{2} \cdot y\right)\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) - \color{blue}{t}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right), \color{blue}{t}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({t}^{2} \cdot y\right)\right), t\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot {t}^{2}\right)\right), t\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \left({t}^{2}\right)\right)\right), t\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \left(t \cdot t\right)\right)\right), t\right)\right)\right)\right) \]
      11. *-lowering-*.f6438.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(t, t\right)\right)\right), t\right)\right)\right)\right) \]
    8. Simplified38.0%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(x \cdot {y}^{2}\right) \cdot \color{blue}{{t}^{2}}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(x \cdot {y}^{2}\right) \cdot \left(t \cdot \color{blue}{t}\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(\left(x \cdot {y}^{2}\right) \cdot t\right) \cdot \color{blue}{t}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(t \cdot \left(x \cdot {y}^{2}\right)\right) \cdot t\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(t \cdot \left(x \cdot {y}^{2}\right)\right), \color{blue}{t}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(x \cdot {y}^{2}\right)\right), t\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \left({y}^{2}\right)\right)\right), t\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \left(y \cdot y\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f6458.7%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, y\right)\right)\right), t\right)\right) \]
    11. Simplified58.7%

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right) \cdot t\right)} \]

    if -3.2000000000000003e45 < y < 4.40000000000000008e-105

    1. Initial program 96.8%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6480.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified80.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(a \cdot \left(-1 \cdot b + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \color{blue}{\left(-1 \cdot b + \frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right)}\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \left(\left(\mathsf{neg}\left(b\right)\right) + \color{blue}{\frac{1}{2}} \cdot \left(a \cdot {b}^{2}\right)\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \left(\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \left(\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right) - \color{blue}{b}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left(a \cdot {b}^{2}\right)\right), \color{blue}{b}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(a \cdot {b}^{2}\right)\right), b\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(a, \left({b}^{2}\right)\right)\right), b\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(a, \left(b \cdot b\right)\right)\right), b\right)\right)\right)\right) \]
      10. *-lowering-*.f6456.8%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(b, b\right)\right)\right), b\right)\right)\right)\right) \]
    8. Simplified56.8%

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

    if 4.40000000000000008e-105 < y

    1. Initial program 97.6%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6440.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified40.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6421.1%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified21.1%

      \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right) \cdot \color{blue}{b}\right)\right)\right) \]
      2. flip3--N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)} \cdot b\right)\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b}{\color{blue}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b\right), \color{blue}{\left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)\right)}\right)\right)\right) \]
    10. Applied egg-rr3.2%

      \[\leadsto x \cdot \left(1 + \color{blue}{\frac{\left(\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot 0.125\right) \cdot \left(\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(a \cdot a\right)\right)\right) - a \cdot \left(a \cdot a\right)\right) \cdot b}{0.25 \cdot \left(\left(b \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + a \cdot \left(a + 0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}}\right) \]
    11. Taylor expanded in b around inf

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)}\right) \]
    12. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \color{blue}{{b}^{2}}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \left(b \cdot \color{blue}{b}\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b\right) \cdot \color{blue}{b}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right) \cdot b\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left({a}^{2} \cdot b\right) \cdot \frac{1}{2}\right) \cdot b\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(b \cdot {a}^{2}\right) \cdot \frac{1}{2}\right) \cdot b\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(b \cdot \left({a}^{2} \cdot \frac{1}{2}\right)\right) \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(b \cdot \left(\frac{1}{2} \cdot {a}^{2}\right)\right) \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(b \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b\right)}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{\left({a}^{2} \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(\left({a}^{2} \cdot b\right) \cdot \color{blue}{\frac{1}{2}}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(\left(b \cdot {a}^{2}\right) \cdot \frac{1}{2}\right)\right)\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(b \cdot \color{blue}{\left({a}^{2} \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{{a}^{2}}\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({a}^{2}\right)}\right)\right)\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \left(a \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
      19. *-lowering-*.f6447.2%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right)\right)\right) \]
    13. Simplified47.2%

      \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification54.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+45}:\\ \;\;\;\;0.5 \cdot \left(t \cdot \left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-105}:\\ \;\;\;\;x \cdot \left(1 + a \cdot \left(0.5 \cdot \left(a \cdot \left(b \cdot b\right)\right) - b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(b \cdot \left(b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 50.6% accurate, 13.7× speedup?

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

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

\mathbf{elif}\;y \leq 4.3 \cdot 10^{-105}:\\
\;\;\;\;x \cdot \left(1 + b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(b \cdot \left(b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.3500000000000001e43

    1. Initial program 100.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - t \cdot y\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(t \cdot y\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot t\right)\right)\right)\right) \]
      5. *-lowering-*.f6463.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, t\right)\right)\right)\right) \]
    5. Simplified63.3%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{\left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)}\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\left(\mathsf{neg}\left(t\right)\right) + \color{blue}{\frac{1}{2}} \cdot \left({t}^{2} \cdot y\right)\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) - \color{blue}{t}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right), \color{blue}{t}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({t}^{2} \cdot y\right)\right), t\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot {t}^{2}\right)\right), t\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \left({t}^{2}\right)\right)\right), t\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \left(t \cdot t\right)\right)\right), t\right)\right)\right)\right) \]
      11. *-lowering-*.f6438.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(t, t\right)\right)\right), t\right)\right)\right)\right) \]
    8. Simplified38.0%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(x \cdot {y}^{2}\right) \cdot \color{blue}{{t}^{2}}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(x \cdot {y}^{2}\right) \cdot \left(t \cdot \color{blue}{t}\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(\left(x \cdot {y}^{2}\right) \cdot t\right) \cdot \color{blue}{t}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(t \cdot \left(x \cdot {y}^{2}\right)\right) \cdot t\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(t \cdot \left(x \cdot {y}^{2}\right)\right), \color{blue}{t}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(x \cdot {y}^{2}\right)\right), t\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \left({y}^{2}\right)\right)\right), t\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \left(y \cdot y\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f6458.7%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, y\right)\right)\right), t\right)\right) \]
    11. Simplified58.7%

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right) \cdot t\right)} \]

    if -1.3500000000000001e43 < y < 4.29999999999999964e-105

    1. Initial program 96.8%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6480.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified80.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6454.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified54.5%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({a}^{2} \cdot b\right)}\right)\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot \color{blue}{{a}^{2}}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \color{blue}{\left({a}^{2}\right)}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot \color{blue}{a}\right)\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f6453.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right)\right)\right)\right) \]
    11. Simplified53.5%

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

    if 4.29999999999999964e-105 < y

    1. Initial program 97.6%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6440.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified40.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6421.1%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified21.1%

      \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right) \cdot \color{blue}{b}\right)\right)\right) \]
      2. flip3--N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)} \cdot b\right)\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b}{\color{blue}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b\right), \color{blue}{\left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)\right)}\right)\right)\right) \]
    10. Applied egg-rr3.2%

      \[\leadsto x \cdot \left(1 + \color{blue}{\frac{\left(\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot 0.125\right) \cdot \left(\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(a \cdot a\right)\right)\right) - a \cdot \left(a \cdot a\right)\right) \cdot b}{0.25 \cdot \left(\left(b \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + a \cdot \left(a + 0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}}\right) \]
    11. Taylor expanded in b around inf

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)}\right) \]
    12. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \color{blue}{{b}^{2}}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \left(b \cdot \color{blue}{b}\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b\right) \cdot \color{blue}{b}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right) \cdot b\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left({a}^{2} \cdot b\right) \cdot \frac{1}{2}\right) \cdot b\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(b \cdot {a}^{2}\right) \cdot \frac{1}{2}\right) \cdot b\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(b \cdot \left({a}^{2} \cdot \frac{1}{2}\right)\right) \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(b \cdot \left(\frac{1}{2} \cdot {a}^{2}\right)\right) \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(b \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b\right)}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{\left({a}^{2} \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(\left({a}^{2} \cdot b\right) \cdot \color{blue}{\frac{1}{2}}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(\left(b \cdot {a}^{2}\right) \cdot \frac{1}{2}\right)\right)\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(b \cdot \color{blue}{\left({a}^{2} \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{{a}^{2}}\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({a}^{2}\right)}\right)\right)\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \left(a \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
      19. *-lowering-*.f6447.2%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right)\right)\right) \]
    13. Simplified47.2%

      \[\leadsto x \cdot \color{blue}{\left(b \cdot \left(b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification52.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+43}:\\ \;\;\;\;0.5 \cdot \left(t \cdot \left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{-105}:\\ \;\;\;\;x \cdot \left(1 + b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(b \cdot \left(b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 34.2% accurate, 14.3× speedup?

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

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

\mathbf{elif}\;y \leq -4.9 \cdot 10^{-17}:\\
\;\;\;\;b \cdot \left(\frac{x}{b} - x \cdot a\right)\\

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

\mathbf{else}:\\
\;\;\;\;0 - x \cdot \left(a \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -9.6000000000000001e86

    1. Initial program 100.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - t \cdot y\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(t \cdot y\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot t\right)\right)\right)\right) \]
      5. *-lowering-*.f6469.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, t\right)\right)\right)\right) \]
    5. Simplified69.3%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(t \cdot y\right)\right)}\right) \]
    7. Step-by-step derivation
      1. neg-mul-1N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{t \cdot y}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(t \cdot y\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(y \cdot \color{blue}{t}\right)\right)\right) \]
      5. *-lowering-*.f6428.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{t}\right)\right)\right) \]
    8. Simplified28.9%

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

    if -9.6000000000000001e86 < y < -4.90000000000000012e-17

    1. Initial program 100.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6436.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified36.5%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6417.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified17.9%

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

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)}\right) \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{a \cdot b}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(b \cdot \color{blue}{a}\right)\right)\right) \]
      5. *-lowering-*.f6413.2%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{a}\right)\right)\right) \]
    11. Simplified13.2%

      \[\leadsto x \cdot \color{blue}{\left(1 - b \cdot a\right)} \]
    12. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(a \cdot x\right) + \frac{x}{b}\right)} \]
    13. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot \left(a \cdot x\right) + \frac{x}{b}\right)}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{x}{b} + \color{blue}{-1 \cdot \left(a \cdot x\right)}\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{x}{b} + \left(\mathsf{neg}\left(a \cdot x\right)\right)\right)\right) \]
      4. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(b, \left(\frac{x}{b} - \color{blue}{a \cdot x}\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{x}{b}\right), \color{blue}{\left(a \cdot x\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, b\right), \left(\color{blue}{a} \cdot x\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, b\right), \left(x \cdot \color{blue}{a}\right)\right)\right) \]
      8. *-lowering-*.f6435.3%

        \[\leadsto \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, b\right), \mathsf{*.f64}\left(x, \color{blue}{a}\right)\right)\right) \]
    14. Simplified35.3%

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

    if -4.90000000000000012e-17 < y < 8e15

    1. Initial program 97.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6481.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified81.5%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto x \cdot \frac{e^{0}}{\color{blue}{e^{a \cdot b}}} \]
      2. 1-expN/A

        \[\leadsto x \cdot \frac{1}{e^{\color{blue}{a \cdot b}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(e^{a \cdot b}\right)}\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\left(a \cdot b\right)\right)\right) \]
      6. *-lowering-*.f6481.5%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, b\right)\right)\right) \]
    7. Applied egg-rr81.5%

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

      \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + a \cdot b\right)}\right) \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(a \cdot b + \color{blue}{1}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{1}\right)\right) \]
      3. *-lowering-*.f6449.2%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), 1\right)\right) \]
    10. Simplified49.2%

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

    if 8e15 < y

    1. Initial program 96.8%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6432.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified32.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6418.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified18.4%

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

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)}\right) \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{a \cdot b}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(b \cdot \color{blue}{a}\right)\right)\right) \]
      5. *-lowering-*.f6415.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{a}\right)\right)\right) \]
    11. Simplified15.4%

      \[\leadsto x \cdot \color{blue}{\left(1 - b \cdot a\right)} \]
    12. Taylor expanded in b around inf

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right) \]
    13. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\mathsf{neg}\left(a \cdot b\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{a \cdot b}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
      4. *-lowering-*.f6434.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right) \]
    14. Simplified34.0%

      \[\leadsto x \cdot \color{blue}{\left(0 - a \cdot b\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification41.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.6 \cdot 10^{+86}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;y \leq -4.9 \cdot 10^{-17}:\\ \;\;\;\;b \cdot \left(\frac{x}{b} - x \cdot a\right)\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{1 + a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 47.3% accurate, 15.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-15}:\\
\;\;\;\;0.5 \cdot \left(t \cdot \left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right)\right)\\

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-104}:\\
\;\;\;\;\frac{x}{1 + a \cdot b}\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(b \cdot \left(b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.4999999999999996e-15

    1. Initial program 100.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - t \cdot y\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(t \cdot y\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot t\right)\right)\right)\right) \]
      5. *-lowering-*.f6459.6%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, t\right)\right)\right)\right) \]
    5. Simplified59.6%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{\left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)}\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\left(\mathsf{neg}\left(t\right)\right) + \color{blue}{\frac{1}{2}} \cdot \left({t}^{2} \cdot y\right)\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) - \color{blue}{t}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right), \color{blue}{t}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({t}^{2} \cdot y\right)\right), t\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot {t}^{2}\right)\right), t\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \left({t}^{2}\right)\right)\right), t\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \left(t \cdot t\right)\right)\right), t\right)\right)\right)\right) \]
      11. *-lowering-*.f6436.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(t, t\right)\right)\right), t\right)\right)\right)\right) \]
    8. Simplified36.0%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(x \cdot {y}^{2}\right) \cdot \color{blue}{{t}^{2}}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(x \cdot {y}^{2}\right) \cdot \left(t \cdot \color{blue}{t}\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(\left(x \cdot {y}^{2}\right) \cdot t\right) \cdot \color{blue}{t}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(t \cdot \left(x \cdot {y}^{2}\right)\right) \cdot t\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(t \cdot \left(x \cdot {y}^{2}\right)\right), \color{blue}{t}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(x \cdot {y}^{2}\right)\right), t\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \left({y}^{2}\right)\right)\right), t\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \left(y \cdot y\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f6451.1%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, y\right)\right)\right), t\right)\right) \]
    11. Simplified51.1%

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right) \cdot t\right)} \]

    if -7.4999999999999996e-15 < y < 1.04999999999999999e-104

    1. Initial program 96.4%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6485.6%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified85.6%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto x \cdot \frac{e^{0}}{\color{blue}{e^{a \cdot b}}} \]
      2. 1-expN/A

        \[\leadsto x \cdot \frac{1}{e^{\color{blue}{a \cdot b}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(e^{a \cdot b}\right)}\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\left(a \cdot b\right)\right)\right) \]
      6. *-lowering-*.f6485.6%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, b\right)\right)\right) \]
    7. Applied egg-rr85.6%

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

      \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + a \cdot b\right)}\right) \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(a \cdot b + \color{blue}{1}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{1}\right)\right) \]
      3. *-lowering-*.f6453.7%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), 1\right)\right) \]
    10. Simplified53.7%

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

    if 1.04999999999999999e-104 < y

    1. Initial program 97.6%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6440.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified40.0%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6421.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified21.4%

      \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right) \cdot \color{blue}{b}\right)\right)\right) \]
      2. flip3--N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)} \cdot b\right)\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b}{\color{blue}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b\right), \color{blue}{\left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)\right)}\right)\right)\right) \]
    10. Applied egg-rr3.3%

      \[\leadsto x \cdot \left(1 + \color{blue}{\frac{\left(\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot 0.125\right) \cdot \left(\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(a \cdot a\right)\right)\right) - a \cdot \left(a \cdot a\right)\right) \cdot b}{0.25 \cdot \left(\left(b \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + a \cdot \left(a + 0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}}\right) \]
    11. Taylor expanded in b around inf

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)}\right) \]
    12. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \color{blue}{{b}^{2}}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot \left(b \cdot \color{blue}{b}\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b\right) \cdot \color{blue}{b}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right) \cdot b\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left({a}^{2} \cdot b\right) \cdot \frac{1}{2}\right) \cdot b\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(\left(b \cdot {a}^{2}\right) \cdot \frac{1}{2}\right) \cdot b\right)\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(b \cdot \left({a}^{2} \cdot \frac{1}{2}\right)\right) \cdot b\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\left(b \cdot \left(\frac{1}{2} \cdot {a}^{2}\right)\right) \cdot b\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(b \cdot \color{blue}{\left(\left(\frac{1}{2} \cdot {a}^{2}\right) \cdot b\right)}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{\left({a}^{2} \cdot b\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(\left({a}^{2} \cdot b\right) \cdot \color{blue}{\frac{1}{2}}\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(\left(b \cdot {a}^{2}\right) \cdot \frac{1}{2}\right)\right)\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(b \cdot \color{blue}{\left({a}^{2} \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \left(b \cdot \left(\frac{1}{2} \cdot \color{blue}{{a}^{2}}\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \color{blue}{\left(\frac{1}{2} \cdot {a}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({a}^{2}\right)}\right)\right)\right)\right) \]
      18. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \left(a \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
      19. *-lowering-*.f6447.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right)\right)\right) \]
    13. Simplified47.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.5 \cdot 10^{-15}:\\ \;\;\;\;0.5 \cdot \left(t \cdot \left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-104}:\\ \;\;\;\;\frac{x}{1 + a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(b \cdot \left(b \cdot \left(0.5 \cdot \left(a \cdot a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 47.6% accurate, 15.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-18}:\\
\;\;\;\;0.5 \cdot \left(t \cdot \left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right)\right)\\

\mathbf{elif}\;y \leq 7.5 \cdot 10^{-7}:\\
\;\;\;\;\frac{x}{1 + a \cdot b}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(a \cdot \left(a \cdot \left(x \cdot \left(b \cdot b\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.2000000000000004e-18

    1. Initial program 100.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - t \cdot y\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(t \cdot y\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot t\right)\right)\right)\right) \]
      5. *-lowering-*.f6459.6%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, t\right)\right)\right)\right) \]
    5. Simplified59.6%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(y \cdot \left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{\left(-1 \cdot t + \frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right)}\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\left(\mathsf{neg}\left(t\right)\right) + \color{blue}{\frac{1}{2}} \cdot \left({t}^{2} \cdot y\right)\right)\right)\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) + \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right) - \color{blue}{t}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({t}^{2} \cdot y\right)\right), \color{blue}{t}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({t}^{2} \cdot y\right)\right), t\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(y \cdot {t}^{2}\right)\right), t\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \left({t}^{2}\right)\right)\right), t\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \left(t \cdot t\right)\right)\right), t\right)\right)\right)\right) \]
      11. *-lowering-*.f6436.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(t, t\right)\right)\right), t\right)\right)\right)\right) \]
    8. Simplified36.0%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({t}^{2} \cdot \left(x \cdot {y}^{2}\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(x \cdot {y}^{2}\right) \cdot \color{blue}{{t}^{2}}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(x \cdot {y}^{2}\right) \cdot \left(t \cdot \color{blue}{t}\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(\left(x \cdot {y}^{2}\right) \cdot t\right) \cdot \color{blue}{t}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(t \cdot \left(x \cdot {y}^{2}\right)\right) \cdot t\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(t \cdot \left(x \cdot {y}^{2}\right)\right), \color{blue}{t}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(x \cdot {y}^{2}\right)\right), t\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \left({y}^{2}\right)\right)\right), t\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \left(y \cdot y\right)\right)\right), t\right)\right) \]
      10. *-lowering-*.f6451.1%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, y\right)\right)\right), t\right)\right) \]
    11. Simplified51.1%

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right) \cdot t\right)} \]

    if -9.2000000000000004e-18 < y < 7.5000000000000002e-7

    1. Initial program 96.9%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6482.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified82.3%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto x \cdot \frac{e^{0}}{\color{blue}{e^{a \cdot b}}} \]
      2. 1-expN/A

        \[\leadsto x \cdot \frac{1}{e^{\color{blue}{a \cdot b}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(e^{a \cdot b}\right)}\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\left(a \cdot b\right)\right)\right) \]
      6. *-lowering-*.f6482.3%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, b\right)\right)\right) \]
    7. Applied egg-rr82.3%

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

      \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + a \cdot b\right)}\right) \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(a \cdot b + \color{blue}{1}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{1}\right)\right) \]
      3. *-lowering-*.f6451.0%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), 1\right)\right) \]
    10. Simplified51.0%

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

    if 7.5000000000000002e-7 < y

    1. Initial program 97.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6434.8%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified34.8%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6418.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified18.7%

      \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right) \cdot \color{blue}{b}\right)\right)\right) \]
      2. flip3--N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)} \cdot b\right)\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b}{\color{blue}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b\right), \color{blue}{\left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)\right)}\right)\right)\right) \]
    10. Applied egg-rr0.8%

      \[\leadsto x \cdot \left(1 + \color{blue}{\frac{\left(\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot 0.125\right) \cdot \left(\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(a \cdot a\right)\right)\right) - a \cdot \left(a \cdot a\right)\right) \cdot b}{0.25 \cdot \left(\left(b \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + a \cdot \left(a + 0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}}\right) \]
    11. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({a}^{2} \cdot \left({b}^{2} \cdot x\right)\right)} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({a}^{2} \cdot \left({b}^{2} \cdot x\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left({b}^{2} \cdot x\right) \cdot \color{blue}{{a}^{2}}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left({b}^{2} \cdot x\right) \cdot \left(a \cdot \color{blue}{a}\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(\left({b}^{2} \cdot x\right) \cdot a\right) \cdot \color{blue}{a}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(a \cdot \left({b}^{2} \cdot x\right)\right) \cdot a\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(a \cdot \left({b}^{2} \cdot x\right)\right), \color{blue}{a}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \left({b}^{2} \cdot x\right)\right), a\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \left(x \cdot {b}^{2}\right)\right), a\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(x, \left({b}^{2}\right)\right)\right), a\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(x, \left(b \cdot b\right)\right)\right), a\right)\right) \]
      11. *-lowering-*.f6450.4%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, b\right)\right)\right), a\right)\right) \]
    13. Simplified50.4%

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(a \cdot \left(x \cdot \left(b \cdot b\right)\right)\right) \cdot a\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.2 \cdot 10^{-18}:\\ \;\;\;\;0.5 \cdot \left(t \cdot \left(t \cdot \left(x \cdot \left(y \cdot y\right)\right)\right)\right)\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{x}{1 + a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \left(a \cdot \left(a \cdot \left(x \cdot \left(b \cdot b\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 43.4% accurate, 15.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0.5 \cdot \left(a \cdot \left(a \cdot \left(x \cdot \left(b \cdot b\right)\right)\right)\right)\\ \mathbf{if}\;y \leq -22000000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{-6}:\\ \;\;\;\;\frac{x}{1 + a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* 0.5 (* a (* a (* x (* b b)))))))
   (if (<= y -22000000000000.0)
     t_1
     (if (<= y 3.5e-6) (/ x (+ 1.0 (* a b))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 0.5 * (a * (a * (x * (b * b))));
	double tmp;
	if (y <= -22000000000000.0) {
		tmp = t_1;
	} else if (y <= 3.5e-6) {
		tmp = x / (1.0 + (a * b));
	} 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 = 0.5d0 * (a * (a * (x * (b * b))))
    if (y <= (-22000000000000.0d0)) then
        tmp = t_1
    else if (y <= 3.5d-6) then
        tmp = x / (1.0d0 + (a * b))
    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 = 0.5 * (a * (a * (x * (b * b))));
	double tmp;
	if (y <= -22000000000000.0) {
		tmp = t_1;
	} else if (y <= 3.5e-6) {
		tmp = x / (1.0 + (a * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = 0.5 * (a * (a * (x * (b * b))))
	tmp = 0
	if y <= -22000000000000.0:
		tmp = t_1
	elif y <= 3.5e-6:
		tmp = x / (1.0 + (a * b))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(0.5 * Float64(a * Float64(a * Float64(x * Float64(b * b)))))
	tmp = 0.0
	if (y <= -22000000000000.0)
		tmp = t_1;
	elseif (y <= 3.5e-6)
		tmp = Float64(x / Float64(1.0 + Float64(a * b)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = 0.5 * (a * (a * (x * (b * b))));
	tmp = 0.0;
	if (y <= -22000000000000.0)
		tmp = t_1;
	elseif (y <= 3.5e-6)
		tmp = x / (1.0 + (a * b));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.5 * N[(a * N[(a * N[(x * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -22000000000000.0], t$95$1, If[LessEqual[y, 3.5e-6], N[(x / N[(1.0 + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 0.5 \cdot \left(a \cdot \left(a \cdot \left(x \cdot \left(b \cdot b\right)\right)\right)\right)\\
\mathbf{if}\;y \leq -22000000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 3.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{x}{1 + a \cdot b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.2e13 or 3.49999999999999995e-6 < y

    1. Initial program 98.4%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6436.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified36.5%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6420.9%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified20.9%

      \[\leadsto x \cdot \color{blue}{\left(1 + b \cdot \left(0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right)\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right) - a\right) \cdot \color{blue}{b}\right)\right)\right) \]
      2. flip3--N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)} \cdot b\right)\right)\right) \]
      3. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(\frac{\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b}{\color{blue}{\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)}}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left({\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}^{3} - {a}^{3}\right) \cdot b\right), \color{blue}{\left(\left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + \left(a \cdot a + \left(\frac{1}{2} \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) \cdot a\right)\right)}\right)\right)\right) \]
    10. Applied egg-rr5.7%

      \[\leadsto x \cdot \left(1 + \color{blue}{\frac{\left(\left(\left(b \cdot \left(b \cdot b\right)\right) \cdot 0.125\right) \cdot \left(\left(a \cdot a\right) \cdot \left(\left(a \cdot a\right) \cdot \left(a \cdot a\right)\right)\right) - a \cdot \left(a \cdot a\right)\right) \cdot b}{0.25 \cdot \left(\left(b \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot \left(a \cdot a\right)\right)\right) + a \cdot \left(a + 0.5 \cdot \left(b \cdot \left(a \cdot a\right)\right)\right)}}\right) \]
    11. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left({a}^{2} \cdot \left({b}^{2} \cdot x\right)\right)} \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\left({a}^{2} \cdot \left({b}^{2} \cdot x\right)\right)}\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left({b}^{2} \cdot x\right) \cdot \color{blue}{{a}^{2}}\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left({b}^{2} \cdot x\right) \cdot \left(a \cdot \color{blue}{a}\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(\left({b}^{2} \cdot x\right) \cdot a\right) \cdot \color{blue}{a}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \left(\left(a \cdot \left({b}^{2} \cdot x\right)\right) \cdot a\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\left(a \cdot \left({b}^{2} \cdot x\right)\right), \color{blue}{a}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \left({b}^{2} \cdot x\right)\right), a\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \left(x \cdot {b}^{2}\right)\right), a\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(x, \left({b}^{2}\right)\right)\right), a\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(x, \left(b \cdot b\right)\right)\right), a\right)\right) \]
      11. *-lowering-*.f6443.0%

        \[\leadsto \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(b, b\right)\right)\right), a\right)\right) \]
    13. Simplified43.0%

      \[\leadsto \color{blue}{0.5 \cdot \left(\left(a \cdot \left(x \cdot \left(b \cdot b\right)\right)\right) \cdot a\right)} \]

    if -2.2e13 < y < 3.49999999999999995e-6

    1. Initial program 97.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6480.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified80.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto x \cdot \frac{e^{0}}{\color{blue}{e^{a \cdot b}}} \]
      2. 1-expN/A

        \[\leadsto x \cdot \frac{1}{e^{\color{blue}{a \cdot b}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(e^{a \cdot b}\right)}\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\left(a \cdot b\right)\right)\right) \]
      6. *-lowering-*.f6480.6%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, b\right)\right)\right) \]
    7. Applied egg-rr80.6%

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

      \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + a \cdot b\right)}\right) \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(a \cdot b + \color{blue}{1}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{1}\right)\right) \]
      3. *-lowering-*.f6449.6%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), 1\right)\right) \]
    10. Simplified49.6%

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

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

Alternative 15: 33.4% accurate, 18.5× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;0 - x \cdot \left(a \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.69999999999999999e206

    1. Initial program 100.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - t \cdot y\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(t \cdot y\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot t\right)\right)\right)\right) \]
      5. *-lowering-*.f6486.2%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, t\right)\right)\right)\right) \]
    5. Simplified86.2%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(t \cdot y\right)\right)}\right) \]
    7. Step-by-step derivation
      1. neg-mul-1N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{t \cdot y}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(t \cdot y\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(y \cdot \color{blue}{t}\right)\right)\right) \]
      5. *-lowering-*.f6439.6%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{t}\right)\right)\right) \]
    8. Simplified39.6%

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

    if -1.69999999999999999e206 < y < 9e15

    1. Initial program 97.7%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6472.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified72.5%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto x \cdot \frac{e^{0}}{\color{blue}{e^{a \cdot b}}} \]
      2. 1-expN/A

        \[\leadsto x \cdot \frac{1}{e^{\color{blue}{a \cdot b}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{x}{\color{blue}{e^{a \cdot b}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(e^{a \cdot b}\right)}\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\left(a \cdot b\right)\right)\right) \]
      6. *-lowering-*.f6472.5%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(a, b\right)\right)\right) \]
    7. Applied egg-rr72.5%

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

      \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(1 + a \cdot b\right)}\right) \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \left(a \cdot b + \color{blue}{1}\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\left(a \cdot b\right), \color{blue}{1}\right)\right) \]
      3. *-lowering-*.f6441.2%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, b\right), 1\right)\right) \]
    10. Simplified41.2%

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

    if 9e15 < y

    1. Initial program 96.8%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6432.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified32.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6418.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified18.4%

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

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)}\right) \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{a \cdot b}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(b \cdot \color{blue}{a}\right)\right)\right) \]
      5. *-lowering-*.f6415.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{a}\right)\right)\right) \]
    11. Simplified15.4%

      \[\leadsto x \cdot \color{blue}{\left(1 - b \cdot a\right)} \]
    12. Taylor expanded in b around inf

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right) \]
    13. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\mathsf{neg}\left(a \cdot b\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{a \cdot b}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
      4. *-lowering-*.f6434.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right) \]
    14. Simplified34.0%

      \[\leadsto x \cdot \color{blue}{\left(0 - a \cdot b\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification39.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+206}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{1 + a \cdot b}\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 33.8% accurate, 18.5× speedup?

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

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

\mathbf{elif}\;y \leq 1.8 \cdot 10^{-27}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;0 - x \cdot \left(a \cdot b\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.99999999999999962e68

    1. Initial program 100.0%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(t \cdot y\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - t \cdot y\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(t \cdot y\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y \cdot t\right)\right)\right)\right) \]
      5. *-lowering-*.f6467.1%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, t\right)\right)\right)\right) \]
    5. Simplified67.1%

      \[\leadsto x \cdot e^{\color{blue}{0 - y \cdot t}} \]
    6. Taylor expanded in y around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(t \cdot y\right)\right)}\right) \]
    7. Step-by-step derivation
      1. neg-mul-1N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(t \cdot y\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{t \cdot y}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(t \cdot y\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(y \cdot \color{blue}{t}\right)\right)\right) \]
      5. *-lowering-*.f6427.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(y, \color{blue}{t}\right)\right)\right) \]
    8. Simplified27.5%

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

    if -7.99999999999999962e68 < y < 1.7999999999999999e-27

    1. Initial program 97.2%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6478.7%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified78.7%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)}\right) \]
    7. Step-by-step derivation
      1. neg-mul-1N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{a \cdot b}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
      4. *-lowering-*.f6444.5%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right) \]
    8. Simplified44.5%

      \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]

    if 1.7999999999999999e-27 < y

    1. Initial program 97.2%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6434.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified34.4%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6417.8%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified17.8%

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

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)}\right) \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{a \cdot b}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(b \cdot \color{blue}{a}\right)\right)\right) \]
      5. *-lowering-*.f6413.8%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{a}\right)\right)\right) \]
    11. Simplified13.8%

      \[\leadsto x \cdot \color{blue}{\left(1 - b \cdot a\right)} \]
    12. Taylor expanded in b around inf

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right) \]
    13. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\mathsf{neg}\left(a \cdot b\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{a \cdot b}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
      4. *-lowering-*.f6431.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right) \]
    14. Simplified31.3%

      \[\leadsto x \cdot \color{blue}{\left(0 - a \cdot b\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification37.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+68}:\\ \;\;\;\;x \cdot \left(1 - y \cdot t\right)\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-27}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 27.2% accurate, 18.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 0 - x \cdot \left(a \cdot b\right)\\ \mathbf{if}\;y \leq -22000000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-100}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (- 0.0 (* x (* a b)))))
   (if (<= y -22000000000000.0) t_1 (if (<= y 1.08e-100) x t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 0.0 - (x * (a * b));
	double tmp;
	if (y <= -22000000000000.0) {
		tmp = t_1;
	} else if (y <= 1.08e-100) {
		tmp = x;
	} 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 = 0.0d0 - (x * (a * b))
    if (y <= (-22000000000000.0d0)) then
        tmp = t_1
    else if (y <= 1.08d-100) then
        tmp = x
    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 = 0.0 - (x * (a * b));
	double tmp;
	if (y <= -22000000000000.0) {
		tmp = t_1;
	} else if (y <= 1.08e-100) {
		tmp = x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = 0.0 - (x * (a * b))
	tmp = 0
	if y <= -22000000000000.0:
		tmp = t_1
	elif y <= 1.08e-100:
		tmp = x
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(0.0 - Float64(x * Float64(a * b)))
	tmp = 0.0
	if (y <= -22000000000000.0)
		tmp = t_1;
	elseif (y <= 1.08e-100)
		tmp = x;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = 0.0 - (x * (a * b));
	tmp = 0.0;
	if (y <= -22000000000000.0)
		tmp = t_1;
	elseif (y <= 1.08e-100)
		tmp = x;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.0 - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -22000000000000.0], t$95$1, If[LessEqual[y, 1.08e-100], x, t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 0 - x \cdot \left(a \cdot b\right)\\
\mathbf{if}\;y \leq -22000000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.08 \cdot 10^{-100}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.2e13 or 1.0800000000000001e-100 < y

    1. Initial program 98.6%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6439.6%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified39.6%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in b around 0

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
    7. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
      5. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
      11. *-lowering-*.f6422.4%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
    8. Simplified22.4%

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

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)}\right) \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{a \cdot b}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(b \cdot \color{blue}{a}\right)\right)\right) \]
      5. *-lowering-*.f6416.1%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{a}\right)\right)\right) \]
    11. Simplified16.1%

      \[\leadsto x \cdot \color{blue}{\left(1 - b \cdot a\right)} \]
    12. Taylor expanded in b around inf

      \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right) \]
    13. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(\mathsf{neg}\left(a \cdot b\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{a \cdot b}\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
      4. *-lowering-*.f6425.8%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right) \]
    14. Simplified25.8%

      \[\leadsto x \cdot \color{blue}{\left(0 - a \cdot b\right)} \]

    if -2.2e13 < y < 1.0800000000000001e-100

    1. Initial program 96.6%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6483.0%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified83.0%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x} \]
    7. Step-by-step derivation
      1. Simplified38.7%

        \[\leadsto \color{blue}{x} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification31.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -22000000000000:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{-100}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 18: 31.6% accurate, 26.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 6.6 \cdot 10^{-29}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= y 6.6e-29) (* x (- 1.0 (* a b))) (- 0.0 (* x (* a b)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (y <= 6.6e-29) {
    		tmp = x * (1.0 - (a * b));
    	} else {
    		tmp = 0.0 - (x * (a * 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 (y <= 6.6d-29) then
            tmp = x * (1.0d0 - (a * b))
        else
            tmp = 0.0d0 - (x * (a * 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 (y <= 6.6e-29) {
    		tmp = x * (1.0 - (a * b));
    	} else {
    		tmp = 0.0 - (x * (a * b));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b):
    	tmp = 0
    	if y <= 6.6e-29:
    		tmp = x * (1.0 - (a * b))
    	else:
    		tmp = 0.0 - (x * (a * b))
    	return tmp
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (y <= 6.6e-29)
    		tmp = Float64(x * Float64(1.0 - Float64(a * b)));
    	else
    		tmp = Float64(0.0 - Float64(x * Float64(a * b)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b)
    	tmp = 0.0;
    	if (y <= 6.6e-29)
    		tmp = x * (1.0 - (a * b));
    	else
    		tmp = 0.0 - (x * (a * b));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 6.6e-29], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.0 - N[(x * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y \leq 6.6 \cdot 10^{-29}:\\
    \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y < 6.60000000000000055e-29

      1. Initial program 97.9%

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

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
        2. neg-sub0N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
        4. *-lowering-*.f6468.6%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
      5. Simplified68.6%

        \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
      6. Taylor expanded in a around 0

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)}\right) \]
      7. Step-by-step derivation
        1. neg-mul-1N/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
        2. unsub-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{a \cdot b}\right)\right) \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
        4. *-lowering-*.f6437.2%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right) \]
      8. Simplified37.2%

        \[\leadsto x \cdot \color{blue}{\left(1 - a \cdot b\right)} \]

      if 6.60000000000000055e-29 < y

      1. Initial program 97.2%

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

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
        2. neg-sub0N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
        4. *-lowering-*.f6434.4%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
      5. Simplified34.4%

        \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
      6. Taylor expanded in b around 0

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right) \]
      7. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(b \cdot \left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)\right)}\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{\left(-1 \cdot a + \frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right)}\right)\right)\right) \]
        3. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \color{blue}{-1 \cdot a}\right)\right)\right)\right) \]
        4. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) + \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right)\right) \]
        5. unsub-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right) - \color{blue}{a}\right)\right)\right)\right) \]
        6. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\left(\frac{1}{2} \cdot \left({a}^{2} \cdot b\right)\right), \color{blue}{a}\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({a}^{2} \cdot b\right)\right), a\right)\right)\right)\right) \]
        8. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(b \cdot {a}^{2}\right)\right), a\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left({a}^{2}\right)\right)\right), a\right)\right)\right)\right) \]
        10. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \left(a \cdot a\right)\right)\right), a\right)\right)\right)\right) \]
        11. *-lowering-*.f6417.8%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(b, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(a, a\right)\right)\right), a\right)\right)\right)\right) \]
      8. Simplified17.8%

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

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -1 \cdot \left(a \cdot b\right)\right)}\right) \]
      10. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(1 + \left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
        2. unsub-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(1 - \color{blue}{a \cdot b}\right)\right) \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \left(b \cdot \color{blue}{a}\right)\right)\right) \]
        5. *-lowering-*.f6413.8%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(b, \color{blue}{a}\right)\right)\right) \]
      11. Simplified13.8%

        \[\leadsto x \cdot \color{blue}{\left(1 - b \cdot a\right)} \]
      12. Taylor expanded in b around inf

        \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right) \]
      13. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(\mathsf{neg}\left(a \cdot b\right)\right)\right) \]
        2. neg-sub0N/A

          \[\leadsto \mathsf{*.f64}\left(x, \left(0 - \color{blue}{a \cdot b}\right)\right) \]
        3. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(0, \color{blue}{\left(a \cdot b\right)}\right)\right) \]
        4. *-lowering-*.f6431.3%

          \[\leadsto \mathsf{*.f64}\left(x, \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, \color{blue}{b}\right)\right)\right) \]
      14. Simplified31.3%

        \[\leadsto x \cdot \color{blue}{\left(0 - a \cdot b\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification35.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 6.6 \cdot 10^{-29}:\\ \;\;\;\;x \cdot \left(1 - a \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;0 - x \cdot \left(a \cdot b\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 19: 19.5% accurate, 315.0× speedup?

    \[\begin{array}{l} \\ x \end{array} \]
    (FPCore (x y z t a b) :precision binary64 x)
    double code(double x, double y, double z, double t, double a, double b) {
    	return x;
    }
    
    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
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b) {
    	return x;
    }
    
    def code(x, y, z, t, a, b):
    	return x
    
    function code(x, y, z, t, a, b)
    	return x
    end
    
    function tmp = code(x, y, z, t, a, b)
    	tmp = x;
    end
    
    code[x_, y_, z_, t_, a_, b_] := x
    
    \begin{array}{l}
    
    \\
    x
    \end{array}
    
    Derivation
    1. Initial program 97.7%

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

      \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\color{blue}{\left(-1 \cdot \left(a \cdot b\right)\right)}\right)\right) \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(a \cdot b\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\left(0 - a \cdot b\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(a \cdot b\right)\right)\right)\right) \]
      4. *-lowering-*.f6459.1%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, b\right)\right)\right)\right) \]
    5. Simplified59.1%

      \[\leadsto x \cdot e^{\color{blue}{0 - a \cdot b}} \]
    6. Taylor expanded in a around 0

      \[\leadsto \color{blue}{x} \]
    7. Step-by-step derivation
      1. Simplified20.1%

        \[\leadsto \color{blue}{x} \]
      2. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2024160 
      (FPCore (x y z t a b)
        :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
        :precision binary64
        (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))