Java Reference
In-Depth Information
mulas and identities allow using the natural logarithm to obtain logs to
other bases,as well as calculating anti-logarithms. The following formula
log ( )
x
log ( )
x
=
e
n
log ( )
n
e
allows using the natural log to obtain logs to other bases:
log ( )
x
log ( )
x
=
e
10
log (10)
log ( )
e
x
log ( )
x
=
e
2
log (2)
e
For example,to obtain the common logarithm (base 10) and the binary
logarithm (base 2) we can calculate:
Calculating antilogarithms
x
alog ( )
b xb
=
Antilogarithms are the inverse function of the logarithm. The following for-
mula generalizes antilogarithms to any base (b):
alog ( ) 10
alog ( )
x
xe
=
=
x
10
x
e
The natural (base e) and common (base 10) antilogarithms are defined
as follows:
The following program uses the preceding formulas to calculate natu-
ral and common logarithms and antilogarithms.
// Java for Engineers
// Filename: Logs
// Reference: Chapter 23
// Description:
//
Conversion between polar and rectangular
//
coordinates
Search WWH ::




Custom Search