Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: 3.041? Message-ID: <10466@jpl-devvax.JPL.NASA.GOV> Date: 19 Nov 90 22:11:31 GMT References: <1990Nov16.150010.7185@squirrel.mh.nl> <&$7fg2.0&2@smurf.sub.org> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: comp Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 17 In article <&$7fg2.0&2@smurf.sub.org> urlichs@smurf.sub.org (Matthias Urlichs) writes: : In comp.lang.perl, article <1990Nov16.150010.7185@squirrel.mh.nl>, : Johan Vromans writes: : < On DECsystem/Ultrix 4.0, perl 3.0 pl 41: : < : < 0+$] returns 3.0409999999999999 ... : < : Same here (A/UX 2.0). This shouldn't surprise you, considering that 1/1000 is not exactly representable in base two. I thought about this when implementing it, and decided it was okay because $] >= 3.041 is still true. (This is because 3.041 is also represented internally as 3.0409999999...) If you want to print $] numerically, say printf("%5.3f",$]). Larry