Python Written in C?
Mensanator
mensanator at aol.com
Mon Jul 21 18:58:20 EDT 2008
On Jul 21, 8:26 am, Johannes Bauer <dfnsonfsdu... at gmx.de> wrote:
> Mensanator schrieb:
>
> > You want cool?
> > THIS is cool:
>
> > j = ((invert(xyz[1]-xyz[0],xyz[1]**(k-1))*(xyz[1]**(k-1)-prev_gen[2]))
> > % xyz[1]**(k-1))/xyz[1]**(k-2)
>
> You call it cool, I call it NameError: name 'invert' is not defined.
It is when you do: from gmpy import *
That single line wasn't the whole program.
What's cool is that it IS a single line, that does answers
with >50000 decimal digits without breaking a sweat. Sure, you
can use GMP with C (and I've done it). But it's nothing like
doing it in Python.
>
> Regards,
> Johannes
>
> --
> "Wer etwas kritisiert muss es noch lange nicht selber besser können. Es
> reicht zu wissen, daß andere es besser können und andere es auch
> besser machen um einen Vergleich zu bringen." - Wolfgang Gerber
> in de.sci.electronics <47fa8447$0$11545$9b622... at news.freenet.de>
More information about the Python-list
mailing list