On Fri, Apr 1, 2011 at 8:08 PM, ObsessiveMathsFreak
<obsessivemathsfr...@gmail.com> wrote:
>> sage: [0,0.2,..,1]
>> [0.000000000000000, 0.200000000000000, 0.400000000000000,
>> 0.600000000000000, 0.800000000000000, 1.00000000000000]
>
> May sage installation appears to be having trouble with this syntax
>
> OK Here
> sage: [0.0,0.2,..,0.9]
> [0.000000000000000, 0.200000000000000, 0.400000000000000,
> 0.600000000000000, 0.800000000000000]
>
>
> But what's going on here?
> sage: [0.1,0.2,..,0.9]
> [0.100000000000000, 0.200000000000000, 0.300000000000000,
> 0.400000000000000, 0.500000000000000, 0.600000000000000,
> 0.700000000000000, 0.800000000000000, 0.900000000000000]

The second number (0.2) is not the amount to be incremented each time,
it's the next number in the sequence.  Since, 0.2 differs from 0.1 by
0.1, each additional number in the sequence will be incremented by
0.1.

> Something's gone dreadfully wrong.
> sage: [0.2,0.2,..,0.9]
> OverflowError: cannot convert float infinity to integer

There's no difference between 0.2 and 0.2, so it will never make it to 0.9.

> Now I'm just confused.
> sage: [0.2,0.1,..,0.9]
> []

Going down from 0.2 to 0.1 and so on, you'll never reach 0.9.

--Mike

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to