Re: question about math module notation

2007-07-26 Thread Paul Rubin
Dan Bishop <[EMAIL PROTECTED]> writes: > > I was surprised to find that gives an exact (integer, not > > floating-point) answer. Still, I think it's better to say 2**64 > > which also works for (e.g.) 2**1 where math.pow(2,1) > > raises an exception. > > It *is* binary floating point. Po

Re: question about math module notation

2007-07-26 Thread Dan Bishop
On Jul 26, 3:59 pm, Paul Rubin wrote: > brad <[EMAIL PROTECTED]> writes: > > Ah yes, that works too... thanks. I've settled on doing it this way: > > print int(math.pow(2,64)) > > I like the added parenthesis :) > > I was surprised to find that gives an exact (integer, no

Re: question about math module notation

2007-07-26 Thread Gary Herron
Stargaming wrote: > On Thu, 26 Jul 2007 15:54:11 -0400, brad wrote: > > >> How does one make the math module spit out actual values without using >> engineer or scientific notation? >> >> I get this from print math.pow(2,64): 1.84467440737e+19 >> >> I want this: >> 18,446,744,073,709,551,616 >>

Re: question about math module notation

2007-07-26 Thread Paul Rubin
brad <[EMAIL PROTECTED]> writes: > Ah yes, that works too... thanks. I've settled on doing it this way: > print int(math.pow(2,64)) > I like the added parenthesis :) I was surprised to find that gives an exact (integer, not floating-point) answer. Still, I think it's better to say 2**64 which als

Re: question about math module notation

2007-07-26 Thread brad
Paul Rubin wrote: > print 2**64 Ah yes, that works too... thanks. I've settled on doing it this way: print int(math.pow(2,64)) I like the added parenthesis :) -- http://mail.python.org/mailman/listinfo/python-list

Re: question about math module notation

2007-07-26 Thread Paul Rubin
brad <[EMAIL PROTECTED]> writes: > 18,446,744,073,709,551,616 > > I'm lazy... I don't want to convert it manually :) print 2**64 -- http://mail.python.org/mailman/listinfo/python-list

Re: question about math module notation

2007-07-26 Thread brad
Stargaming wrote: > Explicitly converting it to `int` works for me. (Without the 3-digit- > block notation, of course.) Thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: question about math module notation

2007-07-26 Thread Stargaming
On Thu, 26 Jul 2007 15:54:11 -0400, brad wrote: > How does one make the math module spit out actual values without using > engineer or scientific notation? > > I get this from print math.pow(2,64): 1.84467440737e+19 > > I want this: > 18,446,744,073,709,551,616 > > I'm lazy... I don't want to c

question about math module notation

2007-07-26 Thread brad
How does one make the math module spit out actual values without using engineer or scientific notation? I get this from print math.pow(2,64): 1.84467440737e+19 I want this: 18,446,744,073,709,551,616 I'm lazy... I don't want to convert it manually :) -- http://mail.python.org/mailman/listinfo/