Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!olivea!decwrl!mcnc!uvaarpa!mmdf From: worley@compass.com (Dale Worley) Newsgroups: comp.lang.perl Subject: Artitmetic functions Message-ID: <1991Feb22.215921.16411@uvaarpa.Virginia.EDU> Date: 22 Feb 91 21:59:21 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: worley@compass.com Organization: The Internet Lines: 31 X-Name: Johan Vromans I'd like to suggest adding the following aritmetic functions to perl. min(LIST) - numerically lowest of LIST max(LIST) - numerically highest of LIST Sounds good. round(EXPR[,precision]) - EXPR rounded to precision decimal places (default integer precision) ceil(EXPR) - ceiling value of EXPR floor(EXPR) - floor value of EXPR (identical to 'int') Firstly, 'floor' is not 'int', because floor(-0.5) is -1, while int(-0.5) is 0. (Perl's 'int' is not the same as Algol's -- it really should be called 'trunc'.) I would like to see the optional 'precision' argument added to 'round', 'ceil', and 'int' as well. And don't forget that precision can be negative. Dale Dale Worley Compass, Inc. worley@compass.com -- ROM stands for Read-Only Memory, meaning that new things cannot be written to it; ROM is the silicon equivalent of the brain of a religious fanatic. -- Lincoln Spector