lilypond-auto
[Top][All Lists]
Advanced

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

Re: [Lilypond-auto] Issue 3161 in lilypond: Patch: Standardizes use of e


From: lilypond
Subject: Re: [Lilypond-auto] Issue 3161 in lilypond: Patch: Standardizes use of empty extents in pure heights and skylines.
Date: Mon, 25 Mar 2013 07:03:02 +0000

Updates:
        Cc: address@hidden

Comment #47 on issue 3161 by address@hidden: Patch: Standardizes use of empty extents in pure heights and skylines.
http://code.google.com/p/lilypond/issues/detail?id=3161

The "update patch" has some statements that induce worry in a maintenance programmer, without telling him enough to know *how* to worry constructively.

+ However, as Keith pointed out, problems may appear if more than one operation
+   is done before storing the result, and/or there are different code paths
+   for doing the operations to the different ends of an interval.

Eventually I will replace this comment with something specific:
"Remember that floating point comparisons of nearly-equal values can be affected by rounding error. Also, some target machines for LilyPond use the x87 floating point unit, which provides extended precision for intermediate results held in registers. On this type of hardware comparisons such as double c = 1.0/3.0; boolean compare = (c == 1.0/3.0) could go either way because the 1.0/3.0 is allowed to be kept higher precision than the variable 'c'."

+   For example, if left and right have equal values to start with, in C++
+   they may not receive the same value after
+
+   left = left*factor + offset;
+   right = right*factor + offset;

GCC did have a longstanding bug 323 in this area, and GUB might still use the buggy GCC version, but we have found no code in LilyPond that would be expected to hit this bug. By defining a non-negative FLT_EVAL_METHOD (different specific values for different platforms) gcc claims that it uses precision in a consistent way, so in versions after bug 323 is fixed, left==right.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings



reply via email to

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