Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Compiled Languages > C   »   precision in c

 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old May 12, 2008, 06:09 PM
jaspreet2142's Avatar
jaspreet2142
Junior Member
jaspreet2142 is offline
 
Join Date: Nov 2007
Posts: 41
jaspreet2142 See this member's comment history on his/her Profile page.
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 coz i can't lose any digit, precision is very imp for my program

Reply With Quote
 
     

Answers
 
 
Old Jun 9, 2008, 07:54 PM   #2  
Jhon m
New Member
Jhon m is offline
 
Join Date: Jun 2008
Posts: 4
Jhon m See this member's comment history on his/her Profile page.
Use double instead of float. To extend a precision use long double.

Comments on this post
jaspreet2142 agrees: thanx little late though anyway thanx again
  Reply With Quote
 
     


Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
Calcullating required tonnage of a precision AC Plant mohitkjain Energy 4 Feb 7, 2008 10:16 AM
JDAM Precision Bombs excon Politics 11 Aug 7, 2007 05:08 PM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 04:45 PM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.