Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!world!decwrl!mcnc!uvaarpa!mmdf From: worley@compass.com (Dale Worley) Newsgroups: comp.lang.perl Subject: Negative 0 Message-ID: <1991Feb22.215931.16447@uvaarpa.Virginia.EDU> Date: 22 Feb 91 21:59:31 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: worley@compass.com Organization: The Internet Lines: 23 The following program print int(-0.5); prints -0 on a Sun3. This is because Sun's printf will return "-0" for the floating point value is being produced by int. According to Harbison and Steele, printf should never put a minus sign on a zero value. Thus, somebody's screwing up. The question is, is it (1) Perl's int is producing an invalid floating point number (a zero with the minus bit set), or is it (2) Sun's printf doesn't print negative zero floating point numbers correctly? I suspect this has discovered previously because the floating point hardware never produces negative zero values. Dale Dale Worley Compass, Inc. worley@compass.com -- The world ends tomorrow -- be sure to back up your files!