From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.teledanmark.no!newsfeed1.ulv.nextra.no!nextra.com!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: macros vs HOFs (was: O'Caml) Date: 13 Sep 2002 15:06:27 +0000 Organization: Naggum Software, Oslo, Norway Lines: 26 Message-ID: <3240918387614328@naggum.no> References: <3D7CB8DF.8050108@pontos.net> <20020911035635.H23781@lain.res.cmu.edu> <3240844763646745@naggum.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: maud.ifi.uio.no 1031929588 18439 129.240.64.16 (13 Sep 2002 15:06:28 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 13 Sep 2002 15:06:28 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:40606 * Bruce Hoult | BCD makes conversion to and from printed form cheaper. Other than that, | what is wrong with a binary representation? Let me remind you that you did not favor just "binary representation", but IEEE double-precision floating point, of which the "floating-point" part is The Wrong Answer, not binary representatio. The difference lies in the exactness of fractional values, as I am sure you are aware at some level, and it is not sufficient simply to store dollar amounts in cents. Exchange rates and stock prices have different fractional values (normally 100th and 16th of a cent, although the latter is subject to some "modernization"), and computing with interest rates could require arbitrary precision. Rounding in monetary matters also differs from mathematical rounding. Most countries have laws that require rounding upward in the [.5, 1) range and down in the [0, .5) range, contrary to IEEE rounding with round-to-even, which is much fairer over time. All in all, our cultures have decided long ago that the arithmetic properties of monetary amounts are different from the arithmetic properties of other mathematical values. (This is one of many reasons why teaching children to do arithmetic operations on monetary values is harmful to their mathematical understanding of the number system.) -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.