Skip to content

Conversation

@BoyeGuillaume
Copy link

Due to some precision issue (the division operation not being very stable numerically if cdf[x+1] - cdf[x] is low) the output value of DiscretePDF::sampleReuse can sometimes lies outside the range [0, 1]. This can be problematic for all operations down the line using the precondition (for instance $\sqrt{1 - X}$). This simple fix prevent that from happenning (even if it screwed the distribution a little bit). This however should not be a problem as this issue is only an edge-case.

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