PDA

View Full Version : double varible hold some strange value




rupesh.swami
Apr 2, 2009, 06:28 AM
hi all,
i am new to iphone programming
i write following statement

double propertyTax;
propertyTax=[txtPropertyTax.text floatValue];

uitextField txtPropertyTax.text hold the value 1.63 but when i assign it to propertyTax variable then it convert to 1.1629999876022339. how can i resolve this type of conversion without changing data type of PropertyTax



caveman_uk
Apr 2, 2009, 06:36 AM
double and floatValue - spot the difference?

rupesh.swami
Apr 2, 2009, 08:59 AM
double and floatValue - spot the difference?

sir,
thank you very much

i am stupid so i can not notice this thing.