Lasso9 is weird

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Lasso9 is weird

Marc Vos
Check this (L9.2.4 on Mac OS 10.8.2):

[
loop(-from=-20, -to=20);
        loop_count;'<br>';
/loop;
]


-20
562949953421293
562949953421294
562949953421295
562949953421296
562949953421297
562949953421298
562949953421299
562949953421300
562949953421301
562949953421302
562949953421303
562949953421304
562949953421305
562949953421306
562949953421307
562949953421308
562949953421309
562949953421310
562949953421311
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Anybody else seeing this????

- -
Marc

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 is weird

Anibal Escobar
Confirmed on Centos 5.8

Thanks,
Anibal Escobar
646 336 5000 x8821




On Feb 20, 2013, at 3:12 PM, Marc Vos wrote:

> Check this (L9.2.4 on Mac OS 10.8.2):
>
> [
> loop(-from=-20, -to=20);
> loop_count;'<br>';
> /loop;
> ]
>
>
> -20
> 562949953421293
> 562949953421294
> 562949953421295
> 562949953421296
> 562949953421297
> 562949953421298
> 562949953421299
> 562949953421300
> 562949953421301
> 562949953421302
> 562949953421303
> 562949953421304
> 562949953421305
> 562949953421306
> 562949953421307
> 562949953421308
> 562949953421309
> 562949953421310
> 562949953421311
> 0
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> 13
> 14
> 15
> 16
> 17
> 18
> 19
> 20
>
> Anybody else seeing this????
>
> - -
> Marc
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 is weird

Brad Lindsay
In reply to this post by Marc Vos
Verified with Lasso 9.2.5 and 10.8.2
Submit a bug to [hidden email]

As a work around:

with index in -20 to 20 do {^
     #index + '<br>'
^}

You can generate a series with the syntax integer to integer by integer:

local(x) = 0 to 100 by 10
#x->asString


Enjoy!

Brad

On 2/20/13 3:12 PM, Marc Vos wrote:

> Check this (L9.2.4 on Mac OS 10.8.2):
>
> [
> loop(-from=-20, -to=20);
> loop_count;'<br>';
> /loop;
> ]
>
>
> -20
> 562949953421293
> 562949953421294
> 562949953421295
> 562949953421296
> 562949953421297
> 562949953421298
> 562949953421299
> 562949953421300
> 562949953421301
> 562949953421302
> 562949953421303
> 562949953421304
> 562949953421305
> 562949953421306
> 562949953421307
> 562949953421308
> 562949953421309
> 562949953421310
> 562949953421311
> 0
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> 13
> 14
> 15
> 16
> 17
> 18
> 19
> 20
>
> Anybody else seeing this????
>
> - -
> Marc
>
> #############################################################
> This message is sent to you because you are subscribed to
>    the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to:<[hidden email]>
> Send administrative queries to<[hidden email]>
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 is weird

Kyle Jessup-2

On Feb 20, 2013, at 3:37 PM, Brad Lindsay <[hidden email]> wrote:

> Verified with Lasso 9.2.5 and 10.8.2
> Submit a bug to [hidden email]

That is a weird bug.

> As a work around:
>
> with index in -20 to 20 do {^
>    #index + '<br>'
> ^}
>
> You can generate a series with the syntax integer to integer by integer:
>
> local(x) = 0 to 100 by 10
> #x->asString

You can also use them in iterate, fwiw.

iterate(-20 to 20)

        loop_value

/iterate

And it works fine. I'm not sure what loop's problem is.

-Kyle

> Enjoy!
>
> Brad
>
> On 2/20/13 3:12 PM, Marc Vos wrote:
>> Check this (L9.2.4 on Mac OS 10.8.2):
>>
>> [
>> loop(-from=-20, -to=20);
>> loop_count;'<br>';
>> /loop;
>> ]
>>
>>
>> -20
>> 562949953421293
>> 562949953421294
>> 562949953421295
>> 562949953421296
>> 562949953421297
>> 562949953421298
>> 562949953421299
>> 562949953421300
>> 562949953421301
>> 562949953421302
>> 562949953421303
>> 562949953421304
>> 562949953421305
>> 562949953421306
>> 562949953421307
>> 562949953421308
>> 562949953421309
>> 562949953421310
>> 562949953421311
>> 0
>> 1
>> 2
>> 3
>> 4
>> 5
>> 6
>> 7
>> 8
>> 9
>> 10
>> 11
>> 12
>> 13
>> 14
>> 15
>> 16
>> 17
>> 18
>> 19
>> 20
>>
>> Anybody else seeing this????
>>
>> - -
>> Marc
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>   the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to:<[hidden email]>
>> Send administrative queries to<[hidden email]>
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 is weird

