Talk:Price fraction: Difference between revisions

Line 21:
:: Two topics on the original wiki, [http://c2.com/cgi/wiki?FloatingPointCurrency Floating Point Currency] and [http://c2.com/cgi/wiki?MoneyObject Money Object], contain many anecdotes, cautionary tales, and useful links. For a toy problem like this, using an integer in units of cents should suffice. --[[User:IanOsgood|IanOsgood]] 01:29, 16 March 2010 (UTC)
:::All good points. However, (1) I'm the maintenance programmer, and (2) to work in integers would require a significant rewrite, something I have neither the time nor the patience for (I don't get paid for the work, and have to fit it in wherever and whenever possible.) --[[User:Axtens|Axtens]] 02:30, 16 March 2010 (UTC)
::::Note that once you have a function which works with integers it should be trivial in most languages to wrap it with something which multiplies floating point numbers by 100 and gets the nearest integer and divides the result by 100. Some languages also let you mark the floating point variant as "obsolete" with a message that points at the other approach. --[[User:Rdm|Rdm]] 19:20, 18 March 2010 (UTC)
 
== Representing the data ==
6,962

edits