Re: Incorrect handling of very small doubles?

2010-09-21 Thread Abu Yoav
Hi Jon and Shlomi, Thanks! Jon: Actually, in my case, it's a bit more complicated than that. I read the numbers from a file, and there they are in the standard C notation that I've used in my example. Shlomi: Thanks for the heads up about how to write good code. I'm still very much a beginner...

RE: Good books for System , Network Admin tasks with perl

2010-09-21 Thread Kammen van, Marco, Springer SBM NL
>-Original Message- >From: Jatin Davey [mailto:jasho...@cisco.com] >Sent: Wednesday, September 22, 2010 8:29 AM >To: beginners@perl.org >Subject: Good books for System , Network Admin tasks with perl > Hi >Could some suggest some good books to learn on these two areas where >perl is use

Good books for System , Network Admin tasks with perl

2010-09-21 Thread Jatin Davey
Hi Could some suggest some good books to learn on these two areas where perl is used namely: System Administration Network Administration Appreciate your response in this regard. Thanks Jatin -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginne

Re: Incorrect handling of very small doubles?

2010-09-21 Thread C.DeRykus
On Sep 21, 3:16 am, shlo...@iglu.org.il (Shlomi Fish) wrote: > A few comments about this code (which is derived from the old code): > > On Tuesday 21 September 2010 08:40:41 Jon Hermansen wrote: > > > Hi Abu, > >  This code works for me: > > > #!/usr/bin/perl > > Add strict and warnings: > > http:/

Re: Incorrect handling of very small doubles?

2010-09-21 Thread Brandon McCaig
On Tue, Sep 21, 2010 at 9:22 AM, Shawn H Corey wrote: > I'm getting the same thing. > > $ perl -v > > This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi *snip* > $ uname -a > Linux Ix 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:58:24 UTC 2010 > x86_64 GNU/Linux I seem to get the

Re: Incorrect handling of very small doubles?

2010-09-21 Thread Jon Hermansen
Hi Abu, I got the idea for my variation on your script from a forum, where someone is parsing a list of numbers in scientific notation just as you are. http://www.gamedev.net/community/forums/topic.asp?topic_id=537620&whichpage=1� Until the bug is fixed, here's a workaround: --- #!/usr/bin/pe

Re: Incorrect handling of very small doubles?

2010-09-21 Thread Shawn H Corey
On 10-09-21 06:46 AM, Shlomi Fish wrote: I'm getting: [outout] d1 = 0.00e+00 d2 = 1.00e-307 sum = 1.00e-307 [/output] I'm getting the same thing. $ perl -v This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi Copyright 1987-2009, Larry Wall Perl may be copied only

Re: Incorrect handling of very small doubles?

2010-09-21 Thread Shlomi Fish
On Tuesday 21 September 2010 12:34:18 John W. Krahn wrote: > Abu Yoav wrote: > > Hi, > > --- c output --- > > d1 = 6.892964e-309 > > d2 = 1.102874e-307 > > sum = 1.171804e-307 > > > > --- perl output --- > > d1 = 0.00e+00 > > d2 = 1.00e-307 > > sum = 1.00e-307 > > $ perl -le' > my $d1

Re: Incorrect handling of very small doubles?

2010-09-21 Thread John W. Krahn
Abu Yoav wrote: Hi, Hello, I wanted to port a small c program to perl. However, the two programs behave differently with respect to very small "double" values. The behavior seems like a bug to me, but since I'm very new to perl, I thought I might ask the list first. Relevant code and output

Re: Incorrect handling of very small doubles?

2010-09-21 Thread Shlomi Fish
A few comments about this code (which is derived from the old code): On Tuesday 21 September 2010 08:40:41 Jon Hermansen wrote: > Hi Abu, > This code works for me: > > #!/usr/bin/perl > Add strict and warnings: http://perl-begin.org/tutorials/bad-elements/ > my $d1, $d2, $sum; If you did, y

Re: one query

2010-09-21 Thread Jordi Durban
Woops! Sorry! I hit "Reply", not "Reply all". And I know that I have to learn more Perl. Is a perl-beginner list isn't? Regards. 2010/9/21 Shlomi Fish > In accordance with: > > > > > > > Please reply to list if it's a mailing list post - > http://shlom.in/yreply > > > . >

Re: one query

2010-09-21 Thread Shlomi Fish
In accordance with: > > > > Please reply to list if it's a mailing list post - http://shlom.in/reply > > . And the fact the message was not explicitly stated as replied-to-in-private and the fact it does not appear to be the author's intention, I'm CCing this to the list. Next time please hit