Functions and operators\log

\logCommand

Used for logarithms in algebra, calculus, asymptotics, and applied mathematics

\log
Available in
base, physics
Kind
prefix
Allowed mode
math
Frequency
3.19% of corpus formulasrank 19 of 263
Commonality
high
Renderer support
PackageMathJaxKaTeXXeTeX
baseMathJax: FullKaTeX: FullXeTeX: Full
physicsMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\log

Takes no arguments. In base. Reading argspecs

\logo[a]optional math contentd()(b)optional math content

Argspec o d() — two optional arguments. In physics. Reading argspecs

Common tasks#

How to write a logarithm#

\log x

How to write a logarithm with a base#

\log_2 n

How to write a log in big-O notation#

O(n\log n)

Examples#

physics

\log x

physics

\log[2](x)

Package variants#

PackageSignatureAllowed modeNotes
basemathUsed for logarithms in algebra, calculus, asymptotics, and applied mathematics
physicso d()mathUsed for logarithm notation, including the physics package's bracketed power/base-like form such as \log[2](x).

In TeXForm#

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

physics/named-fn-paren-expandfrom Faithfulreading

Expand physics power and auto-sized parenthesis arguments of standard named functions.

\sin(#1) \sin\left(#1\right)

See also#

Test cases#

base
InputCaseMathJaxKaTeXXeTeX
\logPositive · baselinePassPassPass
physics
InputCaseMathJaxKaTeXXeTeX
\logPositive · baselinePassPassPass
\log[a]Positive · vary:o[0]PassPassPass
\log (a)Positive · vary:d[1]PassPassPass
\log[a](b)Positive · maximalPassPassPass
All 74 in Functions and operators