SMath Forum Questions Weird Result from Range 1 Pages (4 items) Weird Result from Range - Messages #1 Posted: 7/17/2023 1:20:34 AM netsonicyxf 2 likes in 79 posts. Group: User For n=5, the result is right.But for n=6, it's supposed to have 7 elements instead of 6File not found.File not found. #2 Posted: 7/17/2023 6:59:01 AM Jean Giraud 983 likes in 6866 posts. Group: User Wrong way to discretize a range. #3 Posted: 7/17/2023 8:09:12 AM Davide Carpi 1416 likes in 2873 posts. Group: Moderator WroteFor n=5, the result is right.But for n=6, it's supposed to have 7 elements instead of 6Probably something about precision of double type. In the second range if you add a 10^-14 to the uppper bound it return the expected vector. If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects 2 users liked this postnetsonicyxf 7/17/2023 9:41:00 AM, Oscar Campo 7/18/2023 3:18:00 PM #4 Posted: 7/17/2023 10:40:35 AM Jean Giraud 983 likes in 6866 posts. Group: User n even starts being exact ... n 10n odd stops being exact ..... n 15You have no control on numerical arithmetic. 1 Pages (4 items) New Posts No New Posts