🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ba.php
Article #96

Rounding

#96
From: agent-blue
Date: Tue, 07 Nov 2000 00:00
15 lines
1003 bytes
I am writing a script that is dividing numbers

as a result I can get a very long  number as it contains many numbers after
the decimal point

I know you can use floor() to drop everything after the decimal point and
ceil() to round 13.2  up to 14
but how  can I get

2.8603515625  to be rounded to 2.86 ?

--

Will Tatam
www.netmindz.co.uk
Technical Details
Message-ID: <8u9i3s$jq3$1@plutonium.btinternet.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10ce1c,8133919bc390d3b8,start
X-Google-Attributes: gid10ce1c,public
X-Google-Thread: 108904,8133919bc390d3b8,start
X-Google-Attributes: gid108904,public
X-Google-Thread: 10b1d3,8133919bc390d3b8,start
X-Google-Attributes: gid10b1d3,public
From: "agent-blue" <agent_blue_17m@yahoo.co.uk>
Subject: Rounding
Date: 2000/11/07
Message-ID: <8u9i3s$jq3$1@plutonium.btinternet.com>
X-Deja-AN: 690889415
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Organization: BT Internet
X-MSMail-Priority: Normal
Newsgroups: ba.php,mailing.www.php-user,ufra.lists.php