Skip to content

Aa exp handling#13

Merged
vrastil merged 5 commits intomasterfrom
aa_exp_handling
Jul 3, 2017
Merged

Aa exp handling#13
vrastil merged 5 commits intomasterfrom
aa_exp_handling

Conversation

@vrastil
Copy link
Copy Markdown
Owner

@vrastil vrastil commented Jul 3, 2017

Solved problems with overflowing by not evaluating the exponential directly but by storing the highest exponent and writing the sum as:

\sum{\exp{x_i}} = \exp{x_max} \sum{exp{x_i - x_max}}

Terms in the sum are always less (or equal) to 1 (by definition) and are evaluated only if its contribution to the sum is significant -- for now that means if they are greater than 1e-8. This accuracy will be a free parameter of simulations in the future.

@vrastil vrastil merged commit 7c988fe into master Jul 3, 2017
@vrastil vrastil deleted the aa_exp_handling branch July 3, 2017 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant