Thanks, Ivar. I appreciate the help. 

On Friday, March 7, 2014 1:36:14 AM UTC-5, Ivar Nesje wrote:
>
> Julia has made a very strange attempt to make floating point ranges work 
> more like real ranges. The implementation is somewhat complicated, but the 
> result seems to be very nice.
>
> The old behaviour was much more confusing:
>
> julia> v=.1:.1:.30.1:0.1:0.2
>
>
> If you want the details you can see 
> https://github.com/JuliaLang/julia/issues/2333 and 
> https://github.com/JuliaLang/julia/pull/5636
>
> kl. 05:33:28 UTC+1 fredag 7. mars 2014 skrev Stephen Voinea følgende:
>>
>> Got it. Thanks for the fast, clear reply.
>>
>> On Thursday, March 6, 2014 11:12:39 PM UTC-5, Jameson wrote:
>>>
>>> `r.step` is not defined to be anything meaningful to the user. It is a 
>>> data field and all data fields are considered to be private details in 
>>> Julia. You can access them if you want, but they typically aren't part of 
>>> the API and may change at the whim of the implementer. You are probably 
>>> looking for `step(r)` which does return 0.3 in both cases.
>>>
>>> The range from 0.6 to 1.4 in steps of 0.3 ends at 1.2, so that's what 
>>> you get when you query for the last value `last(r)`
>>>
>>>
>>>
>>>
>>> On Thu, Mar 6, 2014 at 10:56 PM, Stephen Voinea <scvo...@gmail.com>wrote:
>>>
>>>> I noticed the following strangeness:
>>>>
>>>> julia> r = 0.6:0.3:1.2
>>>> 0.6:0.3:1.2
>>>>
>>>> julia> r.step
>>>> 3.0
>>>>
>>>> julia> r.start
>>>> 6.0
>>>>
>>>> julia> r = 0.6:0.3:1.4
>>>> 0.6:0.3:1.2
>>>>
>>>> julia> r.start
>>>> 0.6
>>>>
>>>> julia> r.step
>>>> 0.3
>>>>
>>>>  Am I missing something?
>>>>
>>>> julia> versioninfo()
>>>> Julia Version 0.3.0-prerelease+1829
>>>> Commit 037a469* (2014-03-04 12:46 UTC)
>>>> Platform Info:
>>>>   System: Darwin (x86_64-apple-darwin13.1.0)
>>>>   CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
>>>>   WORD_SIZE: 64
>>>>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
>>>>   LAPACK: libopenblas
>>>>   LIBM: libopenlibm
>>>>
>>>> Thanks.
>>>>
>>>
>>>

Reply via email to