Re: mpmath puzzle

2007-11-14 Thread Mark Dickinson
On Nov 14, 2:45 pm, "Fredrik Johansson" <[EMAIL PROTECTED]> wrote: > Unlike mpmath, the decimal module doesn't support non-integer powers > (except for square roots), and nor does gmpy (though you can do them > indirectly as mensanator showed earlier in the thread). And numpy / > scipy don't suppo

Re: mpmath puzzle

2007-11-14 Thread Fredrik Johansson
On Nov 14, 2007 8:21 PM, <[EMAIL PROTECTED]> wrote: > You could also use the Decimal module to keep things accurate. Some > people like numpy or scipy for the more complex math problems they do. Unlike mpmath, the decimal module doesn't support non-integer powers (except for square roots), and no

Re: mpmath puzzle

2007-11-14 Thread kyosohma
On Nov 14, 3:20 am, "Fredrik Johansson" <[EMAIL PROTECTED]> wrote: > Dick Moores wrote: > > For 1234 ** 10.9, why the wrong result from mpmath.power()? > > > > > #!/usr/bin/env python > > #coding=utf-8 > > from mpmath import * > > > mpf.dps = 32 > > > x = mp

Re: mpmath puzzle

2007-11-14 Thread [EMAIL PROTECTED]
On Nov 13, 11:55 pm, Dick Moores <[EMAIL PROTECTED]> wrote: > For 1234 ** 10.9, why the wrong result from mpmath.power()? > > > #!/usr/bin/env python > #coding=utf-8 > from mpmath import * > > mpf.dps = 32 > > x = mpf(1234) > y = mpf(10.9) > > print power(x,

re: mpmath puzzle

2007-11-14 Thread Fredrik Johansson
Dick Moores wrote: > For 1234 ** 10.9, why the wrong result from mpmath.power()? > > > #!/usr/bin/env python > #coding=utf-8 > from mpmath import * > > mpf.dps = 32 > > x = mpf(1234) > y = mpf(10.9) > > print power(x,y) > print "4.95832786481550414774152344

mpmath puzzle

2007-11-13 Thread Dick Moores
For 1234 ** 10.9, why the wrong result from mpmath.power()? #!/usr/bin/env python #coding=utf-8 from mpmath import * mpf.dps = 32 x = mpf(1234) y = mpf(10.9) print power(x,y) print "4.9583278648155041477415234438717e+33" # from Windows calculator """ ou