It's me <[EMAIL PROTECTED]> wrote in comp.lang.perl.misc:

[reply moved to bottom into context]

> "Jürgen Exner" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > [EMAIL PROTECTED] wrote:
> > > #python supports complex numbers.
> > [...]
> >
> > So?
> >
> 
> The world would come to a halt if all of a sudden nobody understands complex
> numbers anymore.  :-)
> 
> > > # Perl doesn't support complex numbers. But there are packages that
> > > supports it.
> >
> > The Math::Complex module is part of the standard installation already, no
> > need for any "packages" (whatever that might be).
> > Did you check "perldoc Math::Complex"
> >
> > NAME
> >     Math::Complex - complex numbers and associated mathematical functions
> > [...]

> For those of us that works with complex numbers, having complex number as a
> natively supported data type is a big advantage.  Non-native add-ons are not
> sufficient and lead to very awkward program code.

Like this?

    use Math::Complex;

    my $z = sqrt( -1);
    print 1 + $z, "\n"; # prints "1+i"

Operator overloading makes it possible to work with complex numbers as if
they were a native data type.

Anno

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to