Hi,
Thank you all, I just found the problem it was because I used float type so after I replace them by double it's working all right.

Also spacial thanks for you ajhampson your instructions really help me to organize my code.