stevepiercy
On 2/20/13 at 4:18 PM, [hidden email] (Kyle Jessup) pronounced:

> On Feb 20, 2013, at 3:37 PM, Brad Lindsay <[hidden email]> wrote:
>
> > Verified with Lasso 9.2.5 and 10.8.2
> > Submit a bug to [hidden email]
>
> That is a weird bug.

Looks like a power of 2.

http://www.wolframalpha.com/input/?i=2%5Ex+%3D+562949953421312

2^49 = 562949953421312

--steve


> > As a work around:
> >
> > with index in -20 to 20 do {^
> >    #index + '<br>'
> > ^}
> >
> > You can generate a series with the syntax integer to integer by integer:
> >
> > local(x) = 0 to 100 by 10
> > #x->asString
>
> You can also use them in iterate, fwiw.
>
> iterate(-20 to 20)
>
>   loop_value
>
> /iterate
>
> And it works fine. I'm not sure what loop's problem is.
>
> -Kyle
>
> > Enjoy!
> >
> > Brad
> >
> > On 2/20/13 3:12 PM, Marc Vos wrote:
> >> Check this (L9.2.4 on Mac OS 10.8.2):
> >>
> >> [
> >> loop(-from=-20, -to=20);
> >>    loop_count;'<br>';
> >> /loop;
> >> ]
> >>
> >>
> >> -20
> >> 562949953421293
> >> 562949953421294
> >> 562949953421295
> >> 562949953421296
> >> 562949953421297
> >> 562949953421298
> >> 562949953421299
> >> 562949953421300
> >> 562949953421301
> >> 562949953421302
> >> 562949953421303
> >> 562949953421304
> >> 562949953421305
> >> 562949953421306
> >> 562949953421307
> >> 562949953421308
> >> 562949953421309
> >> 562949953421310
> >> 562949953421311
> >> 0
> >> 1
> >> 2
> >> 3
> >> 4
> >> 5
> >> 6
> >> 7
> >> 8
> >> 9
> >> 10
> >> 11
> >> 12
> >> 13
> >> 14
> >> 15
> >> 16
> >> 17
> >> 18
> >> 19
> >> 20
> >>
> >> Anybody else seeing this????
> >>
> >> - -
> >> Marc
> >>
> >> #############################################################
> >> This message is sent to you because you are subscribed to
> >>   the mailing list Lasso
> >> [hidden email]
> >> To unsubscribe, E-mail to:<[hidden email]>
> >> Send administrative queries to<[hidden email]>
> > #############################################################
> > This message is sent to you because you are subscribed to
> > the mailing list Lasso
> > [hidden email]
> > To unsubscribe, E-mail to: <[hidden email]>
> > Send administrative queries to  <[hidden email]>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 is weird

Trevor Borgmeier
In reply to this post by Kyle Jessup-2

on 2/20/13 3:18 PM Kyle Jessup wrote:

> On Feb 20, 2013, at 3:37 PM, Brad Lindsay <[hidden email]> wrote:
>
>> Verified with Lasso 9.2.5 and 10.8.2
>> Submit a bug to [hidden email]
> That is a weird bug.
>
>> As a work around:
>>
>> with index in -20 to 20 do {^
>>     #index + '<br>'
>> ^}
>>
>> You can generate a series with the syntax integer to integer by integer:
>>
>> local(x) = 0 to 100 by 10
>> #x->asString
> You can also use them in iterate, fwiw.
>
> iterate(-20 to 20)
>
> loop_value
>
> /iterate
>
> And it works fine. I'm not sure what loop's problem is.
>
> -Kyle

It's loopy.  :)

