Re: Rounding numbers

2001-02-14 Thread Morbus Iff
Is there a function out there that will enable me to round up a number i.e. 0.93495959 would become 1 I've got this one that will allow you to round to tens, hundreds, and thousands: ## # round() - rounds a number

Re: Rounding numbers

2001-02-14 Thread Bennett Haselton
At 11:53 AM 2/14/01 -, Alloun, Jonathan wrote: Hello, Is there a function out there that will enable me to round up a number i.e. 0.93495959 would become 1 Thanks in advance, Jonathan Not as short as a simple function call, but works: $x = 2.01; $y = ($x == int($x) ? $x

Re: Rounding numbers

2001-02-14 Thread $Bill Luebkert
"Alloun, Jonathan" wrote: Hello, Is there a function out there that will enable me to round up a number i.e. 0.93495959 would become 1 use strict; use POSIX; for (0.93495959, 1.91, 2.01) { print ceil ($_), "\n"; } __END__ -- ,-/- __ _ _ $Bill Luebkert

Re: Rounding numbers

2001-02-14 Thread Paul Popour
- Original Message - From: "Morbus Iff" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 14, 2001 7:07 AM Subject: Re: Rounding numbers Is there a function out there that will enable me to round up a number i.e. 0.93495959 would become 1 I've go

RE: Rounding numbers

2001-02-14 Thread Ron Hartikka
Title: Re: Rounding numbers use POSIX; $ceil = ceil(3.5); # 4 From perlfaq4. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Alloun, JonathanSent: Wednesday, February 14, 2001 6:54 AMTo: [EMAIL PROTECTED]Subject

Re: Rounding numbers

2001-02-14 Thread SCOTT_SISSON
Here is something directly from the Perl Cookbook (Ram). FYI - The O'Reilly Perl CD Bookshelf is a valuable reference source. It has 6 Perl books on 1 CD with an index for all books. Chapter 2