I am working on a application in which I am generating some Tickets using calculations. For Generating Tickets I have created a model class and Inserting values into appropriate object. Now I am having a Object
@property (nonatomic,assign) float crv;
I am adding a value into this from my textfiled like this :
ticketitem.crv = [txtCRV.text floatValue];
ticketitem is my Model class object. Now my
txtCRV.text is 1.58 but ticketitem.crv becomes 1.58000004
I have tried all possible ways like rounded, Converting into string and then float and so on. but nothing seems to be working I want ticketitem.crv == 1.58 only as it as my textfield value. Can anyone help?