Prothon vs. Python integers

mensanator mensanator at aol.com
Mon May 24 20:01:04 EDT 2004


"Mark Hahn" <mark at prothon.org> wrote in message news:<Mbrsc.15253$bF3.12865 at fed1read01>...
> "Paul Prescod" <paul at prescod.net> wrote
> 
> > I think that in this case, Python is demonstrably better than Prothon.
> >
> > C:\temp\prothon\Prothon>python
> > ActivePython 2.3.2 Build 232 (ActiveState Corp.) based on
> > Python 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC v.1200 32 bit (Intel)] on
> > win32
> > Type "help", "copyright", "credits" or "license" for more information.
> >
> >  >>> print 2**65
> > 36893488147419103232
> >
> >  >>> print 2**65 == (2**65 + 1)
> > False
> >
> >
> > C:\temp\prothon\Prothon>prothon
> >
> > Prothon 0.1 Interactive Console, Build 532, May 21 2004 (Ctrl-D to exit)
> >
> >  >>> print 2** 65
> > 3.68935e+19
> >
> >  >>> print 2**65 == (2**65 + 1)
> > True
> >
> > If Prothon is a language designed for the next ten years then it should
> > be tuned for correctness and ease of use, not for limitations of today's
> > hardware.
> 
> I'm sure this isn't the only place Python is better.
> 
> Prothon has the long integer support in the parser if anyone wants to take
> the trouble to put the long object code in. I did nothing to preclude it. I
> just didn't see any need for it myself and didn't take the trouble to put it
> in.
> 
> Longs seemed like a needless exotic kludge to me in the 64-bit world. Surely
> once you get to 3.7e19 you are in floating point territory. 

Unless you're working on problems in Number Theory, in which every single
decimal digit of 2**177525 - 1 is significant.

>I can't imagine counting anything up to 10**19.

Not every sequence increments by 1. Putting 2**177525 - 1 into the Collatz
Conjecture results in a mere 2.5 million iterations, not 10**53000. 
Limiting the loop counts to <10**19 doesn't mean you have to limit 
the values.



More information about the Python-list mailing list