ChewCheeLim

AF SDK 2.5 AFValue.Value with Exponential notation - lost 'precision' compared to PI SDK PIValue

Discussion created by ChewCheeLim on Apr 3, 2013
Latest reply on Apr 6, 2013 by rdavin

Hi, During my testing, i noticed the large number with exponential notation where it losts 'precision' with AF SDK 2.5 call to get PI data.

 

These 2 methods for our migration

 

AF SDK 2.5 : AFValue = AFAttribute.Data.Summary()

 

4.990165E+9

 

LEgacy: PIValue = PiPoint.Data.Summary()

 

4990164992.0

 

My next line of code doing decimal.Parse(AFValue.Value, System.Globalization.NumberStyles.Float)

 

result = 4903952000.0000 (decimal(18,4))

 

I want to get this number back = 4990164992.0000 with AF SDK 2.5.

 

What should I do?

 

 

 

 

 

 

Outcomes