From help-octave-request at bevo dot che dot wisc dot edu Wed Dec 3 15:57:27 2003 Subject: Re: strange problem From: Geraint Paul Bevan To: "Henry F. Mollet" CC: Christoph Dalitz , Octave_post Date: Wed, 03 Dec 2003 22:03:24 +0000 -----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 christoph dot dalitz at hs-niederrhein dot de | 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 -------------------------------------------------------------