Klang C++ 0.7.15
Language Reference (draft)
Loading...
Searching...
No Matches
log10

Language Guide / Functions ยท Generated namespace reference

log10

klang::log10

Logarithm with base ten.

Returns the base-10 logarithm of a positive value. One application is converting an amplitude ratio to decibels.

0.05-1.31.04-0.8252.02-0.3493.010.12640.602ResultInput x
log10(x)

Based on std::log10.

Direct call

const signal level = 20 * log10(max(abs(sample), 0.001));

Signal flow

const signal level = (sample >> abs >> max(0.001) >> log10) * 20;