The relevant codeblock from misc/misc.py is:
if include_endpoint:
if universe in [int, long, ZZ]:
if (start-end) % step == 0:
end += step
elif (start-end)/step in ZZ:
end += step
which looks a little funny to me in general; in this specific case of
course universe=None and (start-end)/step is a RealNumber so the
endpoint is left unchanged. I'm not sure what would be wrong with
just having
if include_endpoint:
end += step
but maybe the author (William S. or Robert B.?) had a reason I can't
think of.
-Marshall
On Sep 21, 7:59 am, Jaap Spies <[EMAIL PROTECTED]> wrote:
> The new (fast) srange function with include_endpoint=True
> dus not include the endpoint in some cases:
>
> sage: srange(1.0, 5.0, include_endpoint=True)
> [1.00000000000000, 2.00000000000000, 3.00000000000000, 4.00000000000000]
>
> Jaap
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---