[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: Uniform partition of an interval

**From**: |
Francesco Potorti` |

**Subject**: |
Re: Uniform partition of an interval |

**Date**: |
Wed, 17 May 2000 11:21:08 +0200 |

address@hidden <address@hidden>:
| What is the MAIN reason that 1.8:0.05:1.9 produces [1.8000 1.8500]
| and not [1.8000 1.8500 1.9000]?
"John W. Eaton" <address@hidden>:
I'd guess that the MAIN reason is that there is a bug in the way
Octave is trying (very hard) to compute the correct number of elements
for ranges.
Isn't this task impossible by definition?
Correct me if I am wrong, but the three numbers (start, end, step) all
have their precision limited by the machine's representation, so all you
can do is an educated guess, and it is questionable whether a guess is
the most reasonable thing to do.
--
Francesco PotortÃ¬ (researcher) Voice: +39 050 315 3058 (op.2111)
Area della ricerca CNR - CNUCE Fax: +39 050 3138091
via Vittorio Alfieri 1 Email: address@hidden
I-56010 Ghezzano, Pisa Web: http://fly.cnuce.cnr.it/
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------