plz check this code
************code removed***********
What is it? And how can i overcome this problem?
What is Floting point error?
Moderator: Board moderators
What is Floting point error?
Last edited by ranacse05 on Tue Apr 24, 2007 7:07 pm, edited 1 time in total.
I like to solve problems.
-
- Experienced poster
- Posts: 151
- Joined: Tue Nov 16, 2004 7:23 pm
- Location: Norway
- Contact:
Suppose x=0. So, for floating points you can assume that x is so close to zero. Now let eps = .00000001.
Code: Select all
if(x==0)
do something...
// replace it with
if( fabs(x) <eps ) // fabs(x) returns absolute value of x
do something...
Ami ekhono shopno dekhi...
HomePage
HomePage
Re: What is Floting point error?
Can you please paste the source code or example code? if your problem is not solved yet.