Tandy 1000 Basic Reference Manual page 214

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 10 I
BASIC
Keywords
LOG
Function
LOG( number)
Returns the natural logarithm of
number.
Number
must be greater than zero. LOG is the inverse of the
EXP
function.
BASIC always returns the result as a single precision number.
Examples
P R I N T LOG(3.14159)
prints the value 1.144729
Z
=
10
LOG(PS/Pl)
performs the indicated calculation and assigns the value to
Z.
Sample Program
This program demonstrates the use of
LOG.
It utilizes a formula
taken from space communications research.
5 4 0 I N P U T " D I S T A N C E S I G N A L M U S T T R A V E L (MILES)";
D
5 5 0 I N P U T "SIGNAL F R E Q U E N C Y (GIGAHERTZ)".
F
5 6 0
L
=
9 6 . 5 8
+
( 2 0
*
LOGCF))
+
(20
LOiCD))
5 7 0 P R I N T "SIGNAL S T R E N G T H L O S S
I N
F R E E S P A C E
IS"
L
"DECIBELS."
212

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents