[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strange problem
From: |
Geraint Paul Bevan |
Subject: |
Re: strange problem |
Date: |
Wed, 03 Dec 2003 22:03:24 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031105 Thunderbird/0.3 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Henry F. Mollet 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:
|
|>
|>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.
|>
An unfortunate side effect of that approach would be the conversion of
all your other numbers to integers:
octave:1> fix (2.1)
ans = 2
- --
Geraint Bevan
http://homepage.ntlworld.com/geraint.bevan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iEYEARECAAYFAj/OXawACgkQcXV3N50QmNPfGwCfVWdTqBLEaxx+pZUBPPgLoI4t
tRQAn1nbsrQDt49m7Fg/eoD+9pcCMm6l
=DS7Q
-----END PGP SIGNATURE-----
-------------------------------------------------------------
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
-------------------------------------------------------------