Log Function

The program multiplies two numbers using the Log function.

'Log Function Example
'Multiplies two numbers using the log method.
'***********************************************

Const base10 = Log(10)

Dim As Double l1, l2, lt, al

'Calculate the log of 2.5 for base 10
l1 = Log(2.5) / base10
'Calculate the log of 5.6 for base 10
l2 = Log(5.6) / base10

'Add the logarithms
lt = l1 + l2

'Get the antilog, which is our base (10)
'raised to the sum of the log values
al = 10^lt

'Print results
Print "2.5 * 5.6 = ";2.5 * 5.6
Print "Log method = ";al

Sleep
End