std::log
Материал из cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Заголовочный файл <cmath>
|
||
float log( float arg ); |
||
double log( double arg ); |
||
long double log( long double arg ); |
||
double log( Integral arg ); |
(начиная с C++11) | |
Computes the natural (base e) logarithm of arg
.
Содержание |
[править] Параметры
arg | - | плавающей точкой
Original: floating point value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[править] Возврат стоимости
natural logarithm of arg
.
Домен ошибка возникает, если
arg
отрицательный. NAN возвращается в том случае.Original:
Domain error occurs if
arg
is negative. NAN is returned in that case.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Диапазон ошибка возникает, если
arg
является 0. -HUGE_VAL возвращается в том случае. Original:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[править] Пример
The following code computes the binary (base 2) logarithm with help of natural logarithm.
Вывод:
8
[править] См. также
возвращает е поднял к данной мощности (ex) Original: returns e raised to the given power (ex) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (функция) | |
вычисляет общие (базовые 10) логарифм (log10(x)) Original: computes common (base 10) logarithm (log10(x)) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (функция) | |
возводит число в данном мощности (xy) Original: raises a number to the given power (xy) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (функция) | |
Комплекс натуральный логарифм с разрезов вдоль отрицательной действительной оси Original: complex natural logarithm with the branch cuts along the negative real axis The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (шаблон функции) | |
применяет функцию std::log к каждому элементу valarray Original: applies the function std::log to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (шаблон функции) |