Reference×
Reference
- [] (array access)
- = (assign)
- catch
- class
- , (comma)
- // (comment)
- {} (curly braces)
- /** */ (doc comment)
- . (dot)
- draw()
- exit()
- extends
- false
- final
- implements
- import
- loop()
- /* */ (multiline comment)
- new
- noLoop()
- null
- () (parentheses)
- popStyle()
- pop()
- private
- public
- pushStyle()
- push()
- redraw()
- return
- ; (semicolon)
- setLocation()
- setResizable()
- setTitle()
- setup()
- static
- super
- this
- thread()
- true
- try
- void
Name
log()
Description
Calculates the natural logarithm (the base-e logarithm) of a number. This function expects the values greater than 0.0.
Examples
void setup() { int i = 12; println(log(i)); println(log10(i)); } // Calculates the base-10 logarithm of a number float log10 (int x) { return (log(x) / log(10)); }
Syntax
log(n)
Parameters
n
(float)
number greater than 0.0
Return
float

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.