From: Vend on
On 28 Mag, 06:18, Barry Margolin <bar...(a)alum.mit.edu> wrote:
> In article
> <98d42a9d-c4bc-4aa9-b35f-63c6b7913...(a)z17g2000vbd.googlegroups.com>,
>
>  Vend <ven...(a)virgilio.it> wrote:
> > On 26 Mag, 08:58, Barry Margolin <bar...(a)alum.mit.edu> wrote:
>
> > > Floating point was designed for efficiency, not precision.
>
> > I don't think this is correct. Efficiency is useless if you don't
> > deliver a correct result, and in settings where approximate quantities
> > and approximate computations are involved, a correct result requires
> > bounded errors.
>
> But achieving that is expensive.  So you trade off some degree of
> correctness for efficiency.
>
> If you want to bound the errors some more, you use double precision.

Yes, but you always have to consider how large the error is.
From: Pascal J. Bourguignon on
Antony <spam+lisp_dot_linux(a)gmail.com> writes:

> Thomas A. Russ wrote:
>> Actually, arbitrary precision wouldn't really be needed to address most
>> concerns. The general complaint seems to stem from the fact that there
>> is a mismatch between human (base 10) and computer (base 2) number
>> systems. If we worked with an internal base 10 representation, then you
>> would really avoid most of the problems.
> Since I saw a couple of posts with pointers to the Goldberg stuff, I
> now feel comfortable pointing to
> http://speleotrove.com/decimal/

Great Link! Thank you.

> Side note -
> Just googling
> decimal arithmetic
> gets this info as the first hit, but it used to be under some ibm
> owned site. I guess all big companies feel an urge to get rid of
> anything technical.
>
> -Antony

--
__Pascal Bourguignon__ http://www.informatimago.com/
From: George Neuner on
On Thu, 27 May 2010 17:02:08 -0400, Raymond Toy
<toy.raymond(a)gmail.com> wrote:


>FWIW IEEE754-2008 defines a decimal floating point format.
>
>See, for example, http://en.wikipedia.org/wiki/IEEE_754-2008

Yes, but the storage format is not necessarily portable as there are 2
versions of it.

See:
http://en.wikipedia.org/wiki/Decimal64_floating-point_format



>On 5/27/10 3:56 PM, Pascal J. Bourguignon wrote:
>>
>> In any case, more than the base of the mantissa, it's the base of the
>> exponent that matters. You would get better results with floating
>> point numbers [n|e] representing:
>>
>> n*10^e
>
>I don't know if IEEE754 solves this problem or not

Not really. The math is defined such that operations using binary or
decimal representations of the same numbers produce identical results.
But there are more numbers are representable in binary than in decimal
within the format constraints. Since there is very little native
decimal hardware (IBM's power6 and z10 are the only ones I know of),
decimal currently is mostly a storage format.


Intel has a library for 754-2008 decimal floating point:
See:
http://www.ac.usc.es/arith19/sites/default/files/3670a225-spec-session-DFP-paper2.pdf
and
http://software.intel.com/en-us/articles/intel-decimal-floating-point-math-library/

I haven't tried it so caveat emptor.


George
First  |  Prev  | 
Pages: 1 2 3 4 5 6 7
Prev: lisp port
Next: Disjoint sets