コード例 #1
0
ファイル: ctx_fp.py プロジェクト: unix0000/sympy-polys
 def bernoulli(ctx, n):
     cache = ctx._bernoulli_cache
     if n in cache:
         return cache[n]
     cache[n] = to_float(mpf_bernoulli(n, 53, "n"), strict=True)
     return cache[n]
コード例 #2
0
ファイル: ctx_mp.py プロジェクト: Praveen-Ramanujam/MobRAVE
 def bernoulli(ctx, n):
     return ctx.make_mpf(libmp.mpf_bernoulli(int(n), *ctx._prec_rounding))
コード例 #3
0
 def bernoulli(ctx, n):
     cache = ctx._bernoulli_cache
     if n in cache:
         return cache[n]
     cache[n] = to_float(mpf_bernoulli(n, 53, 'n'), strict=True)
     return cache[n]
コード例 #4
0
ファイル: ctx_mp.py プロジェクト: unix0000/sympy-polys
 def bernoulli(ctx, n):
     return ctx.make_mpf(libmp.mpf_bernoulli(int(n), *ctx._prec_rounding))