There's something really buggy in the "srange"-function.
One can produce almost every (wrong) behavior concerning the endpoint
of the returned list. Here are some examples:


sage: srange(0.5,1.1,0.1,include_endpoint=False)
[0.500000000000000,
 0.600000000000000,
 0.700000000000000,
 0.800000000000000,
 0.900000000000000,
 1.00000000000000,
 1.10000000000000]

sage: srange(0.5,1,0.1,include_endpoint=False)
[0.500000000000000,
 0.600000000000000,
 0.700000000000000,
 0.800000000000000,
 0.900000000000000]

sage: srange(0.5,0.9,0.1,include_endpoint=False)
[0.500000000000000, 0.600000000000000, 0.700000000000000,
0.800000000000000]


sage: srange(0,1.1,0.1,include_endpoint=True)
[0.000000000000000,
 0.100000000000000,
 0.200000000000000,
 0.300000000000000,
 0.400000000000000,
 0.500000000000000,
 0.600000000000000,
 0.700000000000000,
 0.800000000000000,
 0.900000000000000,
 1.00000000000000,
 1.10000000000000,
 1.20000000000000]

sage: srange(0,0.2,0.1,include_endpoint=True)
[0.000000000000000, 0.100000000000000, 0.200000000000000]

sage: srange(0,0.3,0.1,include_endpoint=True)
[0.000000000000000, 0.100000000000000, 0.200000000000000]


-MRK-
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to