Question

How does UpdateDetector compare different representations of the same whole number?

  • 8 July 2013
  • 1 reply
  • 1 view

I have a dataset that I am exporting to a different format. In particular I have some doubles that are being converted to decimal 15.8 and decimal 10.4. Right before the export I am rounding these values to the nearest 8th or 4th digit.

 

 

I am using UpdateDetector to help confirm I am doing the export correctly. I've noticed that when I compare the original and exported values UpdateDetector considers any whole numbers to have changed.

 

 

I tried rounding both datasets before the comparison. It didn't make a difference. UpdateDetector still says in effect 0.0 <> 0 and 193.0 <> 193.

 

 

When I insert an AttributeCreator and explicitly set the attributes to the expected value (e.g. to 0 or 193) UpdateDetector then says they are the same.

 

 

Can you explain to me how AttributeRounder, AttributeCreator, and UpdateDetector represent whole numbers so that I can avoid reporting these spurious differences?

1 reply

Userlevel 2
Badge +17
Hi,

 

 

How about using the StringFormatter to make those attributes the same format?

 

 

Takashi

Reply