
(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 20 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 y (- (log z) t) (* a (- (log1p (- z)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(y, (log(z) - t), (a * (log1p(-z) - b))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(y, Float64(log(z) - t), Float64(a * Float64(log1p(Float64(-z)) - b))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)\right)}
\end{array}
Initial program 96.4%
fma-def97.2%
sub-neg97.2%
log1p-def100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a 6.5e+177) (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))) (* x (exp (* a (- (- z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 6.5e+177) {
tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b))));
} 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 (a <= 6.5d+177) then
tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0d0 - z)) - b))))
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 (a <= 6.5e+177) {
tmp = x * Math.exp(((y * (Math.log(z) - t)) + (a * (Math.log((1.0 - z)) - b))));
} else {
tmp = x * Math.exp((a * (-z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 6.5e+177: tmp = x * math.exp(((y * (math.log(z) - t)) + (a * (math.log((1.0 - z)) - b)))) else: tmp = x * math.exp((a * (-z - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 6.5e+177) tmp = Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) + Float64(a * Float64(log(Float64(1.0 - z)) - b))))); 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 (a <= 6.5e+177) tmp = x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))); else tmp = x * exp((a * (-z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 6.5e+177], 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], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.5 \cdot 10^{+177}:\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if a < 6.5000000000000002e177Initial program 98.5%
if 6.5000000000000002e177 < a Initial program 80.9%
Taylor expanded in y around 0 87.5%
sub-neg87.5%
+-commutative87.5%
sub-neg87.5%
neg-mul-187.5%
log1p-def97.0%
neg-mul-197.0%
+-commutative97.0%
sub-neg97.0%
Simplified97.0%
Taylor expanded in z around 0 97.0%
neg-mul-197.0%
Simplified97.0%
Final simplification98.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -8.4e+26) (not (<= a 1.85e+97))) (* x (exp (* a (- (- z) b)))) (* x (exp (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -8.4e+26) || !(a <= 1.85e+97)) {
tmp = x * exp((a * (-z - b)));
} else {
tmp = x * exp((y * (log(z) - t)));
}
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.4d+26)) .or. (.not. (a <= 1.85d+97))) then
tmp = x * exp((a * (-z - b)))
else
tmp = x * exp((y * (log(z) - t)))
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.4e+26) || !(a <= 1.85e+97)) {
tmp = x * Math.exp((a * (-z - b)));
} else {
tmp = x * Math.exp((y * (Math.log(z) - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -8.4e+26) or not (a <= 1.85e+97): tmp = x * math.exp((a * (-z - b))) else: tmp = x * math.exp((y * (math.log(z) - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -8.4e+26) || !(a <= 1.85e+97)) tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); else tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -8.4e+26) || ~((a <= 1.85e+97))) tmp = x * exp((a * (-z - b))); else tmp = x * exp((y * (log(z) - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -8.4e+26], N[Not[LessEqual[a, 1.85e+97]], $MachinePrecision]], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.4 \cdot 10^{+26} \lor \neg \left(a \leq 1.85 \cdot 10^{+97}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\end{array}
\end{array}
if a < -8.4000000000000003e26 or 1.85e97 < a Initial program 91.4%
Taylor expanded in y around 0 79.6%
sub-neg79.6%
+-commutative79.6%
sub-neg79.6%
neg-mul-179.6%
log1p-def87.1%
neg-mul-187.1%
+-commutative87.1%
sub-neg87.1%
Simplified87.1%
Taylor expanded in z around 0 87.1%
neg-mul-187.1%
Simplified87.1%
if -8.4000000000000003e26 < a < 1.85e97Initial program 100.0%
Taylor expanded in y around inf 91.9%
Final simplification89.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.1e+23) (not (<= a 1.12e-12))) (* x (exp (* a (- (- z) b)))) (* x (exp (* t (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.1e+23) || !(a <= 1.12e-12)) {
tmp = x * exp((a * (-z - b)));
} else {
tmp = x * exp((t * -y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.1d+23)) .or. (.not. (a <= 1.12d-12))) then
tmp = x * exp((a * (-z - b)))
else
tmp = x * exp((t * -y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.1e+23) || !(a <= 1.12e-12)) {
tmp = x * Math.exp((a * (-z - b)));
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.1e+23) or not (a <= 1.12e-12): tmp = x * math.exp((a * (-z - b))) else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.1e+23) || !(a <= 1.12e-12)) tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.1e+23) || ~((a <= 1.12e-12))) tmp = x * exp((a * (-z - b))); else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.1e+23], N[Not[LessEqual[a, 1.12e-12]], $MachinePrecision]], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{+23} \lor \neg \left(a \leq 1.12 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if a < -1.10000000000000004e23 or 1.1200000000000001e-12 < a Initial program 92.9%
Taylor expanded in y around 0 76.5%
sub-neg76.5%
+-commutative76.5%
sub-neg76.5%
neg-mul-176.5%
log1p-def82.7%
neg-mul-182.7%
+-commutative82.7%
sub-neg82.7%
Simplified82.7%
Taylor expanded in z around 0 82.7%
neg-mul-182.7%
Simplified82.7%
if -1.10000000000000004e23 < a < 1.1200000000000001e-12Initial program 100.0%
Taylor expanded in t around inf 78.2%
mul-1-neg78.2%
distribute-rgt-neg-out78.2%
Simplified78.2%
Final simplification80.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.85e+37) (not (<= y 8.6e+18))) (* x (pow z y)) (* x (exp (* b (- a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.85e+37) || !(y <= 8.6e+18)) {
tmp = x * pow(z, y);
} else {
tmp = x * exp((b * -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.85d+37)) .or. (.not. (y <= 8.6d+18))) then
tmp = x * (z ** y)
else
tmp = x * exp((b * -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.85e+37) || !(y <= 8.6e+18)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x * Math.exp((b * -a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.85e+37) or not (y <= 8.6e+18): tmp = x * math.pow(z, y) else: tmp = x * math.exp((b * -a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.85e+37) || !(y <= 8.6e+18)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x * exp(Float64(b * Float64(-a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.85e+37) || ~((y <= 8.6e+18))) tmp = x * (z ^ y); else tmp = x * exp((b * -a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.85e+37], N[Not[LessEqual[y, 8.6e+18]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(b * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+37} \lor \neg \left(y \leq 8.6 \cdot 10^{+18}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\
\end{array}
\end{array}
if y < -1.85e37 or 8.6e18 < y Initial program 97.3%
Taylor expanded in y around inf 88.5%
Taylor expanded in t around 0 69.8%
if -1.85e37 < y < 8.6e18Initial program 95.7%
Taylor expanded in b around inf 76.3%
associate-*r*76.3%
*-commutative76.3%
neg-mul-176.3%
Simplified76.3%
Final simplification73.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -6.9e+22) (not (<= a 3.9e-13))) (* x (exp (* b (- a)))) (* x (exp (* t (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -6.9e+22) || !(a <= 3.9e-13)) {
tmp = x * exp((b * -a));
} else {
tmp = x * exp((t * -y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-6.9d+22)) .or. (.not. (a <= 3.9d-13))) then
tmp = x * exp((b * -a))
else
tmp = x * exp((t * -y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -6.9e+22) || !(a <= 3.9e-13)) {
tmp = x * Math.exp((b * -a));
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -6.9e+22) or not (a <= 3.9e-13): tmp = x * math.exp((b * -a)) else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -6.9e+22) || !(a <= 3.9e-13)) tmp = Float64(x * exp(Float64(b * Float64(-a)))); else tmp = Float64(x * exp(Float64(t * Float64(-y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -6.9e+22) || ~((a <= 3.9e-13))) tmp = x * exp((b * -a)); else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -6.9e+22], N[Not[LessEqual[a, 3.9e-13]], $MachinePrecision]], N[(x * N[Exp[N[(b * (-a)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.9 \cdot 10^{+22} \lor \neg \left(a \leq 3.9 \cdot 10^{-13}\right):\\
\;\;\;\;x \cdot e^{b \cdot \left(-a\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if a < -6.8999999999999998e22 or 3.90000000000000004e-13 < a Initial program 92.9%
Taylor expanded in b around inf 75.8%
associate-*r*75.8%
*-commutative75.8%
neg-mul-175.8%
Simplified75.8%
if -6.8999999999999998e22 < a < 3.90000000000000004e-13Initial program 100.0%
Taylor expanded in t around inf 78.2%
mul-1-neg78.2%
distribute-rgt-neg-out78.2%
Simplified78.2%
Final simplification77.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.5e-31) (not (<= y 1.45e-62))) (* x (pow z y)) (- x (/ (* (- (* b b) (* z z)) (* x a)) (- b z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.5e-31) || !(y <= 1.45e-62)) {
tmp = x * pow(z, y);
} else {
tmp = x - ((((b * b) - (z * z)) * (x * a)) / (b - z));
}
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-31)) .or. (.not. (y <= 1.45d-62))) then
tmp = x * (z ** y)
else
tmp = x - ((((b * b) - (z * z)) * (x * a)) / (b - z))
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-31) || !(y <= 1.45e-62)) {
tmp = x * Math.pow(z, y);
} else {
tmp = x - ((((b * b) - (z * z)) * (x * a)) / (b - z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.5e-31) or not (y <= 1.45e-62): tmp = x * math.pow(z, y) else: tmp = x - ((((b * b) - (z * z)) * (x * a)) / (b - z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.5e-31) || !(y <= 1.45e-62)) tmp = Float64(x * (z ^ y)); else tmp = Float64(x - Float64(Float64(Float64(Float64(b * b) - Float64(z * z)) * Float64(x * a)) / Float64(b - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7.5e-31) || ~((y <= 1.45e-62))) tmp = x * (z ^ y); else tmp = x - ((((b * b) - (z * z)) * (x * a)) / (b - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.5e-31], N[Not[LessEqual[y, 1.45e-62]], $MachinePrecision]], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(N[(b * b), $MachinePrecision] - N[(z * z), $MachinePrecision]), $MachinePrecision] * N[(x * a), $MachinePrecision]), $MachinePrecision] / N[(b - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-31} \lor \neg \left(y \leq 1.45 \cdot 10^{-62}\right):\\
\;\;\;\;x \cdot {z}^{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\left(b \cdot b - z \cdot z\right) \cdot \left(x \cdot a\right)}{b - z}\\
\end{array}
\end{array}
if y < -7.49999999999999975e-31 or 1.44999999999999993e-62 < y Initial program 97.3%
Taylor expanded in y around inf 87.3%
Taylor expanded in t around 0 62.5%
if -7.49999999999999975e-31 < y < 1.44999999999999993e-62Initial program 95.2%
Taylor expanded in y around 0 85.1%
sub-neg85.1%
+-commutative85.1%
sub-neg85.1%
neg-mul-185.1%
log1p-def89.9%
neg-mul-189.9%
+-commutative89.9%
sub-neg89.9%
Simplified89.9%
Taylor expanded in z around 0 89.9%
neg-mul-189.9%
Simplified89.9%
Taylor expanded in a around 0 52.8%
+-commutative52.8%
mul-1-neg52.8%
unsub-neg52.8%
associate-*r*53.5%
*-commutative53.5%
+-commutative53.5%
Simplified53.5%
flip-+55.2%
associate-*l/55.2%
*-commutative55.2%
Applied egg-rr55.2%
Final simplification59.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a -9e+87) (- x (/ (* (- (* b b) (* z z)) (* x a)) (- b z))) (if (<= a 1e+154) (- x (* x (* y t))) (* x (* t (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -9e+87) {
tmp = x - ((((b * b) - (z * z)) * (x * a)) / (b - z));
} else if (a <= 1e+154) {
tmp = x - (x * (y * t));
} else {
tmp = x * (t * -y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-9d+87)) then
tmp = x - ((((b * b) - (z * z)) * (x * a)) / (b - z))
else if (a <= 1d+154) then
tmp = x - (x * (y * t))
else
tmp = x * (t * -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -9e+87) {
tmp = x - ((((b * b) - (z * z)) * (x * a)) / (b - z));
} else if (a <= 1e+154) {
tmp = x - (x * (y * t));
} else {
tmp = x * (t * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -9e+87: tmp = x - ((((b * b) - (z * z)) * (x * a)) / (b - z)) elif a <= 1e+154: tmp = x - (x * (y * t)) else: tmp = x * (t * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -9e+87) tmp = Float64(x - Float64(Float64(Float64(Float64(b * b) - Float64(z * z)) * Float64(x * a)) / Float64(b - z))); elseif (a <= 1e+154) tmp = Float64(x - Float64(x * Float64(y * t))); else tmp = Float64(x * Float64(t * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -9e+87) tmp = x - ((((b * b) - (z * z)) * (x * a)) / (b - z)); elseif (a <= 1e+154) tmp = x - (x * (y * t)); else tmp = x * (t * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -9e+87], N[(x - N[(N[(N[(N[(b * b), $MachinePrecision] - N[(z * z), $MachinePrecision]), $MachinePrecision] * N[(x * a), $MachinePrecision]), $MachinePrecision] / N[(b - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e+154], N[(x - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9 \cdot 10^{+87}:\\
\;\;\;\;x - \frac{\left(b \cdot b - z \cdot z\right) \cdot \left(x \cdot a\right)}{b - z}\\
\mathbf{elif}\;a \leq 10^{+154}:\\
\;\;\;\;x - x \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if a < -9.0000000000000005e87Initial program 95.2%
Taylor expanded in y around 0 74.8%
sub-neg74.8%
+-commutative74.8%
sub-neg74.8%
neg-mul-174.8%
log1p-def83.3%
neg-mul-183.3%
+-commutative83.3%
sub-neg83.3%
Simplified83.3%
Taylor expanded in z around 0 83.3%
neg-mul-183.3%
Simplified83.3%
Taylor expanded in a around 0 38.1%
+-commutative38.1%
mul-1-neg38.1%
unsub-neg38.1%
associate-*r*43.8%
*-commutative43.8%
+-commutative43.8%
Simplified43.8%
flip-+45.4%
associate-*l/47.2%
*-commutative47.2%
Applied egg-rr47.2%
if -9.0000000000000005e87 < a < 1.00000000000000004e154Initial program 99.4%
Taylor expanded in t around inf 72.7%
mul-1-neg72.7%
distribute-rgt-neg-out72.7%
Simplified72.7%
Taylor expanded in y around 0 37.4%
+-commutative37.4%
mul-1-neg37.4%
unsub-neg37.4%
associate-*r*40.8%
*-commutative40.8%
Simplified40.8%
if 1.00000000000000004e154 < a Initial program 82.1%
Taylor expanded in t around inf 26.6%
mul-1-neg26.6%
distribute-rgt-neg-out26.6%
Simplified26.6%
Taylor expanded in y around 0 11.8%
+-commutative11.8%
mul-1-neg11.8%
unsub-neg11.8%
associate-*r*11.7%
*-commutative11.7%
Simplified11.7%
Taylor expanded in y around inf 26.1%
mul-1-neg26.1%
associate-*r*26.2%
*-commutative26.2%
distribute-lft-neg-in26.2%
Simplified26.2%
Final simplification40.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* t (- y)))))
(if (<= y -2.6e+199)
t_1
(if (<= y -4.5e+141)
(* t (* x y))
(if (<= y -1.35e-43)
(* x (* b (- a)))
(if (<= y 1.3e-11) x (if (<= y 2.7e+148) (* b (* x (- a))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (t * -y);
double tmp;
if (y <= -2.6e+199) {
tmp = t_1;
} else if (y <= -4.5e+141) {
tmp = t * (x * y);
} else if (y <= -1.35e-43) {
tmp = x * (b * -a);
} else if (y <= 1.3e-11) {
tmp = x;
} else if (y <= 2.7e+148) {
tmp = b * (x * -a);
} 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 * (t * -y)
if (y <= (-2.6d+199)) then
tmp = t_1
else if (y <= (-4.5d+141)) then
tmp = t * (x * y)
else if (y <= (-1.35d-43)) then
tmp = x * (b * -a)
else if (y <= 1.3d-11) then
tmp = x
else if (y <= 2.7d+148) then
tmp = b * (x * -a)
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 * (t * -y);
double tmp;
if (y <= -2.6e+199) {
tmp = t_1;
} else if (y <= -4.5e+141) {
tmp = t * (x * y);
} else if (y <= -1.35e-43) {
tmp = x * (b * -a);
} else if (y <= 1.3e-11) {
tmp = x;
} else if (y <= 2.7e+148) {
tmp = b * (x * -a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (t * -y) tmp = 0 if y <= -2.6e+199: tmp = t_1 elif y <= -4.5e+141: tmp = t * (x * y) elif y <= -1.35e-43: tmp = x * (b * -a) elif y <= 1.3e-11: tmp = x elif y <= 2.7e+148: tmp = b * (x * -a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(t * Float64(-y))) tmp = 0.0 if (y <= -2.6e+199) tmp = t_1; elseif (y <= -4.5e+141) tmp = Float64(t * Float64(x * y)); elseif (y <= -1.35e-43) tmp = Float64(x * Float64(b * Float64(-a))); elseif (y <= 1.3e-11) tmp = x; elseif (y <= 2.7e+148) tmp = Float64(b * Float64(x * Float64(-a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (t * -y); tmp = 0.0; if (y <= -2.6e+199) tmp = t_1; elseif (y <= -4.5e+141) tmp = t * (x * y); elseif (y <= -1.35e-43) tmp = x * (b * -a); elseif (y <= 1.3e-11) tmp = x; elseif (y <= 2.7e+148) tmp = b * (x * -a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+199], t$95$1, If[LessEqual[y, -4.5e+141], N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.35e-43], N[(x * N[(b * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-11], x, If[LessEqual[y, 2.7e+148], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+199}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{+141}:\\
\;\;\;\;t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \left(b \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+148}:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.6000000000000001e199 or 2.70000000000000019e148 < y Initial program 100.0%
Taylor expanded in t around inf 79.9%
mul-1-neg79.9%
distribute-rgt-neg-out79.9%
Simplified79.9%
Taylor expanded in y around 0 26.6%
+-commutative26.6%
mul-1-neg26.6%
unsub-neg26.6%
associate-*r*37.3%
*-commutative37.3%
Simplified37.3%
Taylor expanded in y around inf 30.1%
mul-1-neg30.1%
associate-*r*39.0%
*-commutative39.0%
distribute-lft-neg-in39.0%
Simplified39.0%
if -2.6000000000000001e199 < y < -4.5000000000000002e141Initial program 84.7%
Taylor expanded in t around inf 24.9%
mul-1-neg24.9%
distribute-rgt-neg-out24.9%
Simplified24.9%
Taylor expanded in y around 0 9.3%
+-commutative9.3%
mul-1-neg9.3%
unsub-neg9.3%
associate-*r*9.3%
*-commutative9.3%
Simplified9.3%
Taylor expanded in y around inf 23.8%
mul-1-neg23.8%
associate-*r*9.7%
*-commutative9.7%
distribute-lft-neg-in9.7%
Simplified9.7%
expm1-log1p-u9.7%
expm1-udef23.8%
*-commutative23.8%
associate-*l*23.8%
add-sqr-sqrt8.0%
sqrt-unprod38.7%
sqr-neg38.7%
sqrt-unprod23.8%
add-sqr-sqrt31.6%
Applied egg-rr31.6%
expm1-def31.6%
expm1-log1p41.0%
associate-*r*26.9%
*-commutative26.9%
associate-*l*41.1%
Simplified41.1%
if -4.5000000000000002e141 < y < -1.34999999999999996e-43Initial program 100.0%
Taylor expanded in b around inf 43.7%
associate-*r*43.7%
*-commutative43.7%
neg-mul-143.7%
Simplified43.7%
Taylor expanded in b around 0 10.6%
mul-1-neg10.6%
*-commutative10.6%
unsub-neg10.6%
*-commutative10.6%
Simplified10.6%
Taylor expanded in a around inf 12.8%
mul-1-neg12.8%
*-commutative12.8%
distribute-rgt-neg-in12.8%
*-commutative12.8%
distribute-rgt-neg-in12.8%
Simplified12.8%
Taylor expanded in a around 0 12.8%
mul-1-neg12.8%
associate-*r*17.8%
*-commutative17.8%
distribute-rgt-neg-in17.8%
*-commutative17.8%
distribute-rgt-neg-in17.8%
Simplified17.8%
if -1.34999999999999996e-43 < y < 1.3e-11Initial program 94.6%
Taylor expanded in b around inf 82.9%
associate-*r*82.9%
*-commutative82.9%
neg-mul-182.9%
Simplified82.9%
Taylor expanded in b around 0 43.9%
if 1.3e-11 < y < 2.70000000000000019e148Initial program 97.2%
Taylor expanded in b around inf 44.0%
associate-*r*44.0%
*-commutative44.0%
neg-mul-144.0%
Simplified44.0%
Taylor expanded in b around 0 11.8%
mul-1-neg11.8%
*-commutative11.8%
unsub-neg11.8%
*-commutative11.8%
Simplified11.8%
Taylor expanded in a around inf 29.5%
mul-1-neg29.5%
associate-*r*29.5%
*-commutative29.5%
distribute-rgt-neg-out29.5%
associate-*l*42.6%
Simplified42.6%
Final simplification38.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (* t (- y)))))
(if (<= y -2e+202)
t_1
(if (<= y -3.45e+124)
(* a (* x (- b)))
(if (<= y -4.5e-26)
t_1
(if (<= y 7.5e-12) (* x (- 1.0 (* a b))) (* a (* x (- z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (t * -y);
double tmp;
if (y <= -2e+202) {
tmp = t_1;
} else if (y <= -3.45e+124) {
tmp = a * (x * -b);
} else if (y <= -4.5e-26) {
tmp = t_1;
} else if (y <= 7.5e-12) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -z);
}
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 * (t * -y)
if (y <= (-2d+202)) then
tmp = t_1
else if (y <= (-3.45d+124)) then
tmp = a * (x * -b)
else if (y <= (-4.5d-26)) then
tmp = t_1
else if (y <= 7.5d-12) then
tmp = x * (1.0d0 - (a * b))
else
tmp = a * (x * -z)
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 * (t * -y);
double tmp;
if (y <= -2e+202) {
tmp = t_1;
} else if (y <= -3.45e+124) {
tmp = a * (x * -b);
} else if (y <= -4.5e-26) {
tmp = t_1;
} else if (y <= 7.5e-12) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (t * -y) tmp = 0 if y <= -2e+202: tmp = t_1 elif y <= -3.45e+124: tmp = a * (x * -b) elif y <= -4.5e-26: tmp = t_1 elif y <= 7.5e-12: tmp = x * (1.0 - (a * b)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(t * Float64(-y))) tmp = 0.0 if (y <= -2e+202) tmp = t_1; elseif (y <= -3.45e+124) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= -4.5e-26) tmp = t_1; elseif (y <= 7.5e-12) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x * (t * -y); tmp = 0.0; if (y <= -2e+202) tmp = t_1; elseif (y <= -3.45e+124) tmp = a * (x * -b); elseif (y <= -4.5e-26) tmp = t_1; elseif (y <= 7.5e-12) tmp = x * (1.0 - (a * b)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+202], t$95$1, If[LessEqual[y, -3.45e+124], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.5e-26], t$95$1, If[LessEqual[y, 7.5e-12], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+202}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.45 \cdot 10^{+124}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-12}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -1.9999999999999998e202 or -3.45e124 < y < -4.4999999999999999e-26Initial program 100.0%
Taylor expanded in t around inf 61.9%
mul-1-neg61.9%
distribute-rgt-neg-out61.9%
Simplified61.9%
Taylor expanded in y around 0 20.2%
+-commutative20.2%
mul-1-neg20.2%
unsub-neg20.2%
associate-*r*25.3%
*-commutative25.3%
Simplified25.3%
Taylor expanded in y around inf 21.6%
mul-1-neg21.6%
associate-*r*26.7%
*-commutative26.7%
distribute-lft-neg-in26.7%
Simplified26.7%
if -1.9999999999999998e202 < y < -3.45e124Initial program 86.8%
Taylor expanded in b around inf 54.7%
associate-*r*54.7%
*-commutative54.7%
neg-mul-154.7%
Simplified54.7%
Taylor expanded in b around 0 29.0%
mul-1-neg29.0%
*-commutative29.0%
unsub-neg29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in a around inf 41.3%
mul-1-neg41.3%
*-commutative41.3%
distribute-rgt-neg-in41.3%
*-commutative41.3%
distribute-rgt-neg-in41.3%
Simplified41.3%
if -4.4999999999999999e-26 < y < 7.5e-12Initial program 94.8%
Taylor expanded in b around inf 82.8%
associate-*r*82.8%
*-commutative82.8%
neg-mul-182.8%
Simplified82.8%
Taylor expanded in b around 0 52.9%
mul-1-neg52.9%
*-commutative52.9%
unsub-neg52.9%
*-commutative52.9%
Simplified52.9%
if 7.5e-12 < y Initial program 98.4%
Taylor expanded in y around 0 41.4%
sub-neg41.4%
+-commutative41.4%
sub-neg41.4%
neg-mul-141.4%
log1p-def44.2%
neg-mul-144.2%
+-commutative44.2%
sub-neg44.2%
Simplified44.2%
Taylor expanded in z around 0 44.2%
neg-mul-144.2%
Simplified44.2%
Taylor expanded in a around 0 9.6%
+-commutative9.6%
mul-1-neg9.6%
unsub-neg9.6%
associate-*r*10.9%
*-commutative10.9%
+-commutative10.9%
Simplified10.9%
Taylor expanded in z around inf 38.3%
Final simplification42.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.3e+198)
(* x (- 1.0 (* y t)))
(if (<= y -4.6e+132)
(* a (* x (- b)))
(if (<= y -4.5e-26)
(* x (* t (- y)))
(if (<= y 1.35e-11) (* x (- 1.0 (* a b))) (* a (* x (- z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.3e+198) {
tmp = x * (1.0 - (y * t));
} else if (y <= -4.6e+132) {
tmp = a * (x * -b);
} else if (y <= -4.5e-26) {
tmp = x * (t * -y);
} else if (y <= 1.35e-11) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -z);
}
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 <= (-4.3d+198)) then
tmp = x * (1.0d0 - (y * t))
else if (y <= (-4.6d+132)) then
tmp = a * (x * -b)
else if (y <= (-4.5d-26)) then
tmp = x * (t * -y)
else if (y <= 1.35d-11) then
tmp = x * (1.0d0 - (a * b))
else
tmp = a * (x * -z)
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 <= -4.3e+198) {
tmp = x * (1.0 - (y * t));
} else if (y <= -4.6e+132) {
tmp = a * (x * -b);
} else if (y <= -4.5e-26) {
tmp = x * (t * -y);
} else if (y <= 1.35e-11) {
tmp = x * (1.0 - (a * b));
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.3e+198: tmp = x * (1.0 - (y * t)) elif y <= -4.6e+132: tmp = a * (x * -b) elif y <= -4.5e-26: tmp = x * (t * -y) elif y <= 1.35e-11: tmp = x * (1.0 - (a * b)) else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.3e+198) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (y <= -4.6e+132) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= -4.5e-26) tmp = Float64(x * Float64(t * Float64(-y))); elseif (y <= 1.35e-11) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.3e+198) tmp = x * (1.0 - (y * t)); elseif (y <= -4.6e+132) tmp = a * (x * -b); elseif (y <= -4.5e-26) tmp = x * (t * -y); elseif (y <= 1.35e-11) tmp = x * (1.0 - (a * b)); else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.3e+198], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.6e+132], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.5e-26], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e-11], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+198}:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{+132}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-26}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-11}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -4.29999999999999982e198Initial program 100.0%
Taylor expanded in t around inf 72.5%
mul-1-neg72.5%
distribute-rgt-neg-out72.5%
Simplified72.5%
Taylor expanded in y around 0 33.5%
+-commutative33.5%
mul-1-neg33.5%
unsub-neg33.5%
associate-*r*41.0%
*-commutative41.0%
Simplified41.0%
Taylor expanded in x around 0 41.0%
if -4.29999999999999982e198 < y < -4.6000000000000003e132Initial program 86.8%
Taylor expanded in b around inf 54.7%
associate-*r*54.7%
*-commutative54.7%
neg-mul-154.7%
Simplified54.7%
Taylor expanded in b around 0 29.0%
mul-1-neg29.0%
*-commutative29.0%
unsub-neg29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in a around inf 41.3%
mul-1-neg41.3%
*-commutative41.3%
distribute-rgt-neg-in41.3%
*-commutative41.3%
distribute-rgt-neg-in41.3%
Simplified41.3%
if -4.6000000000000003e132 < y < -4.4999999999999999e-26Initial program 100.0%
Taylor expanded in t around inf 53.3%
mul-1-neg53.3%
distribute-rgt-neg-out53.3%
Simplified53.3%
Taylor expanded in y around 0 9.4%
+-commutative9.4%
mul-1-neg9.4%
unsub-neg9.4%
associate-*r*12.5%
*-commutative12.5%
Simplified12.5%
Taylor expanded in y around inf 12.1%
mul-1-neg12.1%
associate-*r*15.2%
*-commutative15.2%
distribute-lft-neg-in15.2%
Simplified15.2%
if -4.4999999999999999e-26 < y < 1.35000000000000002e-11Initial program 94.8%
Taylor expanded in b around inf 82.8%
associate-*r*82.8%
*-commutative82.8%
neg-mul-182.8%
Simplified82.8%
Taylor expanded in b around 0 52.9%
mul-1-neg52.9%
*-commutative52.9%
unsub-neg52.9%
*-commutative52.9%
Simplified52.9%
if 1.35000000000000002e-11 < y Initial program 98.4%
Taylor expanded in y around 0 41.4%
sub-neg41.4%
+-commutative41.4%
sub-neg41.4%
neg-mul-141.4%
log1p-def44.2%
neg-mul-144.2%
+-commutative44.2%
sub-neg44.2%
Simplified44.2%
Taylor expanded in z around 0 44.2%
neg-mul-144.2%
Simplified44.2%
Taylor expanded in a around 0 9.6%
+-commutative9.6%
mul-1-neg9.6%
unsub-neg9.6%
associate-*r*10.9%
*-commutative10.9%
+-commutative10.9%
Simplified10.9%
Taylor expanded in z around inf 38.3%
Final simplification42.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.65e+201)
(* x (* t (- y)))
(if (<= y -3.1e+141)
(* t (* x y))
(if (<= y -2e-43)
(* x (* b (- a)))
(if (<= y 2.7e-11) x (* a (* x (- z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.65e+201) {
tmp = x * (t * -y);
} else if (y <= -3.1e+141) {
tmp = t * (x * y);
} else if (y <= -2e-43) {
tmp = x * (b * -a);
} else if (y <= 2.7e-11) {
tmp = x;
} else {
tmp = a * (x * -z);
}
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.65d+201)) then
tmp = x * (t * -y)
else if (y <= (-3.1d+141)) then
tmp = t * (x * y)
else if (y <= (-2d-43)) then
tmp = x * (b * -a)
else if (y <= 2.7d-11) then
tmp = x
else
tmp = a * (x * -z)
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.65e+201) {
tmp = x * (t * -y);
} else if (y <= -3.1e+141) {
tmp = t * (x * y);
} else if (y <= -2e-43) {
tmp = x * (b * -a);
} else if (y <= 2.7e-11) {
tmp = x;
} else {
tmp = a * (x * -z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.65e+201: tmp = x * (t * -y) elif y <= -3.1e+141: tmp = t * (x * y) elif y <= -2e-43: tmp = x * (b * -a) elif y <= 2.7e-11: tmp = x else: tmp = a * (x * -z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.65e+201) tmp = Float64(x * Float64(t * Float64(-y))); elseif (y <= -3.1e+141) tmp = Float64(t * Float64(x * y)); elseif (y <= -2e-43) tmp = Float64(x * Float64(b * Float64(-a))); elseif (y <= 2.7e-11) tmp = x; else tmp = Float64(a * Float64(x * Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.65e+201) tmp = x * (t * -y); elseif (y <= -3.1e+141) tmp = t * (x * y); elseif (y <= -2e-43) tmp = x * (b * -a); elseif (y <= 2.7e-11) tmp = x; else tmp = a * (x * -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.65e+201], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.1e+141], N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e-43], N[(x * N[(b * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-11], x, N[(a * N[(x * (-z)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+201}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{+141}:\\
\;\;\;\;t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-43}:\\
\;\;\;\;x \cdot \left(b \cdot \left(-a\right)\right)\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-z\right)\right)\\
\end{array}
\end{array}
if y < -1.65e201Initial program 100.0%
Taylor expanded in t around inf 72.5%
mul-1-neg72.5%
distribute-rgt-neg-out72.5%
Simplified72.5%
Taylor expanded in y around 0 33.5%
+-commutative33.5%
mul-1-neg33.5%
unsub-neg33.5%
associate-*r*41.0%
*-commutative41.0%
Simplified41.0%
Taylor expanded in y around inf 33.4%
mul-1-neg33.4%
associate-*r*41.0%
*-commutative41.0%
distribute-lft-neg-in41.0%
Simplified41.0%
if -1.65e201 < y < -3.10000000000000004e141Initial program 84.7%
Taylor expanded in t around inf 24.9%
mul-1-neg24.9%
distribute-rgt-neg-out24.9%
Simplified24.9%
Taylor expanded in y around 0 9.3%
+-commutative9.3%
mul-1-neg9.3%
unsub-neg9.3%
associate-*r*9.3%
*-commutative9.3%
Simplified9.3%
Taylor expanded in y around inf 23.8%
mul-1-neg23.8%
associate-*r*9.7%
*-commutative9.7%
distribute-lft-neg-in9.7%
Simplified9.7%
expm1-log1p-u9.7%
expm1-udef23.8%
*-commutative23.8%
associate-*l*23.8%
add-sqr-sqrt8.0%
sqrt-unprod38.7%
sqr-neg38.7%
sqrt-unprod23.8%
add-sqr-sqrt31.6%
Applied egg-rr31.6%
expm1-def31.6%
expm1-log1p41.0%
associate-*r*26.9%
*-commutative26.9%
associate-*l*41.1%
Simplified41.1%
if -3.10000000000000004e141 < y < -2.00000000000000015e-43Initial program 100.0%
Taylor expanded in b around inf 43.7%
associate-*r*43.7%
*-commutative43.7%
neg-mul-143.7%
Simplified43.7%
Taylor expanded in b around 0 10.6%
mul-1-neg10.6%
*-commutative10.6%
unsub-neg10.6%
*-commutative10.6%
Simplified10.6%
Taylor expanded in a around inf 12.8%
mul-1-neg12.8%
*-commutative12.8%
distribute-rgt-neg-in12.8%
*-commutative12.8%
distribute-rgt-neg-in12.8%
Simplified12.8%
Taylor expanded in a around 0 12.8%
mul-1-neg12.8%
associate-*r*17.8%
*-commutative17.8%
distribute-rgt-neg-in17.8%
*-commutative17.8%
distribute-rgt-neg-in17.8%
Simplified17.8%
if -2.00000000000000015e-43 < y < 2.70000000000000005e-11Initial program 94.6%
Taylor expanded in b around inf 82.9%
associate-*r*82.9%
*-commutative82.9%
neg-mul-182.9%
Simplified82.9%
Taylor expanded in b around 0 43.9%
if 2.70000000000000005e-11 < y Initial program 98.4%
Taylor expanded in y around 0 41.4%
sub-neg41.4%
+-commutative41.4%
sub-neg41.4%
neg-mul-141.4%
log1p-def44.2%
neg-mul-144.2%
+-commutative44.2%
sub-neg44.2%
Simplified44.2%
Taylor expanded in z around 0 44.2%
neg-mul-144.2%
Simplified44.2%
Taylor expanded in a around 0 9.6%
+-commutative9.6%
mul-1-neg9.6%
unsub-neg9.6%
associate-*r*10.9%
*-commutative10.9%
+-commutative10.9%
Simplified10.9%
Taylor expanded in z around inf 38.3%
Final simplification38.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (* t (- x)))))
(if (<= y -4.5e-26)
t_1
(if (<= y 1.25e-11) x (if (<= y 9.7e+148) (* b (* x (- a))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (t * -x);
double tmp;
if (y <= -4.5e-26) {
tmp = t_1;
} else if (y <= 1.25e-11) {
tmp = x;
} else if (y <= 9.7e+148) {
tmp = b * (x * -a);
} 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 = y * (t * -x)
if (y <= (-4.5d-26)) then
tmp = t_1
else if (y <= 1.25d-11) then
tmp = x
else if (y <= 9.7d+148) then
tmp = b * (x * -a)
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 = y * (t * -x);
double tmp;
if (y <= -4.5e-26) {
tmp = t_1;
} else if (y <= 1.25e-11) {
tmp = x;
} else if (y <= 9.7e+148) {
tmp = b * (x * -a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (t * -x) tmp = 0 if y <= -4.5e-26: tmp = t_1 elif y <= 1.25e-11: tmp = x elif y <= 9.7e+148: tmp = b * (x * -a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(t * Float64(-x))) tmp = 0.0 if (y <= -4.5e-26) tmp = t_1; elseif (y <= 1.25e-11) tmp = x; elseif (y <= 9.7e+148) tmp = Float64(b * Float64(x * Float64(-a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (t * -x); tmp = 0.0; if (y <= -4.5e-26) tmp = t_1; elseif (y <= 1.25e-11) tmp = x; elseif (y <= 9.7e+148) tmp = b * (x * -a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(t * (-x)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e-26], t$95$1, If[LessEqual[y, 1.25e-11], x, If[LessEqual[y, 9.7e+148], N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t \cdot \left(-x\right)\right)\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.7 \cdot 10^{+148}:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.4999999999999999e-26 or 9.70000000000000053e148 < y Initial program 98.0%
Taylor expanded in t around inf 63.8%
mul-1-neg63.8%
distribute-rgt-neg-out63.8%
Simplified63.8%
Taylor expanded in y around 0 18.5%
+-commutative18.5%
mul-1-neg18.5%
unsub-neg18.5%
associate-*r*25.2%
*-commutative25.2%
Simplified25.2%
Taylor expanded in y around inf 23.0%
mul-1-neg23.0%
associate-*r*26.9%
*-commutative26.9%
distribute-lft-neg-in26.9%
Simplified26.9%
Taylor expanded in x around 0 23.0%
neg-mul-123.0%
distribute-rgt-neg-in23.0%
*-commutative23.0%
Simplified23.0%
if -4.4999999999999999e-26 < y < 1.25000000000000005e-11Initial program 94.8%
Taylor expanded in b around inf 82.8%
associate-*r*82.8%
*-commutative82.8%
neg-mul-182.8%
Simplified82.8%
Taylor expanded in b around 0 42.2%
if 1.25000000000000005e-11 < y < 9.70000000000000053e148Initial program 97.2%
Taylor expanded in b around inf 44.0%
associate-*r*44.0%
*-commutative44.0%
neg-mul-144.0%
Simplified44.0%
Taylor expanded in b around 0 11.8%
mul-1-neg11.8%
*-commutative11.8%
unsub-neg11.8%
*-commutative11.8%
Simplified11.8%
Taylor expanded in a around inf 29.5%
mul-1-neg29.5%
associate-*r*29.5%
*-commutative29.5%
distribute-rgt-neg-out29.5%
associate-*l*42.6%
Simplified42.6%
Final simplification34.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.2e+88) (- x (* (+ z b) (* x a))) (if (<= a 8e+153) (- x (* x (* y t))) (* x (* t (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.2e+88) {
tmp = x - ((z + b) * (x * a));
} else if (a <= 8e+153) {
tmp = x - (x * (y * t));
} else {
tmp = x * (t * -y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.2d+88)) then
tmp = x - ((z + b) * (x * a))
else if (a <= 8d+153) then
tmp = x - (x * (y * t))
else
tmp = x * (t * -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.2e+88) {
tmp = x - ((z + b) * (x * a));
} else if (a <= 8e+153) {
tmp = x - (x * (y * t));
} else {
tmp = x * (t * -y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.2e+88: tmp = x - ((z + b) * (x * a)) elif a <= 8e+153: tmp = x - (x * (y * t)) else: tmp = x * (t * -y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.2e+88) tmp = Float64(x - Float64(Float64(z + b) * Float64(x * a))); elseif (a <= 8e+153) tmp = Float64(x - Float64(x * Float64(y * t))); else tmp = Float64(x * Float64(t * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.2e+88) tmp = x - ((z + b) * (x * a)); elseif (a <= 8e+153) tmp = x - (x * (y * t)); else tmp = x * (t * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.2e+88], N[(x - N[(N[(z + b), $MachinePrecision] * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8e+153], N[(x - N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{+88}:\\
\;\;\;\;x - \left(z + b\right) \cdot \left(x \cdot a\right)\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+153}:\\
\;\;\;\;x - x \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if a < -1.2e88Initial program 95.2%
Taylor expanded in y around 0 74.8%
sub-neg74.8%
+-commutative74.8%
sub-neg74.8%
neg-mul-174.8%
log1p-def83.3%
neg-mul-183.3%
+-commutative83.3%
sub-neg83.3%
Simplified83.3%
Taylor expanded in z around 0 83.3%
neg-mul-183.3%
Simplified83.3%
Taylor expanded in a around 0 38.1%
+-commutative38.1%
mul-1-neg38.1%
unsub-neg38.1%
associate-*r*43.8%
*-commutative43.8%
+-commutative43.8%
Simplified43.8%
if -1.2e88 < a < 8e153Initial program 99.4%
Taylor expanded in t around inf 72.7%
mul-1-neg72.7%
distribute-rgt-neg-out72.7%
Simplified72.7%
Taylor expanded in y around 0 37.4%
+-commutative37.4%
mul-1-neg37.4%
unsub-neg37.4%
associate-*r*40.8%
*-commutative40.8%
Simplified40.8%
if 8e153 < a Initial program 82.1%
Taylor expanded in t around inf 26.6%
mul-1-neg26.6%
distribute-rgt-neg-out26.6%
Simplified26.6%
Taylor expanded in y around 0 11.8%
+-commutative11.8%
mul-1-neg11.8%
unsub-neg11.8%
associate-*r*11.7%
*-commutative11.7%
Simplified11.7%
Taylor expanded in y around inf 26.1%
mul-1-neg26.1%
associate-*r*26.2%
*-commutative26.2%
distribute-lft-neg-in26.2%
Simplified26.2%
Final simplification39.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2e-43) (not (<= y 0.028))) (* a (* x (- b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2e-43) || !(y <= 0.028)) {
tmp = a * (x * -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 ((y <= (-2d-43)) .or. (.not. (y <= 0.028d0))) then
tmp = a * (x * -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 ((y <= -2e-43) || !(y <= 0.028)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2e-43) or not (y <= 0.028): tmp = a * (x * -b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2e-43) || !(y <= 0.028)) tmp = Float64(a * Float64(x * Float64(-b))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2e-43) || ~((y <= 0.028))) tmp = a * (x * -b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2e-43], N[Not[LessEqual[y, 0.028]], $MachinePrecision]], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-43} \lor \neg \left(y \leq 0.028\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.00000000000000015e-43 or 0.0280000000000000006 < y Initial program 97.8%
Taylor expanded in b around inf 42.1%
associate-*r*42.1%
*-commutative42.1%
neg-mul-142.1%
Simplified42.1%
Taylor expanded in b around 0 10.4%
mul-1-neg10.4%
*-commutative10.4%
unsub-neg10.4%
*-commutative10.4%
Simplified10.4%
Taylor expanded in a around inf 18.0%
mul-1-neg18.0%
*-commutative18.0%
distribute-rgt-neg-in18.0%
*-commutative18.0%
distribute-rgt-neg-in18.0%
Simplified18.0%
if -2.00000000000000015e-43 < y < 0.0280000000000000006Initial program 94.7%
Taylor expanded in b around inf 81.5%
associate-*r*81.5%
*-commutative81.5%
neg-mul-181.5%
Simplified81.5%
Taylor expanded in b around 0 43.3%
Final simplification29.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.4e-44) (* a (* x (- b))) (if (<= y 1.7e-11) x (* b (* x (- a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.4e-44) {
tmp = a * (x * -b);
} else if (y <= 1.7e-11) {
tmp = x;
} else {
tmp = b * (x * -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 <= (-2.4d-44)) then
tmp = a * (x * -b)
else if (y <= 1.7d-11) then
tmp = x
else
tmp = b * (x * -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 <= -2.4e-44) {
tmp = a * (x * -b);
} else if (y <= 1.7e-11) {
tmp = x;
} else {
tmp = b * (x * -a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.4e-44: tmp = a * (x * -b) elif y <= 1.7e-11: tmp = x else: tmp = b * (x * -a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.4e-44) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 1.7e-11) tmp = x; else tmp = Float64(b * Float64(x * Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.4e-44) tmp = a * (x * -b); elseif (y <= 1.7e-11) tmp = x; else tmp = b * (x * -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.4e-44], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-11], x, N[(b * N[(x * (-a)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-44}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(x \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if y < -2.40000000000000009e-44Initial program 97.4%
Taylor expanded in b around inf 42.8%
associate-*r*42.8%
*-commutative42.8%
neg-mul-142.8%
Simplified42.8%
Taylor expanded in b around 0 12.1%
mul-1-neg12.1%
*-commutative12.1%
unsub-neg12.1%
*-commutative12.1%
Simplified12.1%
Taylor expanded in a around inf 16.4%
mul-1-neg16.4%
*-commutative16.4%
distribute-rgt-neg-in16.4%
*-commutative16.4%
distribute-rgt-neg-in16.4%
Simplified16.4%
if -2.40000000000000009e-44 < y < 1.6999999999999999e-11Initial program 94.6%
Taylor expanded in b around inf 82.9%
associate-*r*82.9%
*-commutative82.9%
neg-mul-182.9%
Simplified82.9%
Taylor expanded in b around 0 43.9%
if 1.6999999999999999e-11 < y Initial program 98.4%
Taylor expanded in b around inf 40.0%
associate-*r*40.0%
*-commutative40.0%
neg-mul-140.0%
Simplified40.0%
Taylor expanded in b around 0 8.1%
mul-1-neg8.1%
*-commutative8.1%
unsub-neg8.1%
*-commutative8.1%
Simplified8.1%
Taylor expanded in a around inf 19.5%
mul-1-neg19.5%
associate-*r*20.9%
*-commutative20.9%
distribute-rgt-neg-out20.9%
associate-*l*28.3%
Simplified28.3%
Final simplification31.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.2e-27) (* y (* t (- x))) (if (<= y 2.1e-11) x (* (- z) (* x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.2e-27) {
tmp = y * (t * -x);
} else if (y <= 2.1e-11) {
tmp = x;
} else {
tmp = -z * (x * 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 <= (-6.2d-27)) then
tmp = y * (t * -x)
else if (y <= 2.1d-11) then
tmp = x
else
tmp = -z * (x * 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 <= -6.2e-27) {
tmp = y * (t * -x);
} else if (y <= 2.1e-11) {
tmp = x;
} else {
tmp = -z * (x * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.2e-27: tmp = y * (t * -x) elif y <= 2.1e-11: tmp = x else: tmp = -z * (x * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.2e-27) tmp = Float64(y * Float64(t * Float64(-x))); elseif (y <= 2.1e-11) tmp = x; else tmp = Float64(Float64(-z) * Float64(x * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.2e-27) tmp = y * (t * -x); elseif (y <= 2.1e-11) tmp = x; else tmp = -z * (x * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.2e-27], N[(y * N[(t * (-x)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-11], x, N[((-z) * N[(x * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-27}:\\
\;\;\;\;y \cdot \left(t \cdot \left(-x\right)\right)\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) \cdot \left(x \cdot a\right)\\
\end{array}
\end{array}
if y < -6.1999999999999997e-27Initial program 97.2%
Taylor expanded in t around inf 54.8%
mul-1-neg54.8%
distribute-rgt-neg-out54.8%
Simplified54.8%
Taylor expanded in y around 0 17.7%
+-commutative17.7%
mul-1-neg17.7%
unsub-neg17.7%
associate-*r*21.7%
*-commutative21.7%
Simplified21.7%
Taylor expanded in y around inf 21.4%
mul-1-neg21.4%
associate-*r*22.9%
*-commutative22.9%
distribute-lft-neg-in22.9%
Simplified22.9%
Taylor expanded in x around 0 21.4%
neg-mul-121.4%
distribute-rgt-neg-in21.4%
*-commutative21.4%
Simplified21.4%
if -6.1999999999999997e-27 < y < 2.0999999999999999e-11Initial program 94.8%
Taylor expanded in b around inf 82.8%
associate-*r*82.8%
*-commutative82.8%
neg-mul-182.8%
Simplified82.8%
Taylor expanded in b around 0 42.2%
if 2.0999999999999999e-11 < y Initial program 98.4%
Taylor expanded in y around 0 41.4%
sub-neg41.4%
+-commutative41.4%
sub-neg41.4%
neg-mul-141.4%
log1p-def44.2%
neg-mul-144.2%
+-commutative44.2%
sub-neg44.2%
Simplified44.2%
Taylor expanded in z around 0 44.2%
neg-mul-144.2%
Simplified44.2%
Taylor expanded in a around 0 9.6%
+-commutative9.6%
mul-1-neg9.6%
unsub-neg9.6%
associate-*r*10.9%
*-commutative10.9%
+-commutative10.9%
Simplified10.9%
Taylor expanded in z around inf 38.3%
mul-1-neg38.3%
*-commutative38.3%
associate-*r*30.9%
distribute-rgt-neg-in30.9%
distribute-rgt-neg-in30.9%
Simplified30.9%
Final simplification33.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.4e+26) (* t (* x y)) (if (<= y 0.09) x (* y (* x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.4e+26) {
tmp = t * (x * y);
} else if (y <= 0.09) {
tmp = x;
} else {
tmp = y * (x * t);
}
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.4d+26)) then
tmp = t * (x * y)
else if (y <= 0.09d0) then
tmp = x
else
tmp = y * (x * t)
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.4e+26) {
tmp = t * (x * y);
} else if (y <= 0.09) {
tmp = x;
} else {
tmp = y * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.4e+26: tmp = t * (x * y) elif y <= 0.09: tmp = x else: tmp = y * (x * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.4e+26) tmp = Float64(t * Float64(x * y)); elseif (y <= 0.09) tmp = x; else tmp = Float64(y * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.4e+26) tmp = t * (x * y); elseif (y <= 0.09) tmp = x; else tmp = y * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.4e+26], N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.09], x, N[(y * N[(x * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+26}:\\
\;\;\;\;t \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq 0.09:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if y < -2.40000000000000005e26Initial program 96.6%
Taylor expanded in t around inf 54.8%
mul-1-neg54.8%
distribute-rgt-neg-out54.8%
Simplified54.8%
Taylor expanded in y around 0 19.4%
+-commutative19.4%
mul-1-neg19.4%
unsub-neg19.4%
associate-*r*24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in y around inf 24.0%
mul-1-neg24.0%
associate-*r*25.8%
*-commutative25.8%
distribute-lft-neg-in25.8%
Simplified25.8%
expm1-log1p-u16.9%
expm1-udef26.7%
*-commutative26.7%
associate-*l*23.4%
add-sqr-sqrt5.5%
sqrt-unprod23.0%
sqr-neg23.0%
sqrt-unprod12.6%
add-sqr-sqrt17.9%
Applied egg-rr17.9%
expm1-def11.3%
expm1-log1p13.8%
associate-*r*10.6%
*-commutative10.6%
associate-*l*13.8%
Simplified13.8%
if -2.40000000000000005e26 < y < 0.089999999999999997Initial program 95.4%
Taylor expanded in b around inf 77.0%
associate-*r*77.0%
*-commutative77.0%
neg-mul-177.0%
Simplified77.0%
Taylor expanded in b around 0 37.8%
if 0.089999999999999997 < y Initial program 98.4%
Taylor expanded in t around inf 68.5%
mul-1-neg68.5%
distribute-rgt-neg-out68.5%
Simplified68.5%
Taylor expanded in y around 0 16.1%
+-commutative16.1%
mul-1-neg16.1%
unsub-neg16.1%
associate-*r*22.3%
*-commutative22.3%
Simplified22.3%
Taylor expanded in y around inf 25.1%
mul-1-neg25.1%
associate-*r*29.8%
*-commutative29.8%
distribute-lft-neg-in29.8%
Simplified29.8%
expm1-log1p-u24.3%
expm1-udef30.5%
*-commutative30.5%
associate-*l*24.3%
add-sqr-sqrt7.0%
sqrt-unprod20.4%
sqr-neg20.4%
sqrt-unprod8.5%
add-sqr-sqrt15.4%
Applied egg-rr15.4%
expm1-def10.6%
expm1-log1p11.2%
*-commutative11.2%
Simplified11.2%
Final simplification26.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a 1.2e+155) x (* t (* x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.2e+155) {
tmp = x;
} else {
tmp = t * (x * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= 1.2d+155) then
tmp = x
else
tmp = t * (x * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= 1.2e+155) {
tmp = x;
} else {
tmp = t * (x * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= 1.2e+155: tmp = x else: tmp = t * (x * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= 1.2e+155) tmp = x; else tmp = Float64(t * Float64(x * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= 1.2e+155) tmp = x; else tmp = t * (x * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, 1.2e+155], x, N[(t * N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.2 \cdot 10^{+155}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(x \cdot y\right)\\
\end{array}
\end{array}
if a < 1.2000000000000001e155Initial program 98.5%
Taylor expanded in b around inf 56.6%
associate-*r*56.6%
*-commutative56.6%
neg-mul-156.6%
Simplified56.6%
Taylor expanded in b around 0 24.3%
if 1.2000000000000001e155 < a Initial program 82.1%
Taylor expanded in t around inf 26.6%
mul-1-neg26.6%
distribute-rgt-neg-out26.6%
Simplified26.6%
Taylor expanded in y around 0 11.8%
+-commutative11.8%
mul-1-neg11.8%
unsub-neg11.8%
associate-*r*11.7%
*-commutative11.7%
Simplified11.7%
Taylor expanded in y around inf 26.1%
mul-1-neg26.1%
associate-*r*26.2%
*-commutative26.2%
distribute-lft-neg-in26.2%
Simplified26.2%
expm1-log1p-u19.7%
expm1-udef31.1%
*-commutative31.1%
associate-*l*31.1%
add-sqr-sqrt18.5%
sqrt-unprod30.9%
sqr-neg30.9%
sqrt-unprod15.5%
add-sqr-sqrt33.9%
Applied egg-rr33.9%
expm1-def22.5%
expm1-log1p23.2%
associate-*r*23.3%
*-commutative23.3%
associate-*l*23.3%
Simplified23.3%
Final simplification24.2%
(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 96.4%
Taylor expanded in b around inf 60.3%
associate-*r*60.3%
*-commutative60.3%
neg-mul-160.3%
Simplified60.3%
Taylor expanded in b around 0 22.0%
Final simplification22.0%
herbie shell --seed 2023224
(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))))))