
(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:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (x y z t a b) :precision binary64 (* x (exp (fma a (- (log1p (- z)) b) (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(a, (log1p(-z) - b), (y * (log(z) - t))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(a, Float64(log1p(Float64(-z)) - b), Float64(y * Float64(log(z) - t))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(a, \mathsf{log1p}\left(-z\right) - b, y \cdot \left(\log z - t\right)\right)}
\end{array}
Initial program 94.8%
+-commutative94.8%
fma-def95.2%
sub-neg95.2%
log1p-def100.0%
Simplified100.0%
Final simplification100.0%
(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}
Initial program 94.8%
Final simplification94.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -960.0) (not (<= y 2.8e-5))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -960.0) || !(y <= 2.8e-5)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * (log1p(-z) - b)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -960.0) || !(y <= 2.8e-5)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * (Math.log1p(-z) - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -960.0) or not (y <= 2.8e-5): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * (math.log1p(-z) - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -960.0) || !(y <= 2.8e-5)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(log1p(Float64(-z)) - b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -960.0], N[Not[LessEqual[y, 2.8e-5]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -960 \lor \neg \left(y \leq 2.8 \cdot 10^{-5}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if y < -960 or 2.79999999999999996e-5 < y Initial program 97.7%
Taylor expanded in y around inf 91.6%
if -960 < y < 2.79999999999999996e-5Initial program 91.9%
Taylor expanded in y around 0 81.9%
sub-neg81.9%
neg-mul-181.9%
log1p-def89.9%
neg-mul-189.9%
Simplified89.9%
Final simplification90.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -960.0) (not (<= y 1.45e-5))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (- z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -960.0) || !(y <= 1.45e-5)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * (-z - 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 <= (-960.0d0)) .or. (.not. (y <= 1.45d-5))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((a * (-z - 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 <= -960.0) || !(y <= 1.45e-5)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * (-z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -960.0) or not (y <= 1.45e-5): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * (-z - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -960.0) || !(y <= 1.45e-5)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -960.0) || ~((y <= 1.45e-5))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * (-z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -960.0], N[Not[LessEqual[y, 1.45e-5]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -960 \lor \neg \left(y \leq 1.45 \cdot 10^{-5}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if y < -960 or 1.45e-5 < y Initial program 97.7%
Taylor expanded in y around inf 91.6%
if -960 < y < 1.45e-5Initial program 91.9%
Taylor expanded in y around 0 81.9%
sub-neg81.9%
neg-mul-181.9%
log1p-def89.9%
neg-mul-189.9%
Simplified89.9%
Taylor expanded in z around 0 89.7%
associate-*r*89.7%
neg-mul-189.7%
associate-*r*89.7%
neg-mul-189.7%
distribute-lft-out89.7%
Simplified89.7%
Final simplification90.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (- (* y t))))) (t_2 (* x (pow z y))))
(if (<= y -2.2e+178)
t_2
(if (<= y -7700000000000.0)
t_1
(if (<= y 6.8e+47)
(* x (exp (* a (- b))))
(if (or (<= y 6.5e+79) (not (<= y 4e+132))) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp(-(y * t));
double t_2 = x * pow(z, y);
double tmp;
if (y <= -2.2e+178) {
tmp = t_2;
} else if (y <= -7700000000000.0) {
tmp = t_1;
} else if (y <= 6.8e+47) {
tmp = x * exp((a * -b));
} else if ((y <= 6.5e+79) || !(y <= 4e+132)) {
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 * exp(-(y * t))
t_2 = x * (z ** y)
if (y <= (-2.2d+178)) then
tmp = t_2
else if (y <= (-7700000000000.0d0)) then
tmp = t_1
else if (y <= 6.8d+47) then
tmp = x * exp((a * -b))
else if ((y <= 6.5d+79) .or. (.not. (y <= 4d+132))) 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.exp(-(y * t));
double t_2 = x * Math.pow(z, y);
double tmp;
if (y <= -2.2e+178) {
tmp = t_2;
} else if (y <= -7700000000000.0) {
tmp = t_1;
} else if (y <= 6.8e+47) {
tmp = x * Math.exp((a * -b));
} else if ((y <= 6.5e+79) || !(y <= 4e+132)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp(-(y * t)) t_2 = x * math.pow(z, y) tmp = 0 if y <= -2.2e+178: tmp = t_2 elif y <= -7700000000000.0: tmp = t_1 elif y <= 6.8e+47: tmp = x * math.exp((a * -b)) elif (y <= 6.5e+79) or not (y <= 4e+132): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(-Float64(y * t)))) t_2 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -2.2e+178) tmp = t_2; elseif (y <= -7700000000000.0) tmp = t_1; elseif (y <= 6.8e+47) tmp = Float64(x * exp(Float64(a * Float64(-b)))); elseif ((y <= 6.5e+79) || !(y <= 4e+132)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp(-(y * t)); t_2 = x * (z ^ y); tmp = 0.0; if (y <= -2.2e+178) tmp = t_2; elseif (y <= -7700000000000.0) tmp = t_1; elseif (y <= 6.8e+47) tmp = x * exp((a * -b)); elseif ((y <= 6.5e+79) || ~((y <= 4e+132))) 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[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e+178], t$95$2, If[LessEqual[y, -7700000000000.0], t$95$1, If[LessEqual[y, 6.8e+47], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 6.5e+79], N[Not[LessEqual[y, 4e+132]], $MachinePrecision]], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{-y \cdot t}\\
t_2 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+178}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -7700000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+47}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+79} \lor \neg \left(y \leq 4 \cdot 10^{+132}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.19999999999999997e178 or 6.7999999999999996e47 < y < 6.49999999999999954e79 or 3.99999999999999996e132 < y Initial program 98.6%
Taylor expanded in y around inf 91.8%
Taylor expanded in t around 0 83.6%
if -2.19999999999999997e178 < y < -7.7e12 or 6.49999999999999954e79 < y < 3.99999999999999996e132Initial program 97.7%
Taylor expanded in t around inf 75.6%
mul-1-neg75.6%
distribute-rgt-neg-out75.6%
Simplified75.6%
if -7.7e12 < y < 6.7999999999999996e47Initial program 91.9%
Taylor expanded in b around inf 79.9%
mul-1-neg79.9%
*-commutative79.9%
distribute-rgt-neg-in79.9%
Simplified79.9%
Final simplification80.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (exp (- (* y t))))) (t_2 (* x (pow z y))))
(if (<= y -1.9e+175)
t_2
(if (<= y -4150000000000.0)
t_1
(if (<= y 2.65e+48)
(* x (exp (* a (- (- z) b))))
(if (or (<= y 8.2e+75) (not (<= y 5.8e+132))) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * exp(-(y * t));
double t_2 = x * pow(z, y);
double tmp;
if (y <= -1.9e+175) {
tmp = t_2;
} else if (y <= -4150000000000.0) {
tmp = t_1;
} else if (y <= 2.65e+48) {
tmp = x * exp((a * (-z - b)));
} else if ((y <= 8.2e+75) || !(y <= 5.8e+132)) {
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 * exp(-(y * t))
t_2 = x * (z ** y)
if (y <= (-1.9d+175)) then
tmp = t_2
else if (y <= (-4150000000000.0d0)) then
tmp = t_1
else if (y <= 2.65d+48) then
tmp = x * exp((a * (-z - b)))
else if ((y <= 8.2d+75) .or. (.not. (y <= 5.8d+132))) 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.exp(-(y * t));
double t_2 = x * Math.pow(z, y);
double tmp;
if (y <= -1.9e+175) {
tmp = t_2;
} else if (y <= -4150000000000.0) {
tmp = t_1;
} else if (y <= 2.65e+48) {
tmp = x * Math.exp((a * (-z - b)));
} else if ((y <= 8.2e+75) || !(y <= 5.8e+132)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * math.exp(-(y * t)) t_2 = x * math.pow(z, y) tmp = 0 if y <= -1.9e+175: tmp = t_2 elif y <= -4150000000000.0: tmp = t_1 elif y <= 2.65e+48: tmp = x * math.exp((a * (-z - b))) elif (y <= 8.2e+75) or not (y <= 5.8e+132): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * exp(Float64(-Float64(y * t)))) t_2 = Float64(x * (z ^ y)) tmp = 0.0 if (y <= -1.9e+175) tmp = t_2; elseif (y <= -4150000000000.0) tmp = t_1; elseif (y <= 2.65e+48) tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); elseif ((y <= 8.2e+75) || !(y <= 5.8e+132)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * exp(-(y * t)); t_2 = x * (z ^ y); tmp = 0.0; if (y <= -1.9e+175) tmp = t_2; elseif (y <= -4150000000000.0) tmp = t_1; elseif (y <= 2.65e+48) tmp = x * exp((a * (-z - b))); elseif ((y <= 8.2e+75) || ~((y <= 5.8e+132))) 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[Exp[(-N[(y * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+175], t$95$2, If[LessEqual[y, -4150000000000.0], t$95$1, If[LessEqual[y, 2.65e+48], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 8.2e+75], N[Not[LessEqual[y, 5.8e+132]], $MachinePrecision]], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot e^{-y \cdot t}\\
t_2 := x \cdot {z}^{y}\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+175}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -4150000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{+48}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+75} \lor \neg \left(y \leq 5.8 \cdot 10^{+132}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.8999999999999998e175 or 2.65e48 < y < 8.1999999999999997e75 or 5.7999999999999997e132 < y Initial program 98.6%
Taylor expanded in y around inf 91.8%
Taylor expanded in t around 0 83.6%
if -1.8999999999999998e175 < y < -4.15e12 or 8.1999999999999997e75 < y < 5.7999999999999997e132Initial program 97.7%
Taylor expanded in t around inf 75.6%
mul-1-neg75.6%
distribute-rgt-neg-out75.6%
Simplified75.6%
if -4.15e12 < y < 2.65e48Initial program 91.9%
Taylor expanded in y around 0 80.1%
sub-neg80.1%
neg-mul-180.1%
log1p-def88.0%
neg-mul-188.0%
Simplified88.0%
Taylor expanded in z around 0 87.9%
associate-*r*87.9%
neg-mul-187.9%
associate-*r*87.9%
neg-mul-187.9%
distribute-lft-out87.9%
Simplified87.9%
Final simplification84.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.05e-17) (not (<= y 1.3e+48))) (* x (pow z y)) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.05e-17) || !(y <= 1.3e+48)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((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.05d-17)) .or. (.not. (y <= 1.3d+48))) then
tmp = x * (z ** y)
else
tmp = x * exp((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.05e-17) || !(y <= 1.3e+48)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.05e-17) or not (y <= 1.3e+48): tmp = x * math.pow(z, y) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.05e-17) || !(y <= 1.3e+48)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(a * Float64(-b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.05e-17) || ~((y <= 1.3e+48))) tmp = x * (z ^ y); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.05e-17], N[Not[LessEqual[y, 1.3e+48]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-17} \lor \neg \left(y \leq 1.3 \cdot 10^{+48}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -1.04999999999999996e-17 or 1.29999999999999998e48 < y Initial program 98.3%
Taylor expanded in y around inf 92.6%
Taylor expanded in t around 0 72.9%
if -1.04999999999999996e-17 < y < 1.29999999999999998e48Initial program 91.7%
Taylor expanded in b around inf 79.9%
mul-1-neg79.9%
*-commutative79.9%
distribute-rgt-neg-in79.9%
Simplified79.9%
Final simplification76.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.35e-31) (not (<= y 0.0016))) (* x (pow z y)) (* x (- 1.0 (* b (- a (* b (* a (* a 0.5)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.35e-31) || !(y <= 0.0016)) {
tmp = x * pow(z, y);
} else {
tmp = x * (1.0 - (b * (a - (b * (a * (a * 0.5))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.35d-31)) .or. (.not. (y <= 0.0016d0))) then
tmp = x * (z ** y)
else
tmp = x * (1.0d0 - (b * (a - (b * (a * (a * 0.5d0))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.35e-31) || !(y <= 0.0016)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * (1.0 - (b * (a - (b * (a * (a * 0.5))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.35e-31) or not (y <= 0.0016): tmp = x * math.pow(z, y) else: tmp = x * (1.0 - (b * (a - (b * (a * (a * 0.5)))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.35e-31) || !(y <= 0.0016)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * Float64(1.0 - Float64(b * Float64(a - Float64(b * Float64(a * Float64(a * 0.5))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.35e-31) || ~((y <= 0.0016))) tmp = x * (z ^ y); else tmp = x * (1.0 - (b * (a - (b * (a * (a * 0.5)))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.35e-31], N[Not[LessEqual[y, 0.0016]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(b * N[(a - N[(b * N[(a * N[(a * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{-31} \lor \neg \left(y \leq 0.0016\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - b \cdot \left(a - b \cdot \left(a \cdot \left(a \cdot 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if y < -2.34999999999999993e-31 or 0.00160000000000000008 < y Initial program 97.8%
Taylor expanded in y around inf 89.1%
Taylor expanded in t around 0 68.7%
if -2.34999999999999993e-31 < y < 0.00160000000000000008Initial program 91.4%
Taylor expanded in b around inf 81.5%
mul-1-neg81.5%
*-commutative81.5%
distribute-rgt-neg-in81.5%
Simplified81.5%
Taylor expanded in b around 0 53.7%
+-commutative53.7%
associate-+r+53.7%
mul-1-neg53.7%
unsub-neg53.7%
*-commutative53.7%
associate-*r*53.7%
unpow253.7%
unpow253.7%
Simplified53.7%
associate-+l-53.7%
*-commutative53.7%
associate-*r*57.2%
distribute-rgt-out--57.3%
*-commutative57.3%
associate-*l*57.3%
Applied egg-rr57.3%
Final simplification63.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* 0.5 (* a a)) (* x (* b b)))))
(if (<= y -6e-41)
t_1
(if (<= y -1.1e-160)
(- x (* y (* x t)))
(if (<= y 11500000.0)
(* x (- 1.0 (* b (- a (* b (* a (* a 0.5)))))))
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 <= -6e-41) {
tmp = t_1;
} else if (y <= -1.1e-160) {
tmp = x - (y * (x * t));
} else if (y <= 11500000.0) {
tmp = x * (1.0 - (b * (a - (b * (a * (a * 0.5))))));
} 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 <= (-6d-41)) then
tmp = t_1
else if (y <= (-1.1d-160)) then
tmp = x - (y * (x * t))
else if (y <= 11500000.0d0) then
tmp = x * (1.0d0 - (b * (a - (b * (a * (a * 0.5d0))))))
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 <= -6e-41) {
tmp = t_1;
} else if (y <= -1.1e-160) {
tmp = x - (y * (x * t));
} else if (y <= 11500000.0) {
tmp = x * (1.0 - (b * (a - (b * (a * (a * 0.5))))));
} 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 <= -6e-41: tmp = t_1 elif y <= -1.1e-160: tmp = x - (y * (x * t)) elif y <= 11500000.0: tmp = x * (1.0 - (b * (a - (b * (a * (a * 0.5)))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(0.5 * Float64(a * a)) * Float64(x * Float64(b * b))) tmp = 0.0 if (y <= -6e-41) tmp = t_1; elseif (y <= -1.1e-160) tmp = Float64(x - Float64(y * Float64(x * t))); elseif (y <= 11500000.0) tmp = Float64(x * Float64(1.0 - Float64(b * Float64(a - Float64(b * Float64(a * Float64(a * 0.5))))))); 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 <= -6e-41) tmp = t_1; elseif (y <= -1.1e-160) tmp = x - (y * (x * t)); elseif (y <= 11500000.0) tmp = x * (1.0 - (b * (a - (b * (a * (a * 0.5)))))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(x * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e-41], t$95$1, If[LessEqual[y, -1.1e-160], N[(x - N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 11500000.0], N[(x * N[(1.0 - N[(b * N[(a - N[(b * N[(a * N[(a * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\
\mathbf{if}\;y \leq -6 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-160}:\\
\;\;\;\;x - y \cdot \left(x \cdot t\right)\\
\mathbf{elif}\;y \leq 11500000:\\
\;\;\;\;x \cdot \left(1 - b \cdot \left(a - b \cdot \left(a \cdot \left(a \cdot 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.99999999999999978e-41 or 1.15e7 < y Initial program 98.5%
Taylor expanded in b around inf 40.5%
mul-1-neg40.5%
*-commutative40.5%
distribute-rgt-neg-in40.5%
Simplified40.5%
Taylor expanded in b around 0 22.5%
+-commutative22.5%
associate-+r+22.5%
mul-1-neg22.5%
unsub-neg22.5%
*-commutative22.5%
associate-*r*22.5%
unpow222.5%
unpow222.5%
Simplified22.5%
Taylor expanded in b around inf 35.0%
associate-*r*35.0%
unpow235.0%
unpow235.0%
*-commutative35.0%
Simplified35.0%
if -5.99999999999999978e-41 < y < -1.1e-160Initial program 99.9%
Taylor expanded in t around inf 68.1%
mul-1-neg68.1%
distribute-rgt-neg-out68.1%
Simplified68.1%
Taylor expanded in y around 0 52.1%
+-commutative52.1%
mul-1-neg52.1%
unsub-neg52.1%
Simplified52.1%
if -1.1e-160 < y < 1.15e7Initial program 89.2%
Taylor expanded in b around inf 79.7%
mul-1-neg79.7%
*-commutative79.7%
distribute-rgt-neg-in79.7%
Simplified79.7%
Taylor expanded in b around 0 53.4%
+-commutative53.4%
associate-+r+53.4%
mul-1-neg53.4%
unsub-neg53.4%
*-commutative53.4%
associate-*r*53.4%
unpow253.4%
unpow253.4%
Simplified53.4%
associate-+l-53.4%
*-commutative53.4%
associate-*r*57.4%
distribute-rgt-out--57.5%
*-commutative57.5%
associate-*l*57.5%
Applied egg-rr57.5%
Final simplification45.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9.5e-30) (not (<= y 11500000.0))) (* (* 0.5 (* a a)) (* x (* b b))) (* x (- 1.0 (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9.5e-30) || !(y <= 11500000.0)) {
tmp = (0.5 * (a * a)) * (x * (b * b));
} else {
tmp = x * (1.0 - (a * (z + 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.5d-30)) .or. (.not. (y <= 11500000.0d0))) then
tmp = (0.5d0 * (a * a)) * (x * (b * b))
else
tmp = x * (1.0d0 - (a * (z + 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.5e-30) || !(y <= 11500000.0)) {
tmp = (0.5 * (a * a)) * (x * (b * b));
} else {
tmp = x * (1.0 - (a * (z + b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9.5e-30) or not (y <= 11500000.0): tmp = (0.5 * (a * a)) * (x * (b * b)) else: tmp = x * (1.0 - (a * (z + b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9.5e-30) || !(y <= 11500000.0)) tmp = Float64(Float64(0.5 * Float64(a * a)) * Float64(x * Float64(b * b))); else tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -9.5e-30) || ~((y <= 11500000.0))) tmp = (0.5 * (a * a)) * (x * (b * b)); else tmp = x * (1.0 - (a * (z + b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9.5e-30], N[Not[LessEqual[y, 11500000.0]], $MachinePrecision]], N[(N[(0.5 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(x * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-30} \lor \neg \left(y \leq 11500000\right):\\
\;\;\;\;\left(0.5 \cdot \left(a \cdot a\right)\right) \cdot \left(x \cdot \left(b \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\end{array}
\end{array}
if y < -9.49999999999999939e-30 or 1.15e7 < y Initial program 98.5%
Taylor expanded in b around inf 39.6%
mul-1-neg39.6%
*-commutative39.6%
distribute-rgt-neg-in39.6%
Simplified39.6%
Taylor expanded in b around 0 22.0%
+-commutative22.0%
associate-+r+22.0%
mul-1-neg22.0%
unsub-neg22.0%
*-commutative22.0%
associate-*r*22.0%
unpow222.0%
unpow222.0%
Simplified22.0%
Taylor expanded in b around inf 34.8%
associate-*r*34.8%
unpow234.8%
unpow234.8%
*-commutative34.8%
Simplified34.8%
if -9.49999999999999939e-30 < y < 1.15e7Initial program 90.9%
Taylor expanded in y around 0 80.7%
sub-neg80.7%
neg-mul-180.7%
log1p-def89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in z around 0 89.6%
associate-*r*89.6%
neg-mul-189.6%
associate-*r*89.6%
neg-mul-189.6%
distribute-lft-out89.6%
Simplified89.6%
Taylor expanded in a around 0 48.4%
+-commutative48.4%
mul-1-neg48.4%
unsub-neg48.4%
+-commutative48.4%
Simplified48.4%
Final simplification41.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- x) (* a b))))
(if (<= a -3.4e+171)
t_1
(if (<= a -1.4e+42)
(* x (- (* y t)))
(if (<= a -1.36e-28) t_1 (if (<= a 6.2e+49) x (* a (* x (- b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -x * (a * b);
double tmp;
if (a <= -3.4e+171) {
tmp = t_1;
} else if (a <= -1.4e+42) {
tmp = x * -(y * t);
} else if (a <= -1.36e-28) {
tmp = t_1;
} else if (a <= 6.2e+49) {
tmp = x;
} else {
tmp = a * (x * -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) :: t_1
real(8) :: tmp
t_1 = -x * (a * b)
if (a <= (-3.4d+171)) then
tmp = t_1
else if (a <= (-1.4d+42)) then
tmp = x * -(y * t)
else if (a <= (-1.36d-28)) then
tmp = t_1
else if (a <= 6.2d+49) then
tmp = x
else
tmp = a * (x * -b)
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 * (a * b);
double tmp;
if (a <= -3.4e+171) {
tmp = t_1;
} else if (a <= -1.4e+42) {
tmp = x * -(y * t);
} else if (a <= -1.36e-28) {
tmp = t_1;
} else if (a <= 6.2e+49) {
tmp = x;
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -x * (a * b) tmp = 0 if a <= -3.4e+171: tmp = t_1 elif a <= -1.4e+42: tmp = x * -(y * t) elif a <= -1.36e-28: tmp = t_1 elif a <= 6.2e+49: tmp = x else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-x) * Float64(a * b)) tmp = 0.0 if (a <= -3.4e+171) tmp = t_1; elseif (a <= -1.4e+42) tmp = Float64(x * Float64(-Float64(y * t))); elseif (a <= -1.36e-28) tmp = t_1; elseif (a <= 6.2e+49) tmp = x; else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -x * (a * b); tmp = 0.0; if (a <= -3.4e+171) tmp = t_1; elseif (a <= -1.4e+42) tmp = x * -(y * t); elseif (a <= -1.36e-28) tmp = t_1; elseif (a <= 6.2e+49) tmp = x; else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-x) * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.4e+171], t$95$1, If[LessEqual[a, -1.4e+42], N[(x * (-N[(y * t), $MachinePrecision])), $MachinePrecision], If[LessEqual[a, -1.36e-28], t$95$1, If[LessEqual[a, 6.2e+49], x, N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-x\right) \cdot \left(a \cdot b\right)\\
\mathbf{if}\;a \leq -3.4 \cdot 10^{+171}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.4 \cdot 10^{+42}:\\
\;\;\;\;x \cdot \left(-y \cdot t\right)\\
\mathbf{elif}\;a \leq -1.36 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{+49}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if a < -3.4000000000000001e171 or -1.4e42 < a < -1.35999999999999989e-28Initial program 95.8%
Taylor expanded in b around inf 77.2%
mul-1-neg77.2%
*-commutative77.2%
distribute-rgt-neg-in77.2%
Simplified77.2%
Taylor expanded in b around 0 35.6%
mul-1-neg35.6%
unsub-neg35.6%
*-commutative35.6%
Simplified35.6%
Taylor expanded in b around inf 33.8%
mul-1-neg33.8%
associate-*r*37.8%
Simplified37.8%
if -3.4000000000000001e171 < a < -1.4e42Initial program 83.7%
Taylor expanded in t around inf 39.2%
mul-1-neg39.2%
distribute-rgt-neg-out39.2%
Simplified39.2%
Taylor expanded in y around 0 11.4%
+-commutative11.4%
mul-1-neg11.4%
unsub-neg11.4%
Simplified11.4%
Taylor expanded in y around inf 23.2%
mul-1-neg23.2%
associate-*r*27.4%
distribute-rgt-neg-in27.4%
Simplified27.4%
if -1.35999999999999989e-28 < a < 6.19999999999999985e49Initial program 99.5%
Taylor expanded in b around inf 49.2%
mul-1-neg49.2%
*-commutative49.2%
distribute-rgt-neg-in49.2%
Simplified49.2%
Taylor expanded in b around 0 31.3%
if 6.19999999999999985e49 < a Initial program 89.2%
Taylor expanded in b around inf 64.7%
mul-1-neg64.7%
*-commutative64.7%
distribute-rgt-neg-in64.7%
Simplified64.7%
Taylor expanded in b around 0 32.3%
mul-1-neg32.3%
unsub-neg32.3%
*-commutative32.3%
Simplified32.3%
Taylor expanded in b around inf 32.1%
mul-1-neg32.1%
distribute-rgt-neg-in32.1%
Simplified32.1%
Final simplification32.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.5e+56) (* x (- (* y t))) (if (<= y 1.85e-6) (* x (- 1.0 (* a (+ z b)))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.5e+56) {
tmp = x * -(y * t);
} else if (y <= 1.85e-6) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = a * (x * -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.5d+56)) then
tmp = x * -(y * t)
else if (y <= 1.85d-6) then
tmp = x * (1.0d0 - (a * (z + b)))
else
tmp = a * (x * -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.5e+56) {
tmp = x * -(y * t);
} else if (y <= 1.85e-6) {
tmp = x * (1.0 - (a * (z + b)));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.5e+56: tmp = x * -(y * t) elif y <= 1.85e-6: tmp = x * (1.0 - (a * (z + b))) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.5e+56) tmp = Float64(x * Float64(-Float64(y * t))); elseif (y <= 1.85e-6) tmp = Float64(x * Float64(1.0 - Float64(a * Float64(z + b)))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.5e+56) tmp = x * -(y * t); elseif (y <= 1.85e-6) tmp = x * (1.0 - (a * (z + b))); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.5e+56], N[(x * (-N[(y * t), $MachinePrecision])), $MachinePrecision], If[LessEqual[y, 1.85e-6], N[(x * N[(1.0 - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+56}:\\
\;\;\;\;x \cdot \left(-y \cdot t\right)\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \left(1 - a \cdot \left(z + b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -6.5000000000000001e56Initial program 98.0%
Taylor expanded in t around inf 62.5%
mul-1-neg62.5%
distribute-rgt-neg-out62.5%
Simplified62.5%
Taylor expanded in y around 0 18.9%
+-commutative18.9%
mul-1-neg18.9%
unsub-neg18.9%
Simplified18.9%
Taylor expanded in y around inf 18.2%
mul-1-neg18.2%
associate-*r*22.0%
distribute-rgt-neg-in22.0%
Simplified22.0%
if -6.5000000000000001e56 < y < 1.8500000000000001e-6Initial program 91.9%
Taylor expanded in y around 0 78.1%
sub-neg78.1%
neg-mul-178.1%
log1p-def86.0%
neg-mul-186.0%
Simplified86.0%
Taylor expanded in z around 0 85.8%
associate-*r*85.8%
neg-mul-185.8%
associate-*r*85.8%
neg-mul-185.8%
distribute-lft-out85.8%
Simplified85.8%
Taylor expanded in a around 0 45.3%
+-commutative45.3%
mul-1-neg45.3%
unsub-neg45.3%
+-commutative45.3%
Simplified45.3%
if 1.8500000000000001e-6 < y Initial program 98.5%
Taylor expanded in b around inf 39.8%
mul-1-neg39.8%
*-commutative39.8%
distribute-rgt-neg-in39.8%
Simplified39.8%
Taylor expanded in b around 0 14.9%
mul-1-neg14.9%
unsub-neg14.9%
*-commutative14.9%
Simplified14.9%
Taylor expanded in b around inf 26.4%
mul-1-neg26.4%
distribute-rgt-neg-in26.4%
Simplified26.4%
Final simplification36.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.8e+56) (* x (- (* y t))) (if (<= y 0.0017) (* x (- 1.0 (* a b))) (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.8e+56) {
tmp = x * -(y * t);
} else if (y <= 0.0017) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -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.8d+56)) then
tmp = x * -(y * t)
else if (y <= 0.0017d0) then
tmp = x * (1.0d0 - (a * b))
else
tmp = a * (x * -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.8e+56) {
tmp = x * -(y * t);
} else if (y <= 0.0017) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.8e+56: tmp = x * -(y * t) elif y <= 0.0017: tmp = x * (1.0 - (a * b)) else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.8e+56) tmp = Float64(x * Float64(-Float64(y * t))); elseif (y <= 0.0017) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.8e+56) tmp = x * -(y * t); elseif (y <= 0.0017) tmp = x * (1.0 - (a * b)); else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.8e+56], N[(x * (-N[(y * t), $MachinePrecision])), $MachinePrecision], If[LessEqual[y, 0.0017], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+56}:\\
\;\;\;\;x \cdot \left(-y \cdot t\right)\\
\mathbf{elif}\;y \leq 0.0017:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if y < -6.80000000000000002e56Initial program 98.0%
Taylor expanded in t around inf 62.5%
mul-1-neg62.5%
distribute-rgt-neg-out62.5%
Simplified62.5%
Taylor expanded in y around 0 18.9%
+-commutative18.9%
mul-1-neg18.9%
unsub-neg18.9%
Simplified18.9%
Taylor expanded in y around inf 18.2%
mul-1-neg18.2%
associate-*r*22.0%
distribute-rgt-neg-in22.0%
Simplified22.0%
if -6.80000000000000002e56 < y < 0.00169999999999999991Initial program 92.0%
Taylor expanded in b around inf 76.7%
mul-1-neg76.7%
*-commutative76.7%
distribute-rgt-neg-in76.7%
Simplified76.7%
Taylor expanded in b around 0 44.4%
mul-1-neg44.4%
unsub-neg44.4%
*-commutative44.4%
Simplified44.4%
if 0.00169999999999999991 < y Initial program 98.5%
Taylor expanded in b around inf 40.4%
mul-1-neg40.4%
*-commutative40.4%
distribute-rgt-neg-in40.4%
Simplified40.4%
Taylor expanded in b around 0 15.1%
mul-1-neg15.1%
unsub-neg15.1%
*-commutative15.1%
Simplified15.1%
Taylor expanded in b around inf 26.8%
mul-1-neg26.8%
distribute-rgt-neg-in26.8%
Simplified26.8%
Final simplification35.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.2e+181) (not (<= a 1.05e+16))) (- (* b (* x a))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.2e+181) || !(a <= 1.05e+16)) {
tmp = -(b * (x * a));
} else {
tmp = x;
}
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 ((a <= (-3.2d+181)) .or. (.not. (a <= 1.05d+16))) then
tmp = -(b * (x * a))
else
tmp = x
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 ((a <= -3.2e+181) || !(a <= 1.05e+16)) {
tmp = -(b * (x * a));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.2e+181) or not (a <= 1.05e+16): tmp = -(b * (x * a)) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.2e+181) || !(a <= 1.05e+16)) tmp = Float64(-Float64(b * Float64(x * a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -3.2e+181) || ~((a <= 1.05e+16))) tmp = -(b * (x * a)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.2e+181], N[Not[LessEqual[a, 1.05e+16]], $MachinePrecision]], (-N[(b * N[(x * a), $MachinePrecision]), $MachinePrecision]), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+181} \lor \neg \left(a \leq 1.05 \cdot 10^{+16}\right):\\
\;\;\;\;-b \cdot \left(x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.2e181 or 1.05e16 < a Initial program 91.8%
Taylor expanded in b around inf 72.0%
mul-1-neg72.0%
*-commutative72.0%
distribute-rgt-neg-in72.0%
Simplified72.0%
Taylor expanded in b around 0 34.6%
mul-1-neg34.6%
unsub-neg34.6%
*-commutative34.6%
Simplified34.6%
Taylor expanded in b around inf 33.6%
mul-1-neg33.6%
associate-*r*33.6%
Simplified33.6%
Taylor expanded in a around 0 33.6%
associate-*r*33.6%
*-commutative33.6%
associate-*l*30.2%
Simplified30.2%
if -3.2e181 < a < 1.05e16Initial program 96.9%
Taylor expanded in b around inf 50.6%
mul-1-neg50.6%
*-commutative50.6%
distribute-rgt-neg-in50.6%
Simplified50.6%
Taylor expanded in b around 0 26.2%
Final simplification27.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -8.6e-25) (not (<= a 9.5e+84))) (* (- x) (* a b)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -8.6e-25) || !(a <= 9.5e+84)) {
tmp = -x * (a * b);
} else {
tmp = x;
}
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 ((a <= (-8.6d-25)) .or. (.not. (a <= 9.5d+84))) then
tmp = -x * (a * b)
else
tmp = x
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 ((a <= -8.6e-25) || !(a <= 9.5e+84)) {
tmp = -x * (a * b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -8.6e-25) or not (a <= 9.5e+84): tmp = -x * (a * b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -8.6e-25) || !(a <= 9.5e+84)) tmp = Float64(Float64(-x) * Float64(a * b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -8.6e-25) || ~((a <= 9.5e+84))) tmp = -x * (a * b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -8.6e-25], N[Not[LessEqual[a, 9.5e+84]], $MachinePrecision]], N[((-x) * N[(a * b), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{-25} \lor \neg \left(a \leq 9.5 \cdot 10^{+84}\right):\\
\;\;\;\;\left(-x\right) \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.59999999999999953e-25 or 9.49999999999999979e84 < a Initial program 90.5%
Taylor expanded in b around inf 68.8%
mul-1-neg68.8%
*-commutative68.8%
distribute-rgt-neg-in68.8%
Simplified68.8%
Taylor expanded in b around 0 27.8%
mul-1-neg27.8%
unsub-neg27.8%
*-commutative27.8%
Simplified27.8%
Taylor expanded in b around inf 28.5%
mul-1-neg28.5%
associate-*r*29.2%
Simplified29.2%
if -8.59999999999999953e-25 < a < 9.49999999999999979e84Initial program 98.8%
Taylor expanded in b around inf 50.8%
mul-1-neg50.8%
*-commutative50.8%
distribute-rgt-neg-in50.8%
Simplified50.8%
Taylor expanded in b around 0 30.7%
Final simplification30.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.22e-27) (* (- x) (* a b)) (if (<= a 9.5e+49) x (* a (* x (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.22e-27) {
tmp = -x * (a * b);
} else if (a <= 9.5e+49) {
tmp = x;
} else {
tmp = a * (x * -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 (a <= (-1.22d-27)) then
tmp = -x * (a * b)
else if (a <= 9.5d+49) then
tmp = x
else
tmp = a * (x * -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 (a <= -1.22e-27) {
tmp = -x * (a * b);
} else if (a <= 9.5e+49) {
tmp = x;
} else {
tmp = a * (x * -b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.22e-27: tmp = -x * (a * b) elif a <= 9.5e+49: tmp = x else: tmp = a * (x * -b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.22e-27) tmp = Float64(Float64(-x) * Float64(a * b)); elseif (a <= 9.5e+49) tmp = x; else tmp = Float64(a * Float64(x * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.22e-27) tmp = -x * (a * b); elseif (a <= 9.5e+49) tmp = x; else tmp = a * (x * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.22e-27], N[((-x) * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+49], x, N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.22 \cdot 10^{-27}:\\
\;\;\;\;\left(-x\right) \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+49}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if a < -1.22e-27Initial program 91.7%
Taylor expanded in b around inf 72.7%
mul-1-neg72.7%
*-commutative72.7%
distribute-rgt-neg-in72.7%
Simplified72.7%
Taylor expanded in b around 0 26.0%
mul-1-neg26.0%
unsub-neg26.0%
*-commutative26.0%
Simplified26.0%
Taylor expanded in b around inf 25.9%
mul-1-neg25.9%
associate-*r*27.2%
Simplified27.2%
if -1.22e-27 < a < 9.49999999999999969e49Initial program 99.5%
Taylor expanded in b around inf 49.2%
mul-1-neg49.2%
*-commutative49.2%
distribute-rgt-neg-in49.2%
Simplified49.2%
Taylor expanded in b around 0 31.3%
if 9.49999999999999969e49 < a Initial program 89.2%
Taylor expanded in b around inf 64.7%
mul-1-neg64.7%
*-commutative64.7%
distribute-rgt-neg-in64.7%
Simplified64.7%
Taylor expanded in b around 0 32.3%
mul-1-neg32.3%
unsub-neg32.3%
*-commutative32.3%
Simplified32.3%
Taylor expanded in b around inf 32.1%
mul-1-neg32.1%
distribute-rgt-neg-in32.1%
Simplified32.1%
Final simplification30.3%
(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}
Initial program 94.8%
Taylor expanded in b around inf 59.5%
mul-1-neg59.5%
*-commutative59.5%
distribute-rgt-neg-in59.5%
Simplified59.5%
Taylor expanded in b around 0 18.1%
Final simplification18.1%
herbie shell --seed 2023181
(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))))))