help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange problem


From: robert Macy
Subject: Re: strange problem
Date: Wed, 03 Dec 2003 14:09:20 -0800

I would use something like...

x = fix(x*1e16)/1e16;

             - Robert -


On Wed, 03 Dec 2003 13:51:51 -0800
 "Henry F. Mollet" <address@hidden> wrote:
> octave:14> x=-0.000000000000000020817
> x =  -2.0817e-17
> octave:15> fix(x)
> ans = 0
> Henry
> 
> 
> on 11/27/03 11:58 PM, Christoph Dalitz at
> address@hidden
> wrote:
> 
> > On Thu, 27 Nov 2003 23:03:26 +0000
> > Geraint Paul Bevan <address@hidden> wrote:
> >> |
> >> |    -2.0817e-17    1.0000e+02
> >> |    -1.0000e-02    1.0000e+00
> >> |
> >> 
> >> The number -2.0817e-17 is -0.000000000000000020817,
> which is very, very
> >> close to zero.
> >> 
> > Is there an Octave function that truncates/rounds such
> small numbers to
> > zero (like the Scilab function "clean")?
> > 
> > I have tried "help round" and "help trunc", but found
> nothing appropriate.
> > 
> > Thanks,
> > 
> > Christoph
> > 
> > 
> > 
> >
>
-------------------------------------------------------------
> > Octave is freely available under the terms of the GNU
> GPL.
> > 
> > Octave's home on the web:  http://www.octave.org
> > How to fund new projects:
>  http://www.octave.org/funding.html
> > Subscription information:
>  http://www.octave.org/archive.html
> >
>
-------------------------------------------------------------
> 
> 
> 
>
-------------------------------------------------------------
> Octave is freely available under the terms of the GNU
> GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:
>  http://www.octave.org/funding.html
> Subscription information:
>  http://www.octave.org/archive.html
>
-------------------------------------------------------------
> 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]