
(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 a (- (log1p (- z)) b) (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(fma(a, (log1p(-z) - b), (y * (log(z) - t))));
}
function code(x, y, z, t, a, b) return Float64(x * exp(fma(a, Float64(log1p(Float64(-z)) - b), Float64(y * Float64(log(z) - t))))) end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(a * N[(N[Log[1 + (-z)], $MachinePrecision] - b), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{\mathsf{fma}\left(a, \mathsf{log1p}\left(-z\right) - b, y \cdot \left(\log z - t\right)\right)}
\end{array}
Initial program 96.2%
+-commutative96.2%
fma-def96.6%
sub-neg96.6%
log1p-def99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* a (- (log (- 1.0 z)) b)) (* y (- (log z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((a * (log((1.0 - z)) - b)) + (y * (log(z) - t))));
}
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(((a * (log((1.0d0 - z)) - b)) + (y * (log(z) - t))))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x * Math.exp(((a * (Math.log((1.0 - z)) - b)) + (y * (Math.log(z) - t))));
}
def code(x, y, z, t, a, b): return x * math.exp(((a * (math.log((1.0 - z)) - b)) + (y * (math.log(z) - t))))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(a * Float64(log(Float64(1.0 - z)) - b)) + Float64(y * Float64(log(z) - t))))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((a * (log((1.0 - z)) - b)) + (y * (log(z) - t)))); end
code[x_, y_, z_, t_, a_, b_] := N[(x * N[Exp[N[(N[(a * N[(N[Log[N[(1.0 - z), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{a \cdot \left(\log \left(1 - z\right) - b\right) + y \cdot \left(\log z - t\right)}
\end{array}
Initial program 96.2%
Final simplification96.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.013) (not (<= y 0.0074))) (* x (exp (* y (- (log z) t)))) (* x (exp (* a (- (- z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.013) || !(y <= 0.0074)) {
tmp = x * exp((y * (log(z) - t)));
} else {
tmp = x * exp((a * (-z - b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-0.013d0)) .or. (.not. (y <= 0.0074d0))) then
tmp = x * exp((y * (log(z) - t)))
else
tmp = x * exp((a * (-z - b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.013) || !(y <= 0.0074)) {
tmp = x * Math.exp((y * (Math.log(z) - t)));
} else {
tmp = x * Math.exp((a * (-z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -0.013) or not (y <= 0.0074): tmp = x * math.exp((y * (math.log(z) - t))) else: tmp = x * math.exp((a * (-z - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -0.013) || !(y <= 0.0074)) tmp = Float64(x * exp(Float64(y * Float64(log(z) - t)))); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -0.013) || ~((y <= 0.0074))) tmp = x * exp((y * (log(z) - t))); else tmp = x * exp((a * (-z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -0.013], N[Not[LessEqual[y, 0.0074]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.013 \lor \neg \left(y \leq 0.0074\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(\log z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if y < -0.0129999999999999994 or 0.0074000000000000003 < y Initial program 98.1%
Taylor expanded in y around inf 89.1%
if -0.0129999999999999994 < y < 0.0074000000000000003Initial program 94.7%
Taylor expanded in y around 0 83.9%
sub-neg83.9%
neg-mul-183.9%
log1p-def89.1%
neg-mul-189.1%
Simplified89.1%
Taylor expanded in z around 0 89.1%
neg-mul-189.1%
unsub-neg89.1%
neg-mul-189.1%
Simplified89.1%
Final simplification89.1%
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp(((y * (log(z) - t)) - (a * 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 * 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 * b)));
}
def code(x, y, z, t, a, b): return x * math.exp(((y * (math.log(z) - t)) - (a * b)))
function code(x, y, z, t, a, b) return Float64(x * exp(Float64(Float64(y * Float64(log(z) - t)) - Float64(a * b)))) end
function tmp = code(x, y, z, t, a, b) tmp = x * exp(((y * (log(z) - t)) - (a * 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 * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot b}
\end{array}
Initial program 96.2%
fma-def96.6%
sub-neg96.6%
log1p-def99.6%
Simplified99.6%
Taylor expanded in z around 0 95.8%
mul-1-neg95.8%
unsub-neg95.8%
Applied egg-rr95.8%
Final simplification95.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.8) (not (<= y 0.085))) (* x (exp (* y (log z)))) (* x (exp (* a (- (- z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.8) || !(y <= 0.085)) {
tmp = x * exp((y * log(z)));
} else {
tmp = x * exp((a * (-z - b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.8d0)) .or. (.not. (y <= 0.085d0))) then
tmp = x * exp((y * log(z)))
else
tmp = x * exp((a * (-z - b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.8) || !(y <= 0.085)) {
tmp = x * Math.exp((y * Math.log(z)));
} else {
tmp = x * Math.exp((a * (-z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.8) or not (y <= 0.085): tmp = x * math.exp((y * math.log(z))) else: tmp = x * math.exp((a * (-z - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.8) || !(y <= 0.085)) tmp = Float64(x * exp(Float64(y * log(z)))); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.8) || ~((y <= 0.085))) tmp = x * exp((y * log(z))); else tmp = x * exp((a * (-z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.8], N[Not[LessEqual[y, 0.085]], $MachinePrecision]], N[(x * N[Exp[N[(y * N[Log[z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \lor \neg \left(y \leq 0.085\right):\\
\;\;\;\;x \cdot e^{y \cdot \log z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if y < -2.7999999999999998 or 0.0850000000000000061 < y Initial program 98.1%
Taylor expanded in y around inf 89.1%
Taylor expanded in t around 0 71.7%
if -2.7999999999999998 < y < 0.0850000000000000061Initial program 94.7%
Taylor expanded in y around 0 83.9%
sub-neg83.9%
neg-mul-183.9%
log1p-def89.1%
neg-mul-189.1%
Simplified89.1%
Taylor expanded in z around 0 89.1%
neg-mul-189.1%
unsub-neg89.1%
neg-mul-189.1%
Simplified89.1%
Final simplification81.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7.5e+96) (not (<= t 3.2e+92))) (* x (exp (* y (- t)))) (* x (exp (* a (- (- z) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.5e+96) || !(t <= 3.2e+92)) {
tmp = x * exp((y * -t));
} else {
tmp = x * exp((a * (-z - b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-7.5d+96)) .or. (.not. (t <= 3.2d+92))) then
tmp = x * exp((y * -t))
else
tmp = x * exp((a * (-z - b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.5e+96) || !(t <= 3.2e+92)) {
tmp = x * Math.exp((y * -t));
} else {
tmp = x * Math.exp((a * (-z - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7.5e+96) or not (t <= 3.2e+92): tmp = x * math.exp((y * -t)) else: tmp = x * math.exp((a * (-z - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7.5e+96) || !(t <= 3.2e+92)) tmp = Float64(x * exp(Float64(y * Float64(-t)))); else tmp = Float64(x * exp(Float64(a * Float64(Float64(-z) - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -7.5e+96) || ~((t <= 3.2e+92))) tmp = x * exp((y * -t)); else tmp = x * exp((a * (-z - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7.5e+96], N[Not[LessEqual[t, 3.2e+92]], $MachinePrecision]], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x * N[Exp[N[(a * N[((-z) - b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+96} \lor \neg \left(t \leq 3.2 \cdot 10^{+92}\right):\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{a \cdot \left(\left(-z\right) - b\right)}\\
\end{array}
\end{array}
if t < -7.4999999999999996e96 or 3.20000000000000025e92 < t Initial program 94.2%
Taylor expanded in t around inf 77.8%
mul-1-neg77.8%
distribute-rgt-neg-out77.8%
Simplified77.8%
if -7.4999999999999996e96 < t < 3.20000000000000025e92Initial program 97.2%
Taylor expanded in y around 0 75.1%
sub-neg75.1%
neg-mul-175.1%
log1p-def77.9%
neg-mul-177.9%
Simplified77.9%
Taylor expanded in z around 0 77.9%
neg-mul-177.9%
unsub-neg77.9%
neg-mul-177.9%
Simplified77.9%
Final simplification77.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.5e-61) (* x (exp (* a (- b)))) (if (<= b 4.2e-52) (* x (exp (* y (- t)))) (/ x (exp (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.5e-61) {
tmp = x * exp((a * -b));
} else if (b <= 4.2e-52) {
tmp = x * exp((y * -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 (b <= (-2.5d-61)) then
tmp = x * exp((a * -b))
else if (b <= 4.2d-52) then
tmp = x * exp((y * -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 (b <= -2.5e-61) {
tmp = x * Math.exp((a * -b));
} else if (b <= 4.2e-52) {
tmp = x * Math.exp((y * -t));
} else {
tmp = x / Math.exp((a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.5e-61: tmp = x * math.exp((a * -b)) elif b <= 4.2e-52: tmp = x * math.exp((y * -t)) else: tmp = x / math.exp((a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.5e-61) tmp = Float64(x * exp(Float64(a * Float64(-b)))); elseif (b <= 4.2e-52) tmp = Float64(x * exp(Float64(y * Float64(-t)))); else tmp = Float64(x / exp(Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.5e-61) tmp = x * exp((a * -b)); elseif (b <= 4.2e-52) tmp = x * exp((y * -t)); else tmp = x / exp((a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.5e-61], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e-52], N[(x * N[Exp[N[(y * (-t)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(x / N[Exp[N[(a * b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{-61}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-52}:\\
\;\;\;\;x \cdot e^{y \cdot \left(-t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{e^{a \cdot b}}\\
\end{array}
\end{array}
if b < -2.4999999999999999e-61Initial program 98.9%
Taylor expanded in b around inf 83.8%
mul-1-neg83.8%
*-commutative83.8%
distribute-rgt-neg-in83.8%
Simplified83.8%
if -2.4999999999999999e-61 < b < 4.1999999999999997e-52Initial program 91.6%
Taylor expanded in t around inf 68.6%
mul-1-neg68.6%
distribute-rgt-neg-out68.6%
Simplified68.6%
if 4.1999999999999997e-52 < b Initial program 98.6%
fma-def98.7%
sub-neg98.7%
log1p-def98.7%
Simplified98.7%
Taylor expanded in z around 0 98.6%
mul-1-neg98.6%
unsub-neg98.6%
Applied egg-rr98.6%
Taylor expanded in y around 0 77.9%
*-commutative77.9%
exp-neg77.9%
*-commutative77.9%
exp-prod65.7%
associate-*r/65.7%
*-rgt-identity65.7%
Simplified65.7%
pow-exp77.9%
Applied egg-rr77.9%
Final simplification76.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y 2.4e+184) (* x (exp (* a (- b)))) (/ (* (* a a) (* (* b b) (* x x))) (- (* a (* x b)) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.4e+184) {
tmp = x * exp((a * -b));
} else {
tmp = ((a * a) * ((b * b) * (x * x))) / ((a * (x * b)) - 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 <= 2.4d+184) then
tmp = x * exp((a * -b))
else
tmp = ((a * a) * ((b * b) * (x * x))) / ((a * (x * b)) - 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 <= 2.4e+184) {
tmp = x * Math.exp((a * -b));
} else {
tmp = ((a * a) * ((b * b) * (x * x))) / ((a * (x * b)) - x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 2.4e+184: tmp = x * math.exp((a * -b)) else: tmp = ((a * a) * ((b * b) * (x * x))) / ((a * (x * b)) - x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 2.4e+184) tmp = Float64(x * exp(Float64(a * Float64(-b)))); else tmp = Float64(Float64(Float64(a * a) * Float64(Float64(b * b) * Float64(x * x))) / Float64(Float64(a * Float64(x * b)) - x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 2.4e+184) tmp = x * exp((a * -b)); else tmp = ((a * a) * ((b * b) * (x * x))) / ((a * (x * b)) - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 2.4e+184], N[(x * N[Exp[N[(a * (-b)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * a), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.4 \cdot 10^{+184}:\\
\;\;\;\;x \cdot e^{a \cdot \left(-b\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(a \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot x\right)\right)}{a \cdot \left(x \cdot b\right) - x}\\
\end{array}
\end{array}
if y < 2.39999999999999997e184Initial program 95.9%
Taylor expanded in b around inf 68.9%
mul-1-neg68.9%
*-commutative68.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
if 2.39999999999999997e184 < y Initial program 100.0%
Taylor expanded in b around inf 30.2%
mul-1-neg30.2%
*-commutative30.2%
distribute-rgt-neg-in30.2%
Simplified30.2%
Taylor expanded in b around 0 3.4%
mul-1-neg3.4%
unsub-neg3.4%
Simplified3.4%
sub-neg3.4%
distribute-rgt-in3.4%
*-un-lft-identity3.4%
distribute-lft-neg-in3.4%
associate-*r*3.4%
mul-1-neg3.4%
+-commutative3.4%
flip-+18.9%
div-sub18.9%
Applied egg-rr13.5%
div-sub13.5%
Simplified13.5%
Taylor expanded in a around inf 55.9%
unpow255.9%
unpow255.9%
unpow255.9%
Simplified55.9%
Final simplification68.0%
(FPCore (x y z t a b) :precision binary64 (if (<= y 2.6e+184) (/ x (exp (* a b))) (/ (* (* a a) (* (* b b) (* x x))) (- (* a (* x b)) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.6e+184) {
tmp = x / exp((a * b));
} else {
tmp = ((a * a) * ((b * b) * (x * x))) / ((a * (x * b)) - 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 <= 2.6d+184) then
tmp = x / exp((a * b))
else
tmp = ((a * a) * ((b * b) * (x * x))) / ((a * (x * b)) - 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 <= 2.6e+184) {
tmp = x / Math.exp((a * b));
} else {
tmp = ((a * a) * ((b * b) * (x * x))) / ((a * (x * b)) - x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 2.6e+184: tmp = x / math.exp((a * b)) else: tmp = ((a * a) * ((b * b) * (x * x))) / ((a * (x * b)) - x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 2.6e+184) tmp = Float64(x / exp(Float64(a * b))); else tmp = Float64(Float64(Float64(a * a) * Float64(Float64(b * b) * Float64(x * x))) / Float64(Float64(a * Float64(x * b)) - x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 2.6e+184) tmp = x / exp((a * b)); else tmp = ((a * a) * ((b * b) * (x * x))) / ((a * (x * b)) - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 2.6e+184], N[(x / N[Exp[N[(a * b), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * a), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{+184}:\\
\;\;\;\;\frac{x}{e^{a \cdot b}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(a \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot x\right)\right)}{a \cdot \left(x \cdot b\right) - x}\\
\end{array}
\end{array}
if y < 2.59999999999999993e184Initial program 95.9%
fma-def96.3%
sub-neg96.3%
log1p-def99.6%
Simplified99.6%
Taylor expanded in z around 0 95.5%
mul-1-neg95.5%
unsub-neg95.5%
Applied egg-rr95.5%
Taylor expanded in y around 0 68.9%
*-commutative68.9%
exp-neg68.9%
*-commutative68.9%
exp-prod58.7%
associate-*r/58.7%
*-rgt-identity58.7%
Simplified58.7%
pow-exp68.9%
Applied egg-rr68.9%
if 2.59999999999999993e184 < y Initial program 100.0%
Taylor expanded in b around inf 30.2%
mul-1-neg30.2%
*-commutative30.2%
distribute-rgt-neg-in30.2%
Simplified30.2%
Taylor expanded in b around 0 3.4%
mul-1-neg3.4%
unsub-neg3.4%
Simplified3.4%
sub-neg3.4%
distribute-rgt-in3.4%
*-un-lft-identity3.4%
distribute-lft-neg-in3.4%
associate-*r*3.4%
mul-1-neg3.4%
+-commutative3.4%
flip-+18.9%
div-sub18.9%
Applied egg-rr13.5%
div-sub13.5%
Simplified13.5%
Taylor expanded in a around inf 55.9%
unpow255.9%
unpow255.9%
unpow255.9%
Simplified55.9%
Final simplification68.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (* a (* x b)) x))
(t_2 (- (- x (* b (* x a))) (* a (* a (* (* b b) (* x -0.5))))))
(t_3 (/ (* x (- x)) t_1)))
(if (<= y -8.2e-273)
t_2
(if (<= y 1.24e-266)
t_3
(if (<= y 3.3e-76)
t_2
(if (<= y 4.5e+90) t_3 (/ (* (* a a) (* (* b b) (* x x))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * (x * b)) - x;
double t_2 = (x - (b * (x * a))) - (a * (a * ((b * b) * (x * -0.5))));
double t_3 = (x * -x) / t_1;
double tmp;
if (y <= -8.2e-273) {
tmp = t_2;
} else if (y <= 1.24e-266) {
tmp = t_3;
} else if (y <= 3.3e-76) {
tmp = t_2;
} else if (y <= 4.5e+90) {
tmp = t_3;
} else {
tmp = ((a * a) * ((b * b) * (x * x))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (a * (x * b)) - x
t_2 = (x - (b * (x * a))) - (a * (a * ((b * b) * (x * (-0.5d0)))))
t_3 = (x * -x) / t_1
if (y <= (-8.2d-273)) then
tmp = t_2
else if (y <= 1.24d-266) then
tmp = t_3
else if (y <= 3.3d-76) then
tmp = t_2
else if (y <= 4.5d+90) then
tmp = t_3
else
tmp = ((a * a) * ((b * b) * (x * x))) / 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 = (a * (x * b)) - x;
double t_2 = (x - (b * (x * a))) - (a * (a * ((b * b) * (x * -0.5))));
double t_3 = (x * -x) / t_1;
double tmp;
if (y <= -8.2e-273) {
tmp = t_2;
} else if (y <= 1.24e-266) {
tmp = t_3;
} else if (y <= 3.3e-76) {
tmp = t_2;
} else if (y <= 4.5e+90) {
tmp = t_3;
} else {
tmp = ((a * a) * ((b * b) * (x * x))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a * (x * b)) - x t_2 = (x - (b * (x * a))) - (a * (a * ((b * b) * (x * -0.5)))) t_3 = (x * -x) / t_1 tmp = 0 if y <= -8.2e-273: tmp = t_2 elif y <= 1.24e-266: tmp = t_3 elif y <= 3.3e-76: tmp = t_2 elif y <= 4.5e+90: tmp = t_3 else: tmp = ((a * a) * ((b * b) * (x * x))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * Float64(x * b)) - x) t_2 = Float64(Float64(x - Float64(b * Float64(x * a))) - Float64(a * Float64(a * Float64(Float64(b * b) * Float64(x * -0.5))))) t_3 = Float64(Float64(x * Float64(-x)) / t_1) tmp = 0.0 if (y <= -8.2e-273) tmp = t_2; elseif (y <= 1.24e-266) tmp = t_3; elseif (y <= 3.3e-76) tmp = t_2; elseif (y <= 4.5e+90) tmp = t_3; else tmp = Float64(Float64(Float64(a * a) * Float64(Float64(b * b) * Float64(x * x))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a * (x * b)) - x; t_2 = (x - (b * (x * a))) - (a * (a * ((b * b) * (x * -0.5)))); t_3 = (x * -x) / t_1; tmp = 0.0; if (y <= -8.2e-273) tmp = t_2; elseif (y <= 1.24e-266) tmp = t_3; elseif (y <= 3.3e-76) tmp = t_2; elseif (y <= 4.5e+90) tmp = t_3; else tmp = ((a * a) * ((b * b) * (x * x))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - N[(b * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(a * N[(N[(b * b), $MachinePrecision] * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * (-x)), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[y, -8.2e-273], t$95$2, If[LessEqual[y, 1.24e-266], t$95$3, If[LessEqual[y, 3.3e-76], t$95$2, If[LessEqual[y, 4.5e+90], t$95$3, N[(N[(N[(a * a), $MachinePrecision] * N[(N[(b * b), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(x \cdot b\right) - x\\
t_2 := \left(x - b \cdot \left(x \cdot a\right)\right) - a \cdot \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot -0.5\right)\right)\right)\\
t_3 := \frac{x \cdot \left(-x\right)}{t_1}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{-273}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.24 \cdot 10^{-266}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-76}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+90}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(a \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot x\right)\right)}{t_1}\\
\end{array}
\end{array}
if y < -8.2000000000000008e-273 or 1.24e-266 < y < 3.29999999999999984e-76Initial program 97.1%
fma-def97.7%
sub-neg97.7%
log1p-def99.4%
Simplified99.4%
Taylor expanded in z around 0 96.5%
mul-1-neg96.5%
unsub-neg96.5%
Applied egg-rr96.5%
Taylor expanded in y around 0 71.9%
*-commutative71.9%
exp-neg71.9%
*-commutative71.9%
exp-prod61.4%
associate-*r/61.4%
*-rgt-identity61.4%
Simplified61.4%
Taylor expanded in a around 0 23.4%
+-commutative23.4%
mul-1-neg23.4%
unsub-neg23.4%
+-commutative23.4%
mul-1-neg23.4%
associate-*r*23.4%
*-commutative23.4%
sub-neg23.4%
associate-*l*23.4%
unpow223.4%
associate-*l*24.1%
distribute-rgt-out44.8%
metadata-eval44.8%
associate-*l*44.8%
Simplified44.8%
if -8.2000000000000008e-273 < y < 1.24e-266 or 3.29999999999999984e-76 < y < 4.5e90Initial program 90.6%
Taylor expanded in b around inf 66.4%
mul-1-neg66.4%
*-commutative66.4%
distribute-rgt-neg-in66.4%
Simplified66.4%
Taylor expanded in b around 0 27.1%
mul-1-neg27.1%
unsub-neg27.1%
Simplified27.1%
sub-neg27.1%
distribute-rgt-in27.1%
*-un-lft-identity27.1%
distribute-lft-neg-in27.1%
associate-*r*23.5%
mul-1-neg23.5%
+-commutative23.5%
flip-+20.8%
div-sub20.8%
Applied egg-rr16.9%
div-sub16.9%
Simplified16.9%
Taylor expanded in a around 0 43.8%
unpow243.8%
neg-mul-143.8%
distribute-rgt-neg-in43.8%
Simplified43.8%
if 4.5e90 < y Initial program 100.0%
Taylor expanded in b around inf 40.0%
mul-1-neg40.0%
*-commutative40.0%
distribute-rgt-neg-in40.0%
Simplified40.0%
Taylor expanded in b around 0 8.4%
mul-1-neg8.4%
unsub-neg8.4%
Simplified8.4%
sub-neg8.4%
distribute-rgt-in8.4%
*-un-lft-identity8.4%
distribute-lft-neg-in8.4%
associate-*r*8.3%
mul-1-neg8.3%
+-commutative8.3%
flip-+17.9%
div-sub17.9%
Applied egg-rr18.0%
div-sub18.0%
Simplified18.0%
Taylor expanded in a around inf 46.3%
unpow246.3%
unpow246.3%
unpow246.3%
Simplified46.3%
Final simplification44.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.65e-19) (/ (* x (- x)) (- (* a (* x b)) x)) (- (- x (* b (* x a))) (* a (* a (* (* b b) (* x -0.5)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.65e-19) {
tmp = (x * -x) / ((a * (x * b)) - x);
} else {
tmp = (x - (b * (x * a))) - (a * (a * ((b * b) * (x * -0.5))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.65d-19)) then
tmp = (x * -x) / ((a * (x * b)) - x)
else
tmp = (x - (b * (x * a))) - (a * (a * ((b * b) * (x * (-0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.65e-19) {
tmp = (x * -x) / ((a * (x * b)) - x);
} else {
tmp = (x - (b * (x * a))) - (a * (a * ((b * b) * (x * -0.5))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.65e-19: tmp = (x * -x) / ((a * (x * b)) - x) else: tmp = (x - (b * (x * a))) - (a * (a * ((b * b) * (x * -0.5)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.65e-19) tmp = Float64(Float64(x * Float64(-x)) / Float64(Float64(a * Float64(x * b)) - x)); else tmp = Float64(Float64(x - Float64(b * Float64(x * a))) - Float64(a * Float64(a * Float64(Float64(b * b) * Float64(x * -0.5))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.65e-19) tmp = (x * -x) / ((a * (x * b)) - x); else tmp = (x - (b * (x * a))) - (a * (a * ((b * b) * (x * -0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.65e-19], N[(N[(x * (-x)), $MachinePrecision] / N[(N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(b * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(a * N[(N[(b * b), $MachinePrecision] * N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{-19}:\\
\;\;\;\;\frac{x \cdot \left(-x\right)}{a \cdot \left(x \cdot b\right) - x}\\
\mathbf{else}:\\
\;\;\;\;\left(x - b \cdot \left(x \cdot a\right)\right) - a \cdot \left(a \cdot \left(\left(b \cdot b\right) \cdot \left(x \cdot -0.5\right)\right)\right)\\
\end{array}
\end{array}
if a < -1.6499999999999999e-19Initial program 92.0%
Taylor expanded in b around inf 73.1%
mul-1-neg73.1%
*-commutative73.1%
distribute-rgt-neg-in73.1%
Simplified73.1%
Taylor expanded in b around 0 22.0%
mul-1-neg22.0%
unsub-neg22.0%
Simplified22.0%
sub-neg22.0%
distribute-rgt-in22.0%
*-un-lft-identity22.0%
distribute-lft-neg-in22.0%
associate-*r*14.6%
mul-1-neg14.6%
+-commutative14.6%
flip-+19.4%
div-sub19.4%
Applied egg-rr14.2%
div-sub14.2%
Simplified14.2%
Taylor expanded in a around 0 40.7%
unpow240.7%
neg-mul-140.7%
distribute-rgt-neg-in40.7%
Simplified40.7%
if -1.6499999999999999e-19 < a Initial program 97.5%
fma-def98.0%
sub-neg98.0%
log1p-def99.5%
Simplified99.5%
Taylor expanded in z around 0 97.0%
mul-1-neg97.0%
unsub-neg97.0%
Applied egg-rr97.0%
Taylor expanded in y around 0 64.0%
*-commutative64.0%
exp-neg64.0%
*-commutative64.0%
exp-prod56.5%
associate-*r/56.5%
*-rgt-identity56.5%
Simplified56.5%
Taylor expanded in a around 0 22.8%
+-commutative22.8%
mul-1-neg22.8%
unsub-neg22.8%
+-commutative22.8%
mul-1-neg22.8%
associate-*r*22.8%
*-commutative22.8%
sub-neg22.8%
associate-*l*22.8%
unpow222.8%
associate-*l*22.4%
distribute-rgt-out39.2%
metadata-eval39.2%
associate-*l*39.2%
Simplified39.2%
Final simplification39.6%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -4.5e-33)
(not
(or (<= y -8.2e-278) (and (not (<= y 4e-283)) (<= y 1.45e-116)))))
(/ (* x (- x)) (- (* a (* x b)) x))
(* x (- 1.0 (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.5e-33) || !((y <= -8.2e-278) || (!(y <= 4e-283) && (y <= 1.45e-116)))) {
tmp = (x * -x) / ((a * (x * b)) - x);
} else {
tmp = x * (1.0 - (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 <= (-4.5d-33)) .or. (.not. (y <= (-8.2d-278)) .or. (.not. (y <= 4d-283)) .and. (y <= 1.45d-116))) then
tmp = (x * -x) / ((a * (x * b)) - x)
else
tmp = x * (1.0d0 - (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 <= -4.5e-33) || !((y <= -8.2e-278) || (!(y <= 4e-283) && (y <= 1.45e-116)))) {
tmp = (x * -x) / ((a * (x * b)) - x);
} else {
tmp = x * (1.0 - (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.5e-33) or not ((y <= -8.2e-278) or (not (y <= 4e-283) and (y <= 1.45e-116))): tmp = (x * -x) / ((a * (x * b)) - x) else: tmp = x * (1.0 - (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.5e-33) || !((y <= -8.2e-278) || (!(y <= 4e-283) && (y <= 1.45e-116)))) tmp = Float64(Float64(x * Float64(-x)) / Float64(Float64(a * Float64(x * b)) - x)); else tmp = Float64(x * Float64(1.0 - Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.5e-33) || ~(((y <= -8.2e-278) || (~((y <= 4e-283)) && (y <= 1.45e-116))))) tmp = (x * -x) / ((a * (x * b)) - x); else tmp = x * (1.0 - (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.5e-33], N[Not[Or[LessEqual[y, -8.2e-278], And[N[Not[LessEqual[y, 4e-283]], $MachinePrecision], LessEqual[y, 1.45e-116]]]], $MachinePrecision]], N[(N[(x * (-x)), $MachinePrecision] / N[(N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-33} \lor \neg \left(y \leq -8.2 \cdot 10^{-278} \lor \neg \left(y \leq 4 \cdot 10^{-283}\right) \land y \leq 1.45 \cdot 10^{-116}\right):\\
\;\;\;\;\frac{x \cdot \left(-x\right)}{a \cdot \left(x \cdot b\right) - x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\end{array}
\end{array}
if y < -4.49999999999999991e-33 or -8.20000000000000002e-278 < y < 3.99999999999999979e-283 or 1.4499999999999999e-116 < y Initial program 95.8%
Taylor expanded in b around inf 54.1%
mul-1-neg54.1%
*-commutative54.1%
distribute-rgt-neg-in54.1%
Simplified54.1%
Taylor expanded in b around 0 14.9%
mul-1-neg14.9%
unsub-neg14.9%
Simplified14.9%
sub-neg14.9%
distribute-rgt-in14.9%
*-un-lft-identity14.9%
distribute-lft-neg-in14.9%
associate-*r*13.3%
mul-1-neg13.3%
+-commutative13.3%
flip-+18.6%
div-sub18.6%
Applied egg-rr14.3%
div-sub14.3%
Simplified14.3%
Taylor expanded in a around 0 33.9%
unpow233.9%
neg-mul-133.9%
distribute-rgt-neg-in33.9%
Simplified33.9%
if -4.49999999999999991e-33 < y < -8.20000000000000002e-278 or 3.99999999999999979e-283 < y < 1.4499999999999999e-116Initial program 96.8%
Taylor expanded in b around inf 87.8%
mul-1-neg87.8%
*-commutative87.8%
distribute-rgt-neg-in87.8%
Simplified87.8%
Taylor expanded in b around 0 55.9%
mul-1-neg55.9%
unsub-neg55.9%
Simplified55.9%
Final simplification41.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.12e+41)
(* a (* x (- b)))
(if (<= y 6.5e-126)
(* x (- 1.0 (* a b)))
(if (<= y 1.9e-6) (/ x (+ 1.0 (* a b))) (* b (* a (- x)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.12e+41) {
tmp = a * (x * -b);
} else if (y <= 6.5e-126) {
tmp = x * (1.0 - (a * b));
} else if (y <= 1.9e-6) {
tmp = x / (1.0 + (a * b));
} else {
tmp = b * (a * -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 <= (-1.12d+41)) then
tmp = a * (x * -b)
else if (y <= 6.5d-126) then
tmp = x * (1.0d0 - (a * b))
else if (y <= 1.9d-6) then
tmp = x / (1.0d0 + (a * b))
else
tmp = b * (a * -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 <= -1.12e+41) {
tmp = a * (x * -b);
} else if (y <= 6.5e-126) {
tmp = x * (1.0 - (a * b));
} else if (y <= 1.9e-6) {
tmp = x / (1.0 + (a * b));
} else {
tmp = b * (a * -x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.12e+41: tmp = a * (x * -b) elif y <= 6.5e-126: tmp = x * (1.0 - (a * b)) elif y <= 1.9e-6: tmp = x / (1.0 + (a * b)) else: tmp = b * (a * -x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.12e+41) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 6.5e-126) tmp = Float64(x * Float64(1.0 - Float64(a * b))); elseif (y <= 1.9e-6) tmp = Float64(x / Float64(1.0 + Float64(a * b))); else tmp = Float64(b * Float64(a * Float64(-x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.12e+41) tmp = a * (x * -b); elseif (y <= 6.5e-126) tmp = x * (1.0 - (a * b)); elseif (y <= 1.9e-6) tmp = x / (1.0 + (a * b)); else tmp = b * (a * -x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.12e+41], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e-126], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-6], N[(x / N[(1.0 + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * (-x)), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+41}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-126}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-6}:\\
\;\;\;\;\frac{x}{1 + a \cdot b}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot \left(-x\right)\right)\\
\end{array}
\end{array}
if y < -1.1200000000000001e41Initial program 96.0%
Taylor expanded in b around inf 44.2%
mul-1-neg44.2%
*-commutative44.2%
distribute-rgt-neg-in44.2%
Simplified44.2%
Taylor expanded in b around 0 9.2%
mul-1-neg9.2%
unsub-neg9.2%
Simplified9.2%
Taylor expanded in a around inf 22.0%
neg-mul-122.0%
distribute-rgt-neg-in22.0%
Simplified22.0%
if -1.1200000000000001e41 < y < 6.50000000000000014e-126Initial program 94.5%
Taylor expanded in b around inf 82.5%
mul-1-neg82.5%
*-commutative82.5%
distribute-rgt-neg-in82.5%
Simplified82.5%
Taylor expanded in b around 0 48.1%
mul-1-neg48.1%
unsub-neg48.1%
Simplified48.1%
if 6.50000000000000014e-126 < y < 1.9e-6Initial program 100.0%
fma-def100.0%
sub-neg100.0%
log1p-def100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
unsub-neg100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 74.8%
*-commutative74.8%
exp-neg74.8%
*-commutative74.8%
exp-prod65.4%
associate-*r/65.4%
*-rgt-identity65.4%
Simplified65.4%
Taylor expanded in b around 0 32.3%
if 1.9e-6 < y Initial program 98.1%
Taylor expanded in b around inf 42.1%
mul-1-neg42.1%
*-commutative42.1%
distribute-rgt-neg-in42.1%
Simplified42.1%
Taylor expanded in b around 0 12.9%
mul-1-neg12.9%
unsub-neg12.9%
Simplified12.9%
Taylor expanded in a around inf 26.6%
neg-mul-126.6%
distribute-rgt-neg-in26.6%
Simplified26.6%
Taylor expanded in a around 0 26.6%
mul-1-neg26.6%
associate-*r*30.3%
*-commutative30.3%
distribute-rgt-neg-in30.3%
associate-*l*34.2%
Simplified34.2%
Final simplification38.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.35e+41) (* a (* x (- b))) (if (<= y 2.25e-116) (* x (- 1.0 (* a b))) (* b (* a (- x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.35e+41) {
tmp = a * (x * -b);
} else if (y <= 2.25e-116) {
tmp = x * (1.0 - (a * b));
} else {
tmp = b * (a * -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 <= (-3.35d+41)) then
tmp = a * (x * -b)
else if (y <= 2.25d-116) then
tmp = x * (1.0d0 - (a * b))
else
tmp = b * (a * -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 <= -3.35e+41) {
tmp = a * (x * -b);
} else if (y <= 2.25e-116) {
tmp = x * (1.0 - (a * b));
} else {
tmp = b * (a * -x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.35e+41: tmp = a * (x * -b) elif y <= 2.25e-116: tmp = x * (1.0 - (a * b)) else: tmp = b * (a * -x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.35e+41) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 2.25e-116) tmp = Float64(x * Float64(1.0 - Float64(a * b))); else tmp = Float64(b * Float64(a * Float64(-x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.35e+41) tmp = a * (x * -b); elseif (y <= 2.25e-116) tmp = x * (1.0 - (a * b)); else tmp = b * (a * -x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.35e+41], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e-116], N[(x * N[(1.0 - N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * (-x)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.35 \cdot 10^{+41}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-116}:\\
\;\;\;\;x \cdot \left(1 - a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot \left(-x\right)\right)\\
\end{array}
\end{array}
if y < -3.3499999999999998e41Initial program 96.0%
Taylor expanded in b around inf 44.2%
mul-1-neg44.2%
*-commutative44.2%
distribute-rgt-neg-in44.2%
Simplified44.2%
Taylor expanded in b around 0 9.2%
mul-1-neg9.2%
unsub-neg9.2%
Simplified9.2%
Taylor expanded in a around inf 22.0%
neg-mul-122.0%
distribute-rgt-neg-in22.0%
Simplified22.0%
if -3.3499999999999998e41 < y < 2.25000000000000006e-116Initial program 94.6%
Taylor expanded in b around inf 82.8%
mul-1-neg82.8%
*-commutative82.8%
distribute-rgt-neg-in82.8%
Simplified82.8%
Taylor expanded in b around 0 48.2%
mul-1-neg48.2%
unsub-neg48.2%
Simplified48.2%
if 2.25000000000000006e-116 < y Initial program 98.8%
Taylor expanded in b around inf 53.5%
mul-1-neg53.5%
*-commutative53.5%
distribute-rgt-neg-in53.5%
Simplified53.5%
Taylor expanded in b around 0 12.8%
mul-1-neg12.8%
unsub-neg12.8%
Simplified12.8%
Taylor expanded in a around inf 20.2%
neg-mul-120.2%
distribute-rgt-neg-in20.2%
Simplified20.2%
Taylor expanded in a around 0 20.2%
mul-1-neg20.2%
associate-*r*22.6%
*-commutative22.6%
distribute-rgt-neg-in22.6%
associate-*l*27.4%
Simplified27.4%
Final simplification36.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.35e-16) (not (<= y 8.2e-5))) (* a (* x (- b))) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.35e-16) || !(y <= 8.2e-5)) {
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 <= (-1.35d-16)) .or. (.not. (y <= 8.2d-5))) 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 <= -1.35e-16) || !(y <= 8.2e-5)) {
tmp = a * (x * -b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.35e-16) or not (y <= 8.2e-5): tmp = a * (x * -b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.35e-16) || !(y <= 8.2e-5)) 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 <= -1.35e-16) || ~((y <= 8.2e-5))) tmp = a * (x * -b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.35e-16], N[Not[LessEqual[y, 8.2e-5]], $MachinePrecision]], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-16} \lor \neg \left(y \leq 8.2 \cdot 10^{-5}\right):\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.35e-16 or 8.20000000000000009e-5 < y Initial program 98.2%
Taylor expanded in b around inf 45.0%
mul-1-neg45.0%
*-commutative45.0%
distribute-rgt-neg-in45.0%
Simplified45.0%
Taylor expanded in b around 0 12.6%
mul-1-neg12.6%
unsub-neg12.6%
Simplified12.6%
Taylor expanded in a around inf 22.6%
neg-mul-122.6%
distribute-rgt-neg-in22.6%
Simplified22.6%
if -1.35e-16 < y < 8.20000000000000009e-5Initial program 94.5%
Taylor expanded in b around inf 83.2%
mul-1-neg83.2%
*-commutative83.2%
distribute-rgt-neg-in83.2%
Simplified83.2%
Taylor expanded in b around 0 32.6%
Final simplification28.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6e-17) (* a (* x (- b))) (if (<= y 4.1e-103) x (* b (* a (- x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6e-17) {
tmp = a * (x * -b);
} else if (y <= 4.1e-103) {
tmp = x;
} else {
tmp = b * (a * -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 <= (-6d-17)) then
tmp = a * (x * -b)
else if (y <= 4.1d-103) then
tmp = x
else
tmp = b * (a * -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 <= -6e-17) {
tmp = a * (x * -b);
} else if (y <= 4.1e-103) {
tmp = x;
} else {
tmp = b * (a * -x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6e-17: tmp = a * (x * -b) elif y <= 4.1e-103: tmp = x else: tmp = b * (a * -x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6e-17) tmp = Float64(a * Float64(x * Float64(-b))); elseif (y <= 4.1e-103) tmp = x; else tmp = Float64(b * Float64(a * Float64(-x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6e-17) tmp = a * (x * -b); elseif (y <= 4.1e-103) tmp = x; else tmp = b * (a * -x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6e-17], N[(a * N[(x * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e-103], x, N[(b * N[(a * (-x)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{-17}:\\
\;\;\;\;a \cdot \left(x \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-103}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot \left(-x\right)\right)\\
\end{array}
\end{array}
if y < -6.00000000000000012e-17Initial program 96.9%
Taylor expanded in b around inf 46.7%
mul-1-neg46.7%
*-commutative46.7%
distribute-rgt-neg-in46.7%
Simplified46.7%
Taylor expanded in b around 0 12.3%
mul-1-neg12.3%
unsub-neg12.3%
Simplified12.3%
Taylor expanded in a around inf 19.2%
neg-mul-119.2%
distribute-rgt-neg-in19.2%
Simplified19.2%
if -6.00000000000000012e-17 < y < 4.09999999999999996e-103Initial program 94.1%
Taylor expanded in b around inf 87.0%
mul-1-neg87.0%
*-commutative87.0%
distribute-rgt-neg-in87.0%
Simplified87.0%
Taylor expanded in b around 0 37.5%
if 4.09999999999999996e-103 < y Initial program 98.7%
Taylor expanded in b around inf 51.0%
mul-1-neg51.0%
*-commutative51.0%
distribute-rgt-neg-in51.0%
Simplified51.0%
Taylor expanded in b around 0 13.3%
mul-1-neg13.3%
unsub-neg13.3%
Simplified13.3%
Taylor expanded in a around inf 21.1%
neg-mul-121.1%
distribute-rgt-neg-in21.1%
Simplified21.1%
Taylor expanded in a around 0 21.1%
mul-1-neg21.1%
associate-*r*23.7%
*-commutative23.7%
distribute-rgt-neg-in23.7%
associate-*l*28.8%
Simplified28.8%
Final simplification30.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -8.5e-39) (* x (* a (- b))) (if (<= y 4.1e-103) x (* b (* a (- x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.5e-39) {
tmp = x * (a * -b);
} else if (y <= 4.1e-103) {
tmp = x;
} else {
tmp = b * (a * -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 <= (-8.5d-39)) then
tmp = x * (a * -b)
else if (y <= 4.1d-103) then
tmp = x
else
tmp = b * (a * -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 <= -8.5e-39) {
tmp = x * (a * -b);
} else if (y <= 4.1e-103) {
tmp = x;
} else {
tmp = b * (a * -x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.5e-39: tmp = x * (a * -b) elif y <= 4.1e-103: tmp = x else: tmp = b * (a * -x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.5e-39) tmp = Float64(x * Float64(a * Float64(-b))); elseif (y <= 4.1e-103) tmp = x; else tmp = Float64(b * Float64(a * Float64(-x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8.5e-39) tmp = x * (a * -b); elseif (y <= 4.1e-103) tmp = x; else tmp = b * (a * -x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.5e-39], N[(x * N[(a * (-b)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e-103], x, N[(b * N[(a * (-x)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-39}:\\
\;\;\;\;x \cdot \left(a \cdot \left(-b\right)\right)\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-103}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot \left(-x\right)\right)\\
\end{array}
\end{array}
if y < -8.5000000000000005e-39Initial program 97.1%
Taylor expanded in b around inf 49.7%
mul-1-neg49.7%
*-commutative49.7%
distribute-rgt-neg-in49.7%
Simplified49.7%
Taylor expanded in b around 0 13.1%
mul-1-neg13.1%
unsub-neg13.1%
Simplified13.1%
Taylor expanded in a around inf 18.3%
neg-mul-118.3%
distribute-rgt-neg-in18.3%
Simplified18.3%
Taylor expanded in a around 0 18.3%
mul-1-neg18.3%
associate-*r*19.4%
*-commutative19.4%
distribute-rgt-neg-in19.4%
*-commutative19.4%
Simplified19.4%
if -8.5000000000000005e-39 < y < 4.09999999999999996e-103Initial program 93.9%
Taylor expanded in b around inf 86.5%
mul-1-neg86.5%
*-commutative86.5%
distribute-rgt-neg-in86.5%
Simplified86.5%
Taylor expanded in b around 0 38.7%
if 4.09999999999999996e-103 < y Initial program 98.7%
Taylor expanded in b around inf 51.0%
mul-1-neg51.0%
*-commutative51.0%
distribute-rgt-neg-in51.0%
Simplified51.0%
Taylor expanded in b around 0 13.3%
mul-1-neg13.3%
unsub-neg13.3%
Simplified13.3%
Taylor expanded in a around inf 21.1%
neg-mul-121.1%
distribute-rgt-neg-in21.1%
Simplified21.1%
Taylor expanded in a around 0 21.1%
mul-1-neg21.1%
associate-*r*23.7%
*-commutative23.7%
distribute-rgt-neg-in23.7%
associate-*l*28.8%
Simplified28.8%
Final simplification30.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -986000000.0) (not (<= y 5.8e+33))) (* a (* x b)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -986000000.0) || !(y <= 5.8e+33)) {
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 <= (-986000000.0d0)) .or. (.not. (y <= 5.8d+33))) 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 <= -986000000.0) || !(y <= 5.8e+33)) {
tmp = a * (x * b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -986000000.0) or not (y <= 5.8e+33): tmp = a * (x * b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -986000000.0) || !(y <= 5.8e+33)) tmp = Float64(a * Float64(x * b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -986000000.0) || ~((y <= 5.8e+33))) tmp = a * (x * b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -986000000.0], N[Not[LessEqual[y, 5.8e+33]], $MachinePrecision]], N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -986000000 \lor \neg \left(y \leq 5.8 \cdot 10^{+33}\right):\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.86e8 or 5.80000000000000049e33 < y Initial program 98.1%
Taylor expanded in b around inf 43.5%
mul-1-neg43.5%
*-commutative43.5%
distribute-rgt-neg-in43.5%
Simplified43.5%
exp-prod44.5%
add-sqr-sqrt19.3%
sqrt-unprod22.1%
sqr-neg22.1%
sqrt-unprod10.1%
add-sqr-sqrt13.3%
exp-prod13.2%
*-commutative13.2%
exp-prod13.2%
Applied egg-rr13.2%
Taylor expanded in a around 0 6.6%
Taylor expanded in a around inf 20.0%
if -9.86e8 < y < 5.80000000000000049e33Initial program 94.9%
Taylor expanded in b around inf 81.7%
mul-1-neg81.7%
*-commutative81.7%
distribute-rgt-neg-in81.7%
Simplified81.7%
Taylor expanded in b around 0 30.6%
Final simplification26.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -986000000.0) (* a (* x b)) (if (<= y 45000000000000.0) x (* b (* x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -986000000.0) {
tmp = a * (x * b);
} else if (y <= 45000000000000.0) {
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 <= (-986000000.0d0)) then
tmp = a * (x * b)
else if (y <= 45000000000000.0d0) 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 <= -986000000.0) {
tmp = a * (x * b);
} else if (y <= 45000000000000.0) {
tmp = x;
} else {
tmp = b * (x * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -986000000.0: tmp = a * (x * b) elif y <= 45000000000000.0: tmp = x else: tmp = b * (x * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -986000000.0) tmp = Float64(a * Float64(x * b)); elseif (y <= 45000000000000.0) tmp = x; else tmp = Float64(b * Float64(x * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -986000000.0) tmp = a * (x * b); elseif (y <= 45000000000000.0) tmp = x; else tmp = b * (x * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -986000000.0], N[(a * N[(x * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 45000000000000.0], x, N[(b * N[(x * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -986000000:\\
\;\;\;\;a \cdot \left(x \cdot b\right)\\
\mathbf{elif}\;y \leq 45000000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(x \cdot a\right)\\
\end{array}
\end{array}
if y < -9.86e8Initial program 96.6%
Taylor expanded in b around inf 45.3%
mul-1-neg45.3%
*-commutative45.3%
distribute-rgt-neg-in45.3%
Simplified45.3%
exp-prod43.8%
add-sqr-sqrt17.7%
sqrt-unprod20.3%
sqr-neg20.3%
sqrt-unprod9.6%
add-sqr-sqrt11.5%
exp-prod13.0%
*-commutative13.0%
exp-prod11.3%
Applied egg-rr11.3%
Taylor expanded in a around 0 9.4%
Taylor expanded in a around inf 18.4%
if -9.86e8 < y < 4.5e13Initial program 94.8%
Taylor expanded in b around inf 82.2%
mul-1-neg82.2%
*-commutative82.2%
distribute-rgt-neg-in82.2%
Simplified82.2%
Taylor expanded in b around 0 30.8%
if 4.5e13 < y Initial program 100.0%
Taylor expanded in b around inf 40.4%
mul-1-neg40.4%
*-commutative40.4%
distribute-rgt-neg-in40.4%
Simplified40.4%
exp-prod44.5%
add-sqr-sqrt20.9%
sqrt-unprod23.8%
sqr-neg23.8%
sqrt-unprod10.6%
add-sqr-sqrt15.2%
exp-prod15.3%
*-commutative15.3%
exp-prod17.4%
Applied egg-rr17.4%
Taylor expanded in a around 0 3.0%
Taylor expanded in a around inf 21.5%
associate-*r*21.5%
*-commutative21.5%
associate-*l*27.6%
Simplified27.6%
Final simplification27.4%
(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.2%
Taylor expanded in b around inf 66.2%
mul-1-neg66.2%
*-commutative66.2%
distribute-rgt-neg-in66.2%
Simplified66.2%
Taylor expanded in b around 0 19.8%
Final simplification19.8%
herbie shell --seed 2023185
(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))))))