>
>> Enjoy!
>>
>> Brad
>>
>> On 2/20/13 3:12 PM, Marc Vos wrote:
>>> Check this (L9.2.4 on Mac OS 10.8.2):
>>>
>>> [
>>> loop(-from=-20, -to=20);
>>> loop_count;'<br>';
>>> /loop;
>>> ]
>>>
>>>
>>> -20
>>> 562949953421293
>>> 562949953421294
>>> 562949953421295
>>> 562949953421296
>>> 562949953421297
>>> 562949953421298
>>> 562949953421299
>>> 562949953421300
>>> 562949953421301
>>> 562949953421302
>>> 562949953421303
>>> 562949953421304
>>> 562949953421305
>>> 562949953421306
>>> 562949953421307
>>> 562949953421308
>>> 562949953421309
>>> 562949953421310
>>> 562949953421311
>>> 0
>>> 1
>>> 2
>>> 3
>>> 4
>>> 5
>>> 6
>>> 7
>>> 8
>>> 9
>>> 10
>>> 11
>>> 12
>>> 13
>>> 14
>>> 15
>>> 16
>>> 17
>>> 18
>>> 19
>>> 20
>>>
>>> Anybody else seeing this????
>>>
>>> - -
>>> Marc
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>>    the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to:<[hidden email]>
>>> Send administrative queries to<[hidden email]>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
> #############################################################
> This message is sent to you because you are subscribed to
>    the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

ɹǝıǝɯƃɹoq ɹoʌǝɹʇ

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 is weird

Tom McFarlane (Lumen Patent Firm)
In reply to this post by Marc Vos
That bug appears to be related to the improper handling of negative integers. If interpreted modulo 2^49, then those numbers output are correct.

For example, this works:

local(m)=562949953421312 // #m=2^49
local(n)
loop(-from= -20, -to=20 )
        #n=loop_count % #m
        (#n > #m/2 ) ? #n - #m | #n
        '<br>'
/loop


Tom McFarlane

On Feb 20, 2013, at 12:12 PM, Marc Vos <[hidden email]> wrote:

> Check this (L9.2.4 on Mac OS 10.8.2):
>
> [
> loop(-from=-20, -to=20);
> loop_count;'<br>';
> /loop;
> ]
>
>
> -20
> 562949953421293
> 562949953421294
> 562949953421295
> 562949953421296
> 562949953421297
> 562949953421298
> 562949953421299
> 562949953421300
> 562949953421301
> 562949953421302
> 562949953421303
> 562949953421304
> 562949953421305
> 562949953421306
> 562949953421307
> 562949953421308
> 562949953421309
> 562949953421310
> 562949953421311
> 0
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> 13
> 14
> 15
> 16
> 17
> 18
> 19
> 20
>
> Anybody else seeing this????
>
> - -
> Marc
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 is weird

Kyle Jessup-2

On Feb 20, 2013, at 5:12 PM, Tom McFarlane (Lumen Patent Firm) <[hidden email]> wrote:

> That bug appears to be related to the improper handling of negative integers. If interpreted modulo 2^49, then those numbers output are correct.
>
> For example, this works:
>
> local(m)=562949953421312 // #m=2^49
> local(n)
> loop(-from= -20, -to=20 )
> #n=loop_count % #m
> (#n > #m/2 ) ? #n - #m | #n
> '<br>'
> /loop

That's right. I've been debugging this and it seems specific to loop_count not returning the right value in some cases.
General integer handling is still fine.
-Kyle

>
> Tom McFarlane
>
> On Feb 20, 2013, at 12:12 PM, Marc Vos <[hidden email]> wrote:
>
>> Check this (L9.2.4 on Mac OS 10.8.2):
>>
>> [
>> loop(-from=-20, -to=20);
>> loop_count;'<br>';
>> /loop;
>> ]
>>
>>
>> -20
>> 562949953421293
>> 562949953421294
>> 562949953421295
>> 562949953421296
>> 562949953421297
>> 562949953421298
>> 562949953421299
>> 562949953421300
>> 562949953421301
>> 562949953421302
>> 562949953421303
>> 562949953421304
>> 562949953421305
>> 562949953421306
>> 562949953421307
>> 562949953421308
>> 562949953421309
>> 562949953421310
>> 562949953421311
>> 0
>> 1
>> 2
>> 3
>> 4
>> 5
>> 6
>> 7
>> 8
>> 9
>> 10
>> 11
>> 12
>> 13
>> 14
>> 15
>> 16
>> 17
>> 18
>> 19
>> 20
>>
>> Anybody else seeing this????
>>
>> - -
>> Marc
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 is weird

Kyle Jessup-2

On Feb 20, 2013, at 5:55 PM, Kyle Jessup <[hidden email]> wrote:

>
> On Feb 20, 2013, at 5:12 PM, Tom McFarlane (Lumen Patent Firm) <[hidden email]> wrote:
>
>> That bug appears to be related to the improper handling of negative integers. If interpreted modulo 2^49, then those numbers output are correct.
>>
>> For example, this works:
>>
>> local(m)=562949953421312 // #m=2^49
>> local(n)
>> loop(-from= -20, -to=20 )
>> #n=loop_count % #m
>> (#n > #m/2 ) ? #n - #m | #n
>> '<br>'
>> /loop
>
> That's right. I've been debugging this and it seems specific to loop_count not returning the right value in some cases.
> General integer handling is still fine.
> -Kyle

I found it and fixed it. It was specific to loop_count and was a side-effect of one of the C macros it was using when doing some bit manipulation.

Thanks for the report, Marc. Fixed for 9.2.6.
-Kyle


>>
>> Tom McFarlane
>>
>> On Feb 20, 2013, at 12:12 PM, Marc Vos <[hidden email]> wrote:
>>
>>> Check this (L9.2.4 on Mac OS 10.8.2):
>>>
>>> [
>>> loop(-from=-20, -to=20);
>>> loop_count;'<br>';
>>> /loop;
>>> ]
>>>
>>>
>>> -20
>>> 562949953421293
>>> 562949953421294
>>> 562949953421295
>>> 562949953421296
>>> 562949953421297
>>> 562949953421298
>>> 562949953421299
>>> 562949953421300
>>> 562949953421301
>>> 562949953421302
>>> 562949953421303
>>> 562949953421304
>>> 562949953421305
>>> 562949953421306
>>> 562949953421307
>>> 562949953421308
>>> 562949953421309
>>> 562949953421310
>>> 562949953421311
>>> 0
>>> 1
>>> 2
>>> 3
>>> 4
>>> 5
>>> 6
>>> 7
>>> 8
>>> 9
>>> 10
>>> 11
>>> 12
>>> 13
>>> 14
>>> 15
>>> 16
>>> 17
>>> 18
>>> 19
>>> 20
>>>
>>> Anybody else seeing this????
>>>
>>> - -
>>> Marc
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 is weird

Marc Vos
Super! Thanks!

- -
Marc

Sent from my iPhone

On 21 feb. 2013, at 00:07, Kyle Jessup <[hidden email]> wrote:

>
> On Feb 20, 2013, at 5:55 PM, Kyle Jessup <[hidden email]> wrote:
>
>>
>> On Feb 20, 2013, at 5:12 PM, Tom McFarlane (Lumen Patent Firm) <[hidden email]> wrote:
>>
>>> That bug appears to be related to the improper handling of negative integers. If interpreted modulo 2^49, then those numbers output are correct.
>>>
>>> For example, this works:
>>>
>>> local(m)=562949953421312 // #m=2^49
>>> local(n)
>>> loop(-from= -20, -to=20 )
>>>    #n=loop_count % #m
>>>    (#n > #m/2 ) ? #n - #m | #n
>>>    '<br>'
>>> /loop
>>
>> That's right. I've been debugging this and it seems specific to loop_count not returning the right value in some cases.
>> General integer handling is still fine.
>> -Kyle
>
> I found it and fixed it. It was specific to loop_count and was a side-effect of one of the C macros it was using when doing some bit manipulation.
>
> Thanks for the report, Marc. Fixed for 9.2.6.
> -Kyle
>
>
>>>
>>> Tom McFarlane
>>>
>>> On Feb 20, 2013, at 12:12 PM, Marc Vos <[hidden email]> wrote:
>>>
>>>> Check this (L9.2.4 on Mac OS 10.8.2):
>>>>
>>>> [
>>>> loop(-from=-20, -to=20);
>>>>    loop_count;'<br>';
>>>> /loop;
>>>> ]
>>>>
>>>>
>>>> -20
>>>> 562949953421293
>>>> 562949953421294
>>>> 562949953421295
>>>> 562949953421296
>>>> 562949953421297
>>>> 562949953421298
>>>> 562949953421299
>>>> 562949953421300
>>>> 562949953421301
>>>> 562949953421302
>>>> 562949953421303
>>>> 562949953421304
>>>> 562949953421305
>>>> 562949953421306
>>>> 562949953421307
>>>> 562949953421308
>>>> 562949953421309
>>>> 562949953421310
>>>> 562949953421311
>>>> 0
>>>> 1
>>>> 2
>>>> 3
>>>> 4
>>>> 5
>>>> 6
>>>> 7
>>>> 8
>>>> 9
>>>> 10
>>>> 11
>>>> 12
>>>> 13
>>>> 14
>>>> 15
>>>> 16
>>>> 17
>>>> 18
>>>> 19
>>>> 20
>>>>
>>>> Anybody else seeing this????
>>>>
>>>> - -
>>>> Marc
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso
>>>> [hidden email]
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso
>>> [hidden email]
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>