Opened 12 years ago
Closed 12 years ago
#323 closed defect (fixed)
fix bug in EvenlyDiscretizedFunction
Reported by: | Peter Powers | Owned by: | Peter Powers |
---|---|---|---|
Priority: | major | Milestone: | OpenSHA 1.3 |
Component: | sha | Version: | |
Keywords: | Cc: |
Description
Given an EvenlyDiscretizedFunction? with a single x-value (say 6.5) and a tolerance of 0.01, any call to any method relying on getXindex(x) will be fine for values <= 6.5, but will fail above, even if within tolerance.
Change History (2)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
The situation arose because both methods, in trying to determine an index, divide by 'delta', which is 0 for single valued functions resulting in attempts to round NaN, +Infinity, -Infinity;p the ultimate result was that for values > x(0), the index returned was -1. Both methods mentioned above were adjusted to handle the single-value case. This should not have adverse side effects unless there is code that unknowingly relies on the error. Fixed in [8054]