A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.wikibooks.org/wiki/C++_Programming/Code/Standard_C_Library/Functions/log below:

C++ Programming/Code/Standard C Library/Functions/log - Wikibooks, open books for an open world

log[edit | edit source] Syntax
#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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4