[SciPy-User] Simple math question

nicky van foreest vanforeest at gmail.com
Thu Feb 14 08:31:32 EST 2013


 1 - exp(n*log(1.-p))

should do too. Taking logs is an easy way  to handle this sort of problems.


On 13 February 2013 14:45, Neal Becker <ndbecker2 at gmail.com> wrote:

> Neal Becker wrote:
>
> > josef.pktd at gmail.com wrote:
> >
> >> On Wed, Feb 13, 2013 at 8:34 AM, Neal Becker <ndbecker2 at gmail.com>
> wrote:
> >>> Pierre Barbier de Reuille wrote:
> >>>
> >>>> Assuming 0 <= p <= 1, I don't see the problem there.
> >>>>
> >>>
> >>> I had just assumed there'd be numerical accuracy issues, but maybe not.
> >>
> >> Any numerical problems that you might have with the power gets swamped
> >> because you can only get within floating point precision of 1.
> >>
> >> If the results were zero, then there are special function to get
> >> better precision for tiny numbers.
> >>
> >> AFAICS.
> >>
> >> Josef
> >
> > Here, 0 <= p < 10^-8
> Sorry, that should be 10^-8 < p < 1, so 1-p is between 0 and 1-10^-8
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20130214/7ea0012b/attachment.html>


More information about the SciPy-User mailing list