Re: Representing money
Xavier Noria <[email protected]>
| Newsgroups | gmane.comp.lang.ruby.general |
|---|---|
| Message-ID | <CAM=Ycdj+5=XuvL-6Yku+cL=2Gua_U0Y2zqfrOnwEfs3ztSS_6A@mail.gmail.com> |
It depends on how do you use the numbers. For example, if you need exact division, then rationals are the safest bet. Big decimals don't have exact division because they can only represent numbers whose decimal representation is finite. Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>