[Xapian-tickets] [Xapian] #321: build_numeric_ranges sometimes builds invalid ranges
Xapian
nobody at xapian.org
Wed Jan 7 01:53:52 GMT 2009
#321: build_numeric_ranges sometimes builds invalid ranges
-------------------------+--------------------------------------------------
Reporter: shane | Owner: olly
Type: defect | Status: new
Priority: normal | Milestone:
Component: Library API | Version: SVN trunk
Severity: normal | Resolution:
Keywords: | Blockedby:
Platform: All | Blocking:
-------------------------+--------------------------------------------------
Comment(by shane):
Ah, ok, I understand why you're rounding down.
It seems that sometimes start > lo due to fp rounding.
In my example, I have:[[BR]]
lo = 11.949999999999999289457264239899814128875732421875[[BR]]
unit = 0.01000000000000000020816681711721685132943093776702880859375[[BR]]
and get:[[BR]]
start = 11.9500000000000010658141036401502788066864013671875[[BR]]
This also happens on Opteron.
I guess the solution is:
{{{
#!cpp
if (start > lo) start = lo;
}}}
--
Ticket URL: <http://trac.xapian.org/ticket/321#comment:3>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list