Ask Experts Questions for FREE Help !
Ask
    jaspreet2142's Avatar
    jaspreet2142 Posts: 42, Reputation: 2
    Junior Member
     
    #1

    May 12, 2008, 07:09 PM
    precision in c
    I have a precision problem in c
    this can be understand better by an example
    I declare a variable in float
    then I stored in it 0.10101
    but when I printed it it shows 0.10095
    how can I remove this problem because I can't lose any digit, precision is very imp for my program
    Jhon m's Avatar
    Jhon m Posts: 4, Reputation: 2
    New Member
     
    #2

    Jun 9, 2008, 08:54 PM
    Use double instead of float. To extend a precision use long double.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Calcullating required tonnage of a precision AC Plant [ 4 Answers ]

There is a requirement of installation of Precision AC in a Server Room of size 2500Sq. Feet with 8ft 6inch hight, out side temperature in summer goes up to 47 degree C where as room required to be remain at 18 degree C and Electronics installed here are going to consume approximate 75KW of...

JDAM Precision Bombs [ 11 Answers ]

Hello again, wingnuts: So, you think it's a good idea to sell the Saudi's, whose armed forces are rife with Al Qaeda infiltrators, JDAM weapons?? Of course, these people are in a virtual state of war with our ally Israel, but I guess that doesn't matter. Plus, the 9/11 killers WERE Saudi's,...


View more questions Search