Skip to content

typo in lambert_w._print_latex_() #19336

@rwst

Description

@rwst

From https://groups.google.com/forum/?hl=en#!topic/sage-support/bjrk5270wEE

LaTeX output is defect.

this is probably

diff --git a/src/sage/functions/log.py b/src/sage/functions/log.py
index cc59437..17241ad 100644
--- a/src/sage/functions/log.py
+++ b/src/sage/functions/log.py
@@ -766,8 +766,8 @@ class Function_lambert_w(BuiltinFunction):
             \operatorname{W_{1}}(x)
         """
         if n == 0:
-            return r"\operatorname{W_0}(%s)" % z
+            return r"\operatorname{W_0}({%s})" % z
         else:
-            return r"\operatorname{W_{%s}}(%s)" % (n, z)
+            return r"\operatorname{W_{%s}}({%s})" % (n, z)
 
 lambert_w = Function_lambert_w()

CC: @kcrisman

Component: symbolics

Author: Frédéric Chapoton

Branch/Commit: a87b149

Reviewer: Ralf Stephan

Issue created by migration from https://trac.sagemath.org/ticket/19336

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions