lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] 7 == log10(10^24)/3.0


From: Vadim Zeitlin
Subject: Re: [lmi] 7 == log10(10^24)/3.0
Date: Sun, 18 Mar 2018 01:32:35 +0100

On Sun, 18 Mar 2018 00:09:43 +0000 Greg Chicares <address@hidden> wrote:

GC> TL;DR:
GC>      1'000'000'000'000'000'000'000'000.0
GC>   != 1'000'000'000'000'000'000'000'000.0L

 Just to confirm: they're indeed different: printing them out with "%a",
the first one comes out as 0x1.a784379d99db4p+79 while the second one as
0xd.3c21bcecceda1p+76. In x87 terms, the first one is stored in the FP
register as decimal 999999999999999983222784, while the second one keeps
the precision specified in the source code. As usual, the difference only
appears in 17th significant digit. And, also as usual, I hope we can avoid
relying on the 80 bit precision of the (unportable and archaic) x87 FPU and
write code that would work under the other platforms, which only have the
standard 64 bits of precision.

GC> It cost me some time to figure this out, so, not wanting to
GC> throw the work away, I thought I'd post it here. Vadim, would
GC> it be in poor taste to commit something like this to the
GC> savannah repository as a forlorn branch, to be abandoned
GC> immediately after committing it?

 I certainly don't see anything wrong with it, but it might be nice to
establish some naming conventions for the long-lived branches. E.g. you
could prefix its name with "experiment/" or "test/" or whatever else you
prefer (you could also namespace it further by using "gwc/" if you'd like).
The branch names don't matter for Git (as long as they don't conflict with
one of the predefined names such as "HEAD"), but it could be nice for human
users of the repository.

 Regards,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]