Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit b0486c8

Browse files
committed
18970: Log function and documentation revamp
1 parent bc45dab commit b0486c8

File tree

4 files changed

+377
-315
lines changed

4 files changed

+377
-315
lines changed

src/sage/combinat/finite_state_machine_generators.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,10 @@ def to_list(output):
12971297
% (polynomial_left,))
12981298

12991299
[r, base_power_K] = list(polynomial_left)
1300-
K = log(base_power_K, base=base)
1300+
try:
1301+
K = log(base_power_K, base=base)
1302+
except RuntimeError:
1303+
K = 1
13011304
try:
13021305
K = K.simplify()
13031306
except AttributeError:

src/sage/dynamics/complex_dynamics/mandel_julia.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
checkbox)
4444
from sage.plot.colors import Color
4545
from sage.repl.image import Image
46-
from sage.functions.log import function_log as log
46+
from sage.functions.log import (log, logb)
4747
from sage.rings.rational_field import QQ
4848
from sage.rings.all import CC
4949
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
@@ -234,7 +234,7 @@ def external_ray(theta, **kwds):
234234
sharpness = kwds.get("S", 10)
235235
radial_parameter = kwds.get("R", 100)
236236
precision = kwds.get("prec", 300)
237-
precision = max(precision, -log(pixel_width * 0.001, 2).round() + 10)
237+
precision = max(precision, -logb(pixel_width * 0.001, 2).round() + 10)
238238
ray_color = kwds.get("ray_color", [255]*3)
239239
image = kwds.get("image", None)
240240
if image is None:

src/sage/ext/fast_callable.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,8 +1655,8 @@ cpdef dict get_builtin_functions():
16551655
16561656
sage: from sage.ext.fast_callable import get_builtin_functions
16571657
sage: builtins = get_builtin_functions()
1658-
sage: sorted(list(builtins.values()))
1659-
['abs', 'abs', 'acos', 'acosh', 'add', 'asin', 'asinh', 'atan', 'atanh', 'ceil', 'cos', 'cosh', 'cot', 'csc', 'div', 'div', 'exp', 'floor', 'floordiv', 'inv', 'log', 'mul', 'neg', 'pow', 'sec', 'sin', 'sinh', 'sqrt', 'sub', 'tan', 'tanh']
1658+
sage: set(builtins.values())
1659+
{'abs', 'acos', 'acosh', 'add', 'asin', 'asinh', 'atan', 'atanh', 'ceil', 'cos', 'cosh', 'cot', 'csc', 'div', 'exp', 'floor', 'floordiv', 'inv', 'log', 'mul', 'neg', 'pow', 'sec', 'sin', 'sinh', 'sqrt', 'sub', 'tan', 'tanh'}
16601660
sage: builtins[sin]
16611661
'sin'
16621662
sage: builtins[ln]

0 commit comments

Comments
 (0)