Re: [Bug-apl] Floating-point random number function

2017-06-30 Thread Louis de Forcrand
?0 would be a good extention wouldn't it? I don't have access to an interpreter but I would guess that it gives a domain error right now. Cheers, Louis > On 1 Jul 2017, at 01:20, Christian Robert wrote: > > You are right ! > > Xtian. > >> On 2017-06-30 16:48, Frederick Pitts wrote: >> Xtian,

Re: [Bug-apl] Floating-point random number function

2017-06-30 Thread Christian Robert
You are right ! Xtian. On 2017-06-30 16:48, Frederick Pitts wrote: Xtian, Actually the function you present returns the type of the argument, not the prototype, as per Type <=> ↑0ρ⊂R on page 46 of IBM's "APL2 Programming: Language Reference". The prototype is the ty

Re: [Bug-apl] Floating-point random number function

2017-06-30 Thread Frederick Pitts
Xtian, Actually the function you present returns the type of the argument, not the prototype, as per Type <=> ↑0ρ⊂R on page 46 of IBM's "APL2 Programming: Language Reference". The prototype is the type of the first element of R, i.e., Prototype <=> ↑0⍴⊂

Re: [Bug-apl] Floating-point random number function

2017-06-29 Thread Christian Robert
I don't know, your "(res+V×0)" is probably the way to go for that purpose, I'm not an expert but I understand what you mean. I have an alias defined as: proto←{↑0⍴⊂ ⍵} that give me the prototype of the argument (use with: 24 QuadCR proto w). It will probably not help you but good to know.

Re: [Bug-apl] Floating-point random number function

2017-06-29 Thread Elias Mårtenson
The purpose of it is to preserve the structure of the argument, while setting all values to MAXINT. Is there a better way to achieve this? Regards, Elias On 30 June 2017 at 12:21, Christian Robert wrote: > On 2017-06-30 00:19, Elias Mårtenson wrote: > >> Thanks. I'll stick with this for now th

Re: [Bug-apl] Floating-point random number function

2017-06-29 Thread Christian Robert
On 2017-06-30 00:19, Elias Mårtenson wrote: Thanks. I'll stick with this for now then. How would (res+V×0) wrap around, by the way? Bad first reading, (res+V×0) does nothing, it add 0 to "res". How is it usefull ? Xtian. On 30 June 2017 at 12:17, Christian Robert mailto:christian.rob...@

Re: [Bug-apl] Floating-point random number function

2017-06-29 Thread Elias Mårtenson
Thanks. I'll stick with this for now then. How would (res+V×0) wrap around, by the way? On 30 June 2017 at 12:17, Christian Robert wrote: > I think this is the best you can get, about 62 bits of randomness. > > (64⍴2) ⊤⎕syl[20;2] ⍝ the largest 64 bits integer supported by gnu-apl > 0 1 1

Re: [Bug-apl] Floating-point random number function

2017-06-29 Thread Christian Robert
I think this is the best you can get, about 62 bits of randomness. (64⍴2) ⊤⎕syl[20;2] ⍝ the largest 64 bits integer supported by gnu-apl 0 1 1 1 1 1 1 1 1 0 1 0 1 1 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 so, it's a bit less than