MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

floating point issue

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86748] floating point issue
  • From: Chris Scullard <scullard at uchicago.edu>
  • Date: Thu, 20 Mar 2008 02:53:12 -0500 (EST)

Hi everyone,

I wonder if I can get some opinions on the best way to deal with this 
precision issue I am having. I define the vectors:

K = {111.5, 10.5, 1.5}
g={-0.7071068, 0., -0.7071068}

And I need this:

K.Cross[K, g]

to be 0 in accordance with a vector identity. The answer comes out to 
around 1.3 x 10^(-13), which is certainly close to 0 but not close 
enough for what I'm doing. I've tried various things like writing out 
the cross product explicitly without using the functions but the result 
is the same. And using N in various places doesn't seem to help either. 
What's the standard solution for this kind of thing?

Thanks,
Chris


  • Prev by Date: Re: Evaluation details
  • Next by Date: Re: V.6.0.2 gripes...
  • Previous by thread: RE: Fast way to select those elements from a list that are in another
  • Next by thread: Re: floating point issue