From: ron DOT t DOT lewis AT softtech DOT brisnet DOT org DOT au (Ron T Lewis) Newsgroups: comp.os.msdos.djgpp Subject: Floating Point??? Date: 05 Mar 97 09:45:16 Organization: Soft-Tech +61-7-3869-2666 Lines: 32 Message-ID: <4b5_9703051119@softtech.brisnet.org.au> NNTP-Posting-Host: bbs.st.net.au To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hello All, Please can someone help a friend with a floating point problem he is having whilst writing a trigonomic program which requires floating point accuracy.. He's using DJGPP V2.1 Please don't ask WHY he wants such accuracy cos I don't know.. The problem lies below... int main() { float a; a=4.00/5.00; printf("float = %.12f\n",a); return(1); } Ans = 0.800000011921 The correct answer should be 0.800000000000 but he gets these extroneous numbers tacked on the end??? He's using a 486/66 and I tried it on my pentium and wound up with the same result.. Can he get 12 point accuracy and if so how?? Over to the experts.... :-) (OH! Well, Lifes like that Sumtimes) Regards Ron T Lewis ___ X CMPQwk #1.42X UNREGISTERED EVALUATION COPY