Пример #1
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]
Пример #2
0
 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
 def bernoulli(ctx, n):
     return ctx.make_mpf(libmp.mpf_bernoulli(int(n), *ctx._prec_rounding))