Create an account Log In

# Methods for calculating precise logarithm of a sum and subtraction (Scripts) 1.0

Average Rating
User Rating:
Visitors Rating:
My rating:

• Last update: 5 years ago
• Total downloads: 117
• Operating system: Linux, Mac OS X, Win All, BSD, Solaris
• Publisher: Roland Pihlakas
See full specifications

## Methods for calculating precise logarithm of a sum and subtraction (Scripts) Publisher's description

### Disclosed are methods to compute the precise value of the logarithm of a sum and the logarithm of a subtraction.

Disclosed are methods to compute the precise value of the logarithm of a sum and the logarithm of a subtraction.

A number of practical problems can result in having too big or small values in intermediate values of a calculation. Then one tries to take logarithm of these values and operate on logarithms instead.

In the case: log (p вЂў q) = log p + log q is very easy to compute, but the problem is then to compute (or approximate) the value of log (a + b) from the value of log a and log b.

Let us assume that log a and log b are known, and that we want to approximate log (a + b).
Most basic solution would be calculating
sum_log = log(exp(a_log) + exp(b_log),
where a_log = log a and b_log = log b and therefore sum_log = log(a + b).
But the method I propose requires calling only one exp() and one log(), instead of two exp() and one log() in the basic solution.
Additionally, the proposed method has the critical advantage of not overflowing in case of large numbers of a and b.

The method is based on the notion that
ln(a + b) = ln{exp[ln(a) - ln(b)] + 1} + ln(b).

In a similar manner we can compute the logarithm of subtraction, based on the notion that
ln(a - b) = ln{exp[ln(a) - ln(b)] - 1} + ln(b), if a > b.

#### System Requirements:

MATLAB 7.4 (R2007a)
Program Release Status: New Release
Program Install Support: Install and Uninstall

#### Methods for calculating precise logarithm of a sum and subtraction (Scripts) Tags:

Click on a tag to find related softwares

### Is Methods for calculating precise logarithm of a sum and subtraction (Scripts) your software?

Manage your software

## Most Popular

ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.