double varible hold some strange value

Discussion in 'iPhone/iPad Programming' started by rupesh.swami, Apr 2, 2009.

  1. macrumors newbie

    Joined:
    Mar 9, 2009
    #1
    hi all,
    i am new to iphone programming
    i write following statement

    Code:
    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
     
  2. Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #2
    double and floatValue - spot the difference?
     
  3. thread starter macrumors newbie

    Joined:
    Mar 9, 2009
    #3
    sir,
    thank you very much

    i am stupid so i can not notice this thing.
     

Share This Page