Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Programming/Code/Standard C Library/Functions/log

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

log #include <cmath> double log( double num ); The function log() returns the natural (base e) logarithm of num. There's a domain error if num is negative, a range error if num is zero. In order to calculate the logarithm of x to an arbitrary base b, you can use: double answer = log(x) / log(b); Related topics exp - log10 - pow - sqrt