View Single Post

  #4 (permalink)  
Old 09-05-2004
Alvaro G. Vicario
 
Posts: n/a
Default Re: Adding discount script...

*** StinkFinger escribió/wrote (Sat, 4 Sep 2004 15:02:21 -0800):
> I cannot figure out either how or why I would use round().
> Can you provide an example ?


If the price is 25.99 and you truncate 25, you carry an error of 99 cents.
If you round to 26, the error is 1 cent. Rounding, the error is never
larger than 50 cents.


--
--
-+ Álvaro G. Vicario - Burgos, Spain - ICQ 46788716
+- http://www.demogracia.com (la web de humor para mayores de 100 años)
++ «Sonríe, que te vamos a hacer una foto para la esquela»
--
Reply With Quote