
(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 15 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 97.6%
fma-def98.0%
sub-neg98.0%
log1p-def100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- (log z) t))))
(if (<= y -1.1e-86)
(* x (exp (- t_1 (* z a))))
(if (<= y 1.1e-92)
(* x (exp (* a (- (log1p (- z)) b))))
(* x (exp t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (log(z) - t);
double tmp;
if (y <= -1.1e-86) {
tmp = x * exp((t_1 - (z * a)));
} else if (y <= 1.1e-92) {
tmp = x * exp((a * (log1p(-z) - b)));
} else {
tmp = x * exp(t_1);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (Math.log(z) - t);
double tmp;
if (y <= -1.1e-86) {
tmp = x * Math.exp((t_1 - (z * a)));
} else if (y <= 1.1e-92) {
tmp = x * Math.exp((a * (Math.log1p(-z) - b)));
} else {
tmp = x * Math.exp(t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (math.log(z) - t) tmp = 0 if y <= -1.1e-86: tmp = x * math.exp((t_1 - (z * a))) elif y <= 1.1e-92: tmp = x * math.exp((a * (math.log1p(-z) - b))) else: tmp = x * math.exp(t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(log(z) - t)) tmp = 0.0 if (y <= -1.1e-86) tmp = Float64(x * exp(Float64(t_1 - Float64(z * a)))); elseif (y <= 1.1e-92) tmp = Float64(x * exp(Float64(a * Float64(log1p(Float64(-z)) - b)))); else tmp = Float64(x * exp(t_1)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e-86], N[(x * N[Exp[N[(t$95$1 - N[(z * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-92], N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(\log z - t\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{-86}:\\
\;\;\;\;x \cdot e^{t_1 - z \cdot a}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-92}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t_1}\\
\end{array}
\end{array}
if y < -1.1000000000000001e-86Initial program 96.1%
Taylor expanded in z around 0 98.7%
+-commutative98.7%
associate-*r*98.7%
associate-*r*98.7%
distribute-lft-out98.7%
neg-mul-198.7%
Simplified98.7%
Taylor expanded in b around 0 92.4%
+-commutative92.4%
mul-1-neg92.4%
sub-neg92.4%
Simplified92.4%
if -1.1000000000000001e-86 < y < 1.09999999999999994e-92Initial program 96.7%
Taylor expanded in y around 0 89.1%
sub-neg89.1%
sub-neg89.1%
neg-mul-189.1%
log1p-def92.4%
neg-mul-192.4%
sub-neg92.4%
Simplified92.4%
if 1.09999999999999994e-92 < y Initial program 100.0%
Taylor expanded in y around inf 85.6%
Final simplification90.0%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * (z + b))));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * exp(((y * (log(z) - t)) - (a * (z + b))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((y * (Math.log(z) - t)) - (a * (z + b))));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * (z + b))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * Float64(z + b))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * (z + b)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(z + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot \left(z + b\right)}
\end{array}
Initial program 97.6%
Taylor expanded in z around 0 99.6%
+-commutative99.6%
associate-*r*99.6%
associate-*r*99.6%
distribute-lft-out99.6%
neg-mul-199.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.9e+38) (not (<= a 6.4e+81))) (* x (exp (* a (- (log1p (- 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 <= -2.9e+38) || !(a <= 6.4e+81)) {
tmp = x * exp((a * (log1p(-z) - b)));
} else {
tmp = x * exp((y * (log(z) - t)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.9e+38) || !(a <= 6.4e+81)) {
tmp = x * Math.exp((a * (Math.log1p(-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 <= -2.9e+38) or not (a <= 6.4e+81): tmp = x * math.exp((a * (math.log1p(-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 <= -2.9e+38) || !(a <= 6.4e+81)) tmp = Float64(x * exp(Float64(a * Float64(log1p(Float64(-z)) - b)))); else tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.9e+38], N[Not[LessEqual[a, 6.4e+81]], $MachinePrecision]], N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - 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 -2.9 \cdot 10^{+38} \lor \neg \left(a \leq 6.4 \cdot 10^{+81}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(\mathsf{log1p}\left(-z\right) - b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\end{array}
\end{array}
if a < -2.90000000000000007e38 or 6.4e81 < a Initial program 94.3%
Taylor expanded in y around 0 80.2%
sub-neg80.2%
sub-neg80.2%
neg-mul-180.2%
log1p-def87.7%
neg-mul-187.7%
sub-neg87.7%
Simplified87.7%
if -2.90000000000000007e38 < a < 6.4e81Initial program 99.9%
Taylor expanded in y around inf 90.1%
Final simplification89.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.62e-91) (not (<= y 2.75e-94))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.62e-91) || !(y <= 2.75e-94)) {
tmp = x * exp((y * (log(z) - t)));
} 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.62d-91)) .or. (.not. (y <= 2.75d-94))) then
tmp = x * exp((y * (log(z) - t)))
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.62e-91) || !(y <= 2.75e-94)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * -b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.62e-91) or not (y <= 2.75e-94): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * -b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.62e-91) || !(y <= 2.75e-94)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); 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.62e-91) || ~((y <= 2.75e-94))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * -b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.62e-91], N[Not[LessEqual[y, 2.75e-94]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{-91} \lor \neg \left(y \leq 2.75 \cdot 10^{-94}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\end{array}
\end{array}
if y < -1.6199999999999999e-91 or 2.74999999999999995e-94 < y Initial program 98.2%
Taylor expanded in y around inf 87.0%
if -1.6199999999999999e-91 < y < 2.74999999999999995e-94Initial program 96.7%
Taylor expanded in b around inf 86.9%
mul-1-neg86.9%
distribute-rgt-neg-out86.9%
Simplified86.9%
Final simplification86.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -390.0) (not (<= t 5e-7))) (* x (exp (* t (- y)))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -390.0) || !(t <= 5e-7)) {
tmp = x * exp((t * -y));
} else {
tmp = x * pow(z, y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-390.0d0)) .or. (.not. (t <= 5d-7))) then
tmp = x * exp((t * -y))
else
tmp = x * (z ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -390.0) || !(t <= 5e-7)) {
tmp = x * Math.exp((t * -y));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -390.0) or not (t <= 5e-7): tmp = x * math.exp((t * -y)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -390.0) || !(t <= 5e-7)) tmp = Float64(x * exp(Float64(t * Float64(-y)))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -390.0) || ~((t <= 5e-7))) tmp = x * exp((t * -y)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -390.0], N[Not[LessEqual[t, 5e-7]], $MachinePrecision]], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -390 \lor \neg \left(t \leq 5 \cdot 10^{-7}\right):\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -390 or 4.99999999999999977e-7 < t Initial program 96.6%
Taylor expanded in t around inf 79.9%
mul-1-neg79.9%
*-commutative79.9%
Simplified79.9%
if -390 < t < 4.99999999999999977e-7Initial program 99.0%
Taylor expanded in y around inf 69.1%
Taylor expanded in t around 0 69.1%
Final simplification75.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2950000.0) (not (<= a 2.7e+81))) (* x (exp (* a (- b)))) (* x (exp (* t (- y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2950000.0) || !(a <= 2.7e+81)) {
tmp = x * exp((a * -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 <= (-2950000.0d0)) .or. (.not. (a <= 2.7d+81))) then
tmp = x * exp((a * -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 <= -2950000.0) || !(a <= 2.7e+81)) {
tmp = x * Math.exp((a * -b));
} else {
tmp = x * Math.exp((t * -y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2950000.0) or not (a <= 2.7e+81): tmp = x * math.exp((a * -b)) else: tmp = x * math.exp((t * -y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2950000.0) || !(a <= 2.7e+81)) tmp = Float64(x * exp(Float64(a * Float64(-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 <= -2950000.0) || ~((a <= 2.7e+81))) tmp = x * exp((a * -b)); else tmp = x * exp((t * -y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2950000.0], N[Not[LessEqual[a, 2.7e+81]], $MachinePrecision]], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(t * (-y)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2950000 \lor \neg \left(a \leq 2.7 \cdot 10^{+81}\right):\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{t \cdot \left(-y\right)}\\
\end{array}
\end{array}
if a < -2.95e6 or 2.6999999999999999e81 < a Initial program 94.6%
Taylor expanded in b around inf 76.5%
mul-1-neg76.5%
distribute-rgt-neg-out76.5%
Simplified76.5%
if -2.95e6 < a < 2.6999999999999999e81Initial program 100.0%
Taylor expanded in t around inf 82.9%
mul-1-neg82.9%
*-commutative82.9%
Simplified82.9%
Final simplification80.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -320000000000.0) (* x (- 1.0 (* y t))) (* x (pow z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -320000000000.0) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * pow(z, y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-320000000000.0d0)) then
tmp = x * (1.0d0 - (y * t))
else
tmp = x * (z ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -320000000000.0) {
tmp = x * (1.0 - (y * t));
} else {
tmp = x * Math.pow(z, y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -320000000000.0: tmp = x * (1.0 - (y * t)) else: tmp = x * math.pow(z, y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -320000000000.0) tmp = Float64(x * Float64(1.0 - Float64(y * t))); else tmp = Float64(x * (z ^ y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -320000000000.0) tmp = x * (1.0 - (y * t)); else tmp = x * (z ^ y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -320000000000.0], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[Power[z, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -320000000000:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot {z}^{y}\\
\end{array}
\end{array}
if t < -3.2e11Initial program 98.6%
Taylor expanded in t around inf 77.1%
mul-1-neg77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in y around 0 37.9%
neg-mul-137.9%
distribute-rgt-neg-in37.9%
Simplified37.9%
Taylor expanded in x around 0 37.9%
mul-1-neg37.9%
*-commutative37.9%
unsub-neg37.9%
Simplified37.9%
if -3.2e11 < t Initial program 97.3%
Taylor expanded in y around inf 74.5%
Taylor expanded in t around 0 65.0%
Final simplification57.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (* t (- x)))))
(if (<= y -33000000000000.0)
t_1
(if (<= y 2e-116) x (if (<= y 4.5e+161) (* a (* x (- b))) 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 <= -33000000000000.0) {
tmp = t_1;
} else if (y <= 2e-116) {
tmp = x;
} else if (y <= 4.5e+161) {
tmp = a * (x * -b);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t * -x)
if (y <= (-33000000000000.0d0)) then
tmp = t_1
else if (y <= 2d-116) then
tmp = x
else if (y <= 4.5d+161) then
tmp = a * (x * -b)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (t * -x);
double tmp;
if (y <= -33000000000000.0) {
tmp = t_1;
} else if (y <= 2e-116) {
tmp = x;
} else if (y <= 4.5e+161) {
tmp = a * (x * -b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (t * -x) tmp = 0 if y <= -33000000000000.0: tmp = t_1 elif y <= 2e-116: tmp = x elif y <= 4.5e+161: tmp = a * (x * -b) 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 <= -33000000000000.0) tmp = t_1; elseif (y <= 2e-116) tmp = x; elseif (y <= 4.5e+161) tmp = Float64(a * Float64(x * Float64(-b))); 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 <= -33000000000000.0) tmp = t_1; elseif (y <= 2e-116) tmp = x; elseif (y <= 4.5e+161) tmp = a * (x * -b); 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, -33000000000000.0], t$95$1, If[LessEqual[y, 2e-116], x, If[LessEqual[y, 4.5e+161], N[(a * N[(x * (-b)), $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 -33000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-116}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+161}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.3e13 or 4.49999999999999992e161 < y Initial program 98.8%
Taylor expanded in t around inf 75.5%
mul-1-neg75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y around 0 26.9%
neg-mul-126.9%
distribute-rgt-neg-in26.9%
Simplified26.9%
Taylor expanded in t around inf 22.3%
mul-1-neg22.3%
associate-*r*25.7%
*-commutative25.7%
*-commutative25.7%
Simplified25.7%
if -3.3e13 < y < 2e-116Initial program 95.4%
Taylor expanded in t around inf 57.3%
mul-1-neg57.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in y around 0 41.3%
if 2e-116 < y < 4.49999999999999992e161Initial program 100.0%
Taylor expanded in b around inf 54.2%
mul-1-neg54.2%
distribute-rgt-neg-out54.2%
Simplified54.2%
Taylor expanded in a around 0 18.8%
mul-1-neg18.8%
unsub-neg18.8%
Simplified18.8%
Taylor expanded in a around inf 28.7%
mul-1-neg28.7%
distribute-rgt-neg-in28.7%
*-commutative28.7%
Simplified28.7%
Final simplification33.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -7600000000000.0)
(* x (* t (- y)))
(if (<= y 3.4e-116)
x
(if (<= y 1.35e+161) (* a (* x (- b))) (* y (* t (- x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7600000000000.0) {
tmp = x * (t * -y);
} else if (y <= 3.4e-116) {
tmp = x;
} else if (y <= 1.35e+161) {
tmp = a * (x * -b);
} else {
tmp = y * (t * -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 <= (-7600000000000.0d0)) then
tmp = x * (t * -y)
else if (y <= 3.4d-116) then
tmp = x
else if (y <= 1.35d+161) then
tmp = a * (x * -b)
else
tmp = y * (t * -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 <= -7600000000000.0) {
tmp = x * (t * -y);
} else if (y <= 3.4e-116) {
tmp = x;
} else if (y <= 1.35e+161) {
tmp = a * (x * -b);
} else {
tmp = y * (t * -x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7600000000000.0: tmp = x * (t * -y) elif y <= 3.4e-116: tmp = x elif y <= 1.35e+161: tmp = a * (x * -b) else: tmp = y * (t * -x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7600000000000.0) tmp = Float64(x * Float64(t * Float64(-y))); elseif (y <= 3.4e-116) tmp = x; elseif (y <= 1.35e+161) tmp = Float64(a * Float64(x * Float64(-b))); else tmp = Float64(y * Float64(t * Float64(-x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7600000000000.0) tmp = x * (t * -y); elseif (y <= 3.4e-116) tmp = x; elseif (y <= 1.35e+161) tmp = a * (x * -b); else tmp = y * (t * -x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7600000000000.0], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-116], x, If[LessEqual[y, 1.35e+161], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], N[(y * N[(t * (-x)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7600000000000:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-116}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+161}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t \cdot \left(-x\right)\right)\\
\end{array}
\end{array}
if y < -7.6e12Initial program 98.2%
Taylor expanded in t around inf 77.3%
mul-1-neg77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y around 0 26.9%
neg-mul-126.9%
distribute-rgt-neg-in26.9%
Simplified26.9%
Taylor expanded in t around inf 20.0%
mul-1-neg20.0%
*-commutative20.0%
associate-*l*26.7%
distribute-rgt-neg-out26.7%
distribute-rgt-neg-in26.7%
Simplified26.7%
if -7.6e12 < y < 3.39999999999999992e-116Initial program 95.4%
Taylor expanded in t around inf 57.3%
mul-1-neg57.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in y around 0 41.3%
if 3.39999999999999992e-116 < y < 1.3499999999999999e161Initial program 100.0%
Taylor expanded in b around inf 54.2%
mul-1-neg54.2%
distribute-rgt-neg-out54.2%
Simplified54.2%
Taylor expanded in a around 0 18.8%
mul-1-neg18.8%
unsub-neg18.8%
Simplified18.8%
Taylor expanded in a around inf 28.7%
mul-1-neg28.7%
distribute-rgt-neg-in28.7%
*-commutative28.7%
Simplified28.7%
if 1.3499999999999999e161 < y Initial program 100.0%
Taylor expanded in t around inf 71.9%
mul-1-neg71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in y around 0 27.1%
neg-mul-127.1%
distribute-rgt-neg-in27.1%
Simplified27.1%
Taylor expanded in t around inf 27.0%
mul-1-neg27.0%
associate-*r*37.2%
*-commutative37.2%
*-commutative37.2%
Simplified37.2%
Final simplification34.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -26000000000000.0) (* x (* t (- y))) (if (<= y 3.2e-10) (* x (- 1.0 (* a b))) (* y (* t (- x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -26000000000000.0) {
tmp = x * (t * -y);
} else if (y <= 3.2e-10) {
tmp = x * (1.0 - (a * b));
} else {
tmp = y * (t * -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 <= (-26000000000000.0d0)) then
tmp = x * (t * -y)
else if (y <= 3.2d-10) then
tmp = x * (1.0d0 - (a * b))
else
tmp = y * (t * -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 <= -26000000000000.0) {
tmp = x * (t * -y);
} else if (y <= 3.2e-10) {
tmp = x * (1.0 - (a * b));
} else {
tmp = y * (t * -x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -26000000000000.0: tmp = x * (t * -y) elif y <= 3.2e-10: tmp = x * (1.0 - (a * b)) else: tmp = y * (t * -x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -26000000000000.0) tmp = Float64(x * Float64(t * Float64(-y))); elseif (y <= 3.2e-10) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(y * Float64(t * Float64(-x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -26000000000000.0) tmp = x * (t * -y); elseif (y <= 3.2e-10) tmp = x * (1.0 - (a * b)); else tmp = y * (t * -x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -26000000000000.0], N[(x * N[(t * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-10], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(t * (-x)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -26000000000000:\\
\;\;\;\;x \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t \cdot \left(-x\right)\right)\\
\end{array}
\end{array}
if y < -2.6e13Initial program 98.2%
Taylor expanded in t around inf 77.3%
mul-1-neg77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y around 0 26.9%
neg-mul-126.9%
distribute-rgt-neg-in26.9%
Simplified26.9%
Taylor expanded in t around inf 20.0%
mul-1-neg20.0%
*-commutative20.0%
associate-*l*26.7%
distribute-rgt-neg-out26.7%
distribute-rgt-neg-in26.7%
Simplified26.7%
if -2.6e13 < y < 3.19999999999999981e-10Initial program 96.0%
Taylor expanded in b around inf 77.3%
mul-1-neg77.3%
distribute-rgt-neg-out77.3%
Simplified77.3%
Taylor expanded in a around 0 48.7%
mul-1-neg48.7%
unsub-neg48.7%
Simplified48.7%
if 3.19999999999999981e-10 < y Initial program 100.0%
Taylor expanded in t around inf 62.5%
mul-1-neg62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in y around 0 21.1%
neg-mul-121.1%
distribute-rgt-neg-in21.1%
Simplified21.1%
Taylor expanded in t around inf 24.3%
mul-1-neg24.3%
associate-*r*29.3%
*-commutative29.3%
*-commutative29.3%
Simplified29.3%
Final simplification38.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -42000000000000.0) (* x (- 1.0 (* y t))) (if (<= y 4.6e-10) (* x (- 1.0 (* a b))) (* y (* t (- x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -42000000000000.0) {
tmp = x * (1.0 - (y * t));
} else if (y <= 4.6e-10) {
tmp = x * (1.0 - (a * b));
} else {
tmp = y * (t * -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 <= (-42000000000000.0d0)) then
tmp = x * (1.0d0 - (y * t))
else if (y <= 4.6d-10) then
tmp = x * (1.0d0 - (a * b))
else
tmp = y * (t * -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 <= -42000000000000.0) {
tmp = x * (1.0 - (y * t));
} else if (y <= 4.6e-10) {
tmp = x * (1.0 - (a * b));
} else {
tmp = y * (t * -x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -42000000000000.0: tmp = x * (1.0 - (y * t)) elif y <= 4.6e-10: tmp = x * (1.0 - (a * b)) else: tmp = y * (t * -x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -42000000000000.0) tmp = Float64(x * Float64(1.0 - Float64(y * t))); elseif (y <= 4.6e-10) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(y * Float64(t * Float64(-x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -42000000000000.0) tmp = x * (1.0 - (y * t)); elseif (y <= 4.6e-10) tmp = x * (1.0 - (a * b)); else tmp = y * (t * -x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -42000000000000.0], N[(x * N[(1.0 - N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-10], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(t * (-x)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -42000000000000:\\
\;\;\;\;x \cdot \left(1 - y \cdot t\right)\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t \cdot \left(-x\right)\right)\\
\end{array}
\end{array}
if y < -4.2e13Initial program 98.2%
Taylor expanded in t around inf 77.3%
mul-1-neg77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y around 0 26.9%
neg-mul-126.9%
distribute-rgt-neg-in26.9%
Simplified26.9%
Taylor expanded in x around 0 26.9%
mul-1-neg26.9%
*-commutative26.9%
unsub-neg26.9%
Simplified26.9%
if -4.2e13 < y < 4.60000000000000014e-10Initial program 96.0%
Taylor expanded in b around inf 77.3%
mul-1-neg77.3%
distribute-rgt-neg-out77.3%
Simplified77.3%
Taylor expanded in a around 0 48.7%
mul-1-neg48.7%
unsub-neg48.7%
Simplified48.7%
if 4.60000000000000014e-10 < y Initial program 100.0%
Taylor expanded in t around inf 62.5%
mul-1-neg62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in y around 0 21.1%
neg-mul-121.1%
distribute-rgt-neg-in21.1%
Simplified21.1%
Taylor expanded in t around inf 24.3%
mul-1-neg24.3%
associate-*r*29.3%
*-commutative29.3%
*-commutative29.3%
Simplified29.3%
Final simplification38.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.2e-38) (not (<= y 3.4e-116))) (* (* a b) (- x)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.2e-38) || !(y <= 3.4e-116)) {
tmp = (a * b) * -x;
} 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 <= (-4.2d-38)) .or. (.not. (y <= 3.4d-116))) then
tmp = (a * b) * -x
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 <= -4.2e-38) || !(y <= 3.4e-116)) {
tmp = (a * b) * -x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.2e-38) or not (y <= 3.4e-116): tmp = (a * b) * -x else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.2e-38) || !(y <= 3.4e-116)) tmp = Float64(Float64(a * b) * Float64(-x)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.2e-38) || ~((y <= 3.4e-116))) tmp = (a * b) * -x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.2e-38], N[Not[LessEqual[y, 3.4e-116]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] * (-x)), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-38} \lor \neg \left(y \leq 3.4 \cdot 10^{-116}\right):\\
\;\;\;\;\left(a \cdot b\right) \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.20000000000000026e-38 or 3.39999999999999992e-116 < y Initial program 98.7%
Taylor expanded in b around inf 44.0%
mul-1-neg44.0%
distribute-rgt-neg-out44.0%
Simplified44.0%
Taylor expanded in a around 0 15.5%
mul-1-neg15.5%
unsub-neg15.5%
Simplified15.5%
Taylor expanded in a around inf 20.4%
mul-1-neg20.4%
associate-*r*21.3%
*-commutative21.3%
Simplified21.3%
if -4.20000000000000026e-38 < y < 3.39999999999999992e-116Initial program 95.9%
Taylor expanded in t around inf 56.4%
mul-1-neg56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in y around 0 44.2%
Final simplification29.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7200000000000.0) (not (<= y 6.8e-78))) (* y (* t (- x))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7200000000000.0) || !(y <= 6.8e-78)) {
tmp = y * (t * -x);
} 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 <= (-7200000000000.0d0)) .or. (.not. (y <= 6.8d-78))) then
tmp = y * (t * -x)
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 <= -7200000000000.0) || !(y <= 6.8e-78)) {
tmp = y * (t * -x);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7200000000000.0) or not (y <= 6.8e-78): tmp = y * (t * -x) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7200000000000.0) || !(y <= 6.8e-78)) tmp = Float64(y * Float64(t * Float64(-x))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7200000000000.0) || ~((y <= 6.8e-78))) tmp = y * (t * -x); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7200000000000.0], N[Not[LessEqual[y, 6.8e-78]], $MachinePrecision]], N[(y * N[(t * (-x)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7200000000000 \lor \neg \left(y \leq 6.8 \cdot 10^{-78}\right):\\
\;\;\;\;y \cdot \left(t \cdot \left(-x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.2e12 or 6.80000000000000023e-78 < y Initial program 99.3%
Taylor expanded in t around inf 69.9%
mul-1-neg69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in y around 0 24.1%
neg-mul-124.1%
distribute-rgt-neg-in24.1%
Simplified24.1%
Taylor expanded in t around inf 22.3%
mul-1-neg22.3%
associate-*r*24.9%
*-commutative24.9%
*-commutative24.9%
Simplified24.9%
if -7.2e12 < y < 6.80000000000000023e-78Initial program 95.6%
Taylor expanded in t around inf 56.7%
mul-1-neg56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in y around 0 39.7%
Final simplification31.5%
(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 97.6%
Taylor expanded in t around inf 64.0%
mul-1-neg64.0%
*-commutative64.0%
Simplified64.0%
Taylor expanded in y around 0 20.2%
Final simplification20.2%
herbie shell --seed 2023319
(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))))))