Menu

#2558 Ops.binaryOp, used for add and subtract uses doubles breaking cdfTT2000

nextrelease
open
nobody
None
5
2025-04-17
2023-10-25
No

The add and subtract operators use doubles to perform their operations, which breaks CDFTT2000 at the nanosecond precision, when the operands are around 2020. For example:

tt= dataset( indgen(1000000), units=Units.nanoseconds ) 
tt= tt + Units.cdfTT2000.parse('2020-03-04T00:00:00.000000000')
print tt[3]-tt[0]
print tt[3], '2020-03-04T00:00:00.000000003'

should print

3.0 nanoseconds
2020-03-04T00:00:00.000000003 2020-03-04T00:00:00.000000003

but prints

0.0 nanoseconds
2020-03-04T00:00:00.000000000 2020-03-04T00:00:00.000000003

Discussion

  • Jeremy Faden

    Jeremy Faden - 2023-10-25

    CDF_TT2000 should become the preferred units for Autoplot (us2000 is still the preference, leftover from Das2), and this should be resolved.

     
  • Jeremy Faden

    Jeremy Faden - 2025-04-17

    This bug still exists.

     
MongoDB Logo MongoDB