# Questions tagged [underflow]

The tag has no usage guidance.

14 questions
Filter by
Sorted by
Tagged with
84 views

• 141
45 views

### Equivalent of log sum exp trick for subtraction [duplicate]

I have two small positive real numbers $u, w$ such that $u > w$. Given $\log(u), \log(w)$ I'd like to find a numerically stable way to calculate $\log(u - w)$. One possible way of transforming the ...
• 43
488 views

### Computation within log space

What is the conversion of the following equation into log space? $bf2 = 1 + (p * (bf1 - 1))$ Given log.bf1 (log Bayes factor), how do I get to log.bf2 without having to compute bf1, but instead ...
1k views

### Subtracting very small probabilities - How to compute? [duplicate]

This question is an extension of a related question about adding small probabilities. Suppose you have log-probabilities $\ell_1 \geqslant \ell_2$, where the corresponding probabilities $\exp(\ell_1)$...
• 119k
1k views

### Vectorised computation of logsumexp

In this related post there is an explanation of how you can add together two very small probabilities using the logsumexp function, and how this can be programmed into base ...
• 119k
1k views

### Adding very small probabilities—How to compute?

In some problems, probabilities are so small that they are best represented in computational facilities as log-probabilities. Computational problems can arise when you try to add these small ...
• 119k
1 vote
150 views

### Underflow when estimating marginal likelihood via bridge sampling

I try to use an iterative procedure to estimate the marginal likelihood in a Bayesian setting for model selection. In case you are interested in the specifics of bridge sampling in my application, see ...
• 690
148 views

### Avoiding Matlab's underflow prevention in backprop, due to performance cost

In Matlab, I understand that if a number gets closer to zero than realmin, then Matlab converts the double to a denorm . I am noticing this causes significant ...
• 223
537 views

### How to randomly sample values given the extremly small and large log-probabilities? [duplicate]

Assume a long list of log-values. The list consists of very small negative numbers, very large negative numbers, as well as very large positive numbers. To avoid numerical overflow/underflow, I need ...
• 1,432
2k views

### Kernel density estimation on bounded support?

I was looking for some way to deal with boundary bias of kde in case of a unit interval. One example is an usage of Chen estimators (or Beta estimators; an example might be seen here: http://stats-www....
• 91
1 vote
99 views

### Sum of very low probability [duplicate]

I have a score of some feature, $F_1$ and $F_2$ where this score is the logarithm of probability. This score is very low and very sparse, for example i have: $F_1$ with score $-800$ $F_2$ with ...
• 599