Doug/Roban, Thanks a lot. I did believe that pdl would have got it right, it just wasn't clear what was going wrong. I guess I should just have tried multiplying a few numbers.
Thanks again. Cheers, -ashish On Fri, 21 Mar 2008, Doug Hunt wrote: > Hi Ashish: The PDLs are being stored as double, but printed without full > precision to save screen space: > > perldl> p $p = pdl([123456.7890123456]) > [ 123456.79] > perldl> p $p->sclr > 123456.789012346 > > Regards, > > Doug > > [EMAIL PROTECTED] > Software Engineer III > UCAR - COSMIC, Tel. (303) 497-2611 > > On Fri, 21 Mar 2008, Ashish Mahabal wrote: > >> >> Hi, >> >> I want to make a pdl which stores mjds (Mean Julian Day). >> If I do: >> >> $mjd=double(54539.247647,54539.2507226); >> print $mjd; >> >> I get [ 54539.248 54539.251] >> >> How do I retain the precision to several decimal places. Isn't double >> supposed to do that? >> >> Thanks. >> -ashish >> >> Ashish Mahabal, Caltech Astronomy, Pasadena, CA 91125 >> http://www.astro.caltech.edu/~aam aam at astro.caltech.edu >> >> 'Calm down -- it's only ones and zeros.' >> >> _______________________________________________ >> Perldl mailing list >> [email protected] >> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >> > Ashish Mahabal, Caltech Astronomy, Pasadena, CA 91125 http://www.astro.caltech.edu/~aam aam at astro.caltech.edu "The secret to creativity is knowing how to hide your sources." -Einstein _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
