Skip to content

Commit 30d67ba

Browse files
committed
name change of log_base in arb, docstrings for bits in arb, acb
1 parent 45e1b68 commit 30d67ba

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/flint/types/acb.pyx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,11 @@ cdef class acb(flint_scalar):
14041404
return acb_rel_one_accuracy_bits(self.val)
14051405

14061406
def bits(self):
1407+
r"""Returns maximum of :meth:`.arb.bits` called on real and imaginary part.
1408+
1409+
>>> acb("2047/2048").bits()
1410+
11
1411+
"""
14071412
return acb_bits(self.val)
14081413

14091414
def ei(s):

src/flint/types/arb.pyx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,10 +809,10 @@ cdef class arb(flint_scalar):
809809
arb_log1p((<arb>u).val, (<arb>s).val, getprec())
810810
return u
811811

812-
def log_base_ui(s, ulong b):
812+
def log_base(s, ulong b):
813813
r"""Returns `\log_b(s)`, computed exactly when possible.
814814
815-
>>> arb(2048).log_base_ui(2)
815+
>>> arb(2048).log_base(2)
816816
11.0000000000000
817817
"""
818818
u = arb.__new__(arb)
@@ -2427,6 +2427,11 @@ cdef class arb(flint_scalar):
24272427
return arb_rel_one_accuracy_bits(self.val)
24282428

24292429
def bits(self):
2430+
r"""Returns number of bits needed to represent absolute value of mantissa of the midpoint; returns 0 if midpoint is special value.
2431+
2432+
>>> arb("2047/2048").bits()
2433+
11
2434+
"""
24302435
return arb_bits(self.val)
24312436

24322437
def lambertw(s, int branch=0):

0 commit comments

Comments
 (0)