sequence(0,1,1/18) incorrect

HopfenUndMalz shared this problem 4 years ago
Not a Problem

For some values sequence is not working correctly, e.g.


does not contain the end value 1 while this works for 1/17 and most other values of increment.

This was discovered by one of my students (Lukas) using the last version of 5/Classic

Comments (4)


problem with binary storage of numbers again


same error with many numbers

workaround sequence(0,1+1/(2n),1/n)

Files: foro.ggb

Instead of

Sequence [n, n, 0, 1, 1/18]

you should use

Sequence [n / 18, n, 0, 18, 1]


As an experienced user I instantly knew how to avoid the problem -- as you suggest. Alas, Sorry, I do not agree with your (?) classification "Not a problem". This IS a problem as the result is under many circumstances (unpredictable for a novice user) wrong. And you will not notice it - no warning about numerical roundoff problems (which is not easy to see as the results are shown as fractions)

I suggest

a) disable this variant of the command or

b) code it in a stable way -- I think the faulty cases could be checked.

© 2021 International GeoGebra Institute