Re: Number types in Lisp
- From: Günther Thomsen <guenthert@xxxxxxxxx>
- Date: Mon, 24 May 2010 15:10:23 -0700 (PDT)
On May 23, 6:22 am, p...@xxxxxxxxxxxxxxxxx (Pascal J. Bourguignon)
wrote:
and on the hand, why would you write:Would you mind explaining where the additional precision comes from?
2.5
* 4.00
-----------------
10.000
and not just 10.
Notice that the expectation here is that:
2.5 * 4.00 = 10.000
but:
2.5 * 4.000 = 10.0000
which is quite a different result.
If you are working with physical quantities, the expectation is toIf you want to be correct, you use error propagation. For high school
preserve the precision.
math you might get away with "significance arithmetic"
http://en.wikipedia.org/wiki/Significance_arithmetic
.
- Follow-Ups:
- Re: Number types in Lisp
- From: Pascal J. Bourguignon
- Re: Number types in Lisp
- References:
- Number types in Lisp
- From: Þorne
- Re: Number types in Lisp
- From: Pascal J. Bourguignon
- Number types in Lisp
- Prev by Date: Re: Free will
- Next by Date: Re: A Collections Framework?
- Previous by thread: Re: Number types in Lisp
- Next by thread: Re: Number types in Lisp
- Index(es):
Relevant Pages
|