You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the cause of the issue is that casting from double to long truncates toward zero. This is desirable for positive numbers (moving the endpoint back in time). But when the index value is negative, truncating toward zero moves the endpoint forward in time.
This is also the case for integer division in the C99 standard, so the fix should be applied for both integer and double index types.
The text was updated successfully, but these errors were encountered:
endpoints
returns incorrect values when it is called on an xts object with index values prior to the Unix epoch. For example:I think the cause of the issue is that casting from double to long truncates toward zero. This is desirable for positive numbers (moving the endpoint back in time). But when the index value is negative, truncating toward zero moves the endpoint forward in time.
This is also the case for integer division in the C99 standard, so the fix should be applied for both integer and double index types.
The text was updated successfully, but these errors were encountered: