Skip to main content
Code sample in Swift, C# and Java
Main menu
About
History
Swift
C#
Java
Python
You are here
Home
»
Forums
»
Swift
»
Swift: Work with simple types
»
Swift: Work with numbers
»
Swift: Mathematical operations
Logarithm in Swift
Submitted by
obraztsov
on Tue, 11/10/2015 - 17:24
Forums:
Swift: Mathematical operations
let
number =
512.0
let
logBase =
8.0
let
result =
log
(number)/
log
(logBase)
//result is 3.0
Log in
to post comments