POV-Ray : Newsgroups : povray.off-topic : Damn that's sweet. : Re: Damn that's sweet. Server Time
4 Sep 2024 03:14:13 EDT (-0400)
  Re: Damn that's sweet.  
From: Patrick Elliott
Date: 27 Jul 2010 15:18:26
Message: <4c4f3102$1@news.povray.org>
On 7/27/2010 8:01 AM, Darren New wrote:
> scott wrote:
>> Why not just store the total pence/cents in an int?
>
> Because when you're talking about thousands of dollars as the smallest
> increment, that wastes space. Because when you add dollars to pennies to
> fractional pennies, you need to do the scaling anyway. Because when you
> print out the number, you wind up doing a whole bunch of divide-by-10's
> anyway, and lots and lots of financial processing involves printing out
> numbers.
>
The real reason is, to some extent, that, at one time, they "did" only 
store the rounded values, then someone figured out how to "add up" those 
extra missing bits, and dump them into their own bank account, so now 
financial software, unless the coder is a complete idiot, **never** 
throws away enough of the data to allow someone to make millions, via 
that trick, from rounding errors. ;)

-- 
void main () {
   If Schrödingers_cat is alive or version > 98 {
     if version = "Vista" {
       call slow_by_half();
       call DRM_everything();
     }
     call functional_code();
   }
   else
     call crash_windows();
}

<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models, 
3D Content, and 3D Software at DAZ3D!</A>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.