Chris,

I found this in a piece of code I wrote (obviously hastily) some time
back:

    use Math::Trig 'pi';
    my $deg2rad = pi/180.;
    use PDL;

I should note that basically any other call to Math::Trig will overload
something that PDL also overloads, resulting in a warning from Perl.

Of course, if one is using PDL, one shouldn't ever have to call
Math::Trig, I don't think.

I don't have big ideas to contribute, I'll almost certainly be happy
with whatever you come up with. But I'd say an implementation consistent
with Math::Trig would probably be good.

--Edward H.

> -----Original Message-----
> From: Chris Marshall [mailto:[email protected]] 
> Sent: Sunday, May 02, 2010 5:46 AM
> To: perldl
> Cc: [email protected]
> Subject: [Perldl] which math constants for PDL?
> 
> I was reviewing outstanding issues for our upcoming PDL CPAN 
> developers release and came upon:
> 
>    
> http://sourceforge.net/tracker/?func=detail&aid=2787823&group_
> id=612&atid=350612
> 
> regarding adding basic math constants to PDL.
> 
> If you have any numerical constants you calculate to use with 
> PDL and any preference on their implementation style (sub, 
> scalar, object,...) please rsvp to the list for discussion.
> 
> e.g.
> 
> I'm always calculating Pi
> 
> I prefer a perl scalar implementation
> so I don't have to play games with
> string interpolation.
> 
> Lower case is nice for ease of
> typing.  Upper case is useful in
> that "constants" are often upcased
> a la C macros.
> 
> 
> Thanks,
> Chris
> 
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
> 

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to