Re: floating point issue
- To: mathgroup at smc.vnet.net
- Subject: [mg86777] Re: floating point issue
- From: Antti Penttilä@smc.vnet.net
- Date: Thu, 20 Mar 2008 05:49:16 -0500 (EST)
- Organization: University of Helsinki
- References: <frt59r$sma$1@smc.vnet.net>
Hi,
It's 0 for me (WinXP 64-bit, Mathematica 6.0.2).
Antti
Chris Scullard wrote:
> 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
>