[issue34923] Decimal Multiplication problems: Wrong solution

2018-10-07 Thread Shadow Raven
Shadow Raven added the comment: Oh okay thanks -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34923> ___ __

[issue34923] Decimal Multiplication problems: Wrong solution

2018-10-07 Thread Shadow Raven
New submission from Shadow Raven : Some decimals, when multiplied with others, give wrong solutions: 6.23*5 = 31.152 6.89*5 = 34.446 There are more but I can't list all. -- messages: 327290 nosy: Shadow Raven priority: normal severity: normal status: open

[issue9059] Backwards compatibility

2010-06-23 Thread Raven Demeyer
New submission from Raven Demeyer raven.deme...@gmail.com: Python 3 is not backwards compatible with Python 2. Example: Python 2: print 'foo' Python 3: print(bar) Problem: Code written for Python during version 2 cannot be used/compiled in version 3 Solution: Just like any decent self

Re: Easy-to-use Python GUI

2008-12-24 Thread Raven
On 25 дек, 06:47, Joel Koltner zapwiredashgro...@yahoo.com wrote: Is there an easy-to-use, function-based cross-platform GUI toolkit for Python out there that's a little more sophisticated than EasyGui?  EasyGui looks good, but it's a little more restrictive than what I'd like to have, yet I'm

cxFreeze executable linked to /usr/lib/libpython2.3.so

2006-06-06 Thread Raven
Hi, I compiled a python script using cxFreeze because I need a standalone application, while the Windows version runs without any python installation the linux version of the executable is linked to libpython2.3.so.1.0 = /usr/lib/libpython2.3.so.1.0 thus the end user have to install python 2.3

Re: wxTreeCtrl Q?

2006-02-01 Thread Raven
I hope this can help: http://wxwidgets.org/manuals/2.6.1/wx_wxtreectrl.html#wxtreectrlsetitemfont http://wxwidgets.org/manuals/2.6.1/wx_wxtreectrl.html#wxtreectrlsetitembold This pages are from the wxwidgets api reference but the functions are the same in wxPython Bye Ale --

Re: Hypergeometric distribution

2006-01-04 Thread Raven
. The first suggestion, the one by Robert Kern, resolved my problem: Raven wrote: Thanks to all of you guys, I could resolve my problem using the logarithms as proposed by Robert. Then the other guys gave alternative solutions so I tried them out. So form me the suggestions offered are more than

Re: Hypergeometric distribution

2006-01-03 Thread Raven
Travis E. Oliphant wrote: Notice the keyword for the comb function (in scipy) lets you use it to compute exact values. SciPy does not just automatically use the long integer because this will always slow you down. comb(N, k, exact=0) Combinations of N things taken k at a time. If

Re: Hypergeometric distribution

2006-01-02 Thread Raven
Well, what to say? I am very happy for all the solutions you guys have posted :-) For Paul: I would prefer not to use Stirling's approximation The problem with long integers is that to calculate the hypergeometric I need to do float division and multiplication because integer division returns 0.

Re: Hypergeometric distribution

2006-01-02 Thread Raven
Scott David Daniels ha scritto: You should really look into the timeit module -- you'll get nice solid timings slightly easier to tweak. This seems a very interesting module, I will give it a try as soon as possible. Thanks Scott. Ale -- http://mail.python.org/mailman/listinfo/python-list

Re: Hypergeometric distribution

2006-01-02 Thread Raven
Bengt Richter wrote: ISTM you wouldn't get zero if you scaled by 10**significant_digits (however many you require) before dividing. E.g., expected hits per trillion (or septillion or whatever) expresses probability too. Perhaps that could work in your calculation? Regards, Bengt

Re: Hypergeometric distribution

2006-01-02 Thread Raven
Bengt Richter wrote: ISTM you wouldn't get zero if you scaled by 10**significant_digits (however many you require) before dividing. E.g., expected hits per trillion (or septillion or whatever) expresses probability too. Perhaps that could work in your calculation? Regards, Bengt

Re: Hypergeometric distribution

2006-01-01 Thread Raven
Thanks Steven for your very interesting post. This was a critical instance from my problem: from scipy import comb comb(14354,174) inf The scipy.stats.distributions.hypergeom function uses the scipy.comb function, so it returned nan since it tries to divide an infinite. I did not tried to

Re: Hypergeometric distribution

2005-12-31 Thread Raven
Thanks to all of you guys, I could resolve my problem using the logarithms as proposed by Robert. I needed to calculate the factorial for genomic data, more specifically for the number of genes in the human genome i.e. about 30.000 and that is a big number :-) I didn't know gmpy Thanks a lot,

Hypergeometric distribution

2005-12-26 Thread Raven
Hi to all, I need to calculate the hpergeometric distribution: choose(r, x) * choose(b, n-x) p(x; r,b,n) = - choose(r+b, n) choose(r,x) is the binomial coefficient I use the factorial to calculate the above