Re: [Bug-apl] alias for built-in functions

2015-09-04 Thread Christian Robert
Working fine here Xtian. D←{24 ⎕cr ⍵} D ⍳4 ┌4──┐ │1 2 3 4│ └───┘ t←(3 4 ⍴ 12?100) (4 5 ⍴⍳20) D t ┌2──┐ │┌4───┐ ┌5─┐│ │377 85 51 69│ 4 1 2 3 4 5││ ││ 8 42 46 41│ │ 6 7 8 9 10││ ││93 67 100 52│ │11 12 13 14 1

Re: [Bug-apl] alias for built-in functions

2015-09-04 Thread Juergen Sauermann
Hi Alexey, it works on my machine:   DISPLAY←{8⎕CR ⍵}   ⎕CR 'DISPLAY' λ←DISPLAY ⍵ λ←8⎕CR ⍵       DISPLAY 1 2 3 ┌→┐ │1 2 3│ └─┘ Yo

[Bug-apl] alias for built-in functions

2015-09-04 Thread Alexey Veretennikov
Hi, I want to make an alias for the display function, like in Dyalog APL DISPLAY, but by some reason can't. I want to function DISPLAY behave as 8⎕CR: DISPLAY←{8⎕CR ⍵} produces an error: DEFN ERROR λ1 ^ The DISPLAY←8⎕CR also doesn't work: SYNTAX ERROR DISPLAY←8 ⎕CR

Re: [Bug-apl] Almost One

2015-09-04 Thread Juergen Sauermann
Hi Mike, I see. I have increased the number of digits to 17, but only for ⎕TF (because otherwise a few of my automated testcases would break). SVN 674. /// Jürgen On 09/04/2015 05:42 PM, Mike Duvos wrote:

Re: [Bug-apl] Almost One

2015-09-04 Thread Mike Duvos
One small correction. 2^53 is 9e15, which is 16 digits, so writing stuff rounded to 17 decimal places should exactly reproduce it for IEEE 64 bit floats. I don't know why 18 popped into my head. *So just let the maximum * *⎕PP be 17 instead of 16, and all will be well.* On Fri, Sep 4, 2015

Re: [Bug-apl] Almost One

2015-09-04 Thread Mike Duvos
I see the problem. You limit *⎕PP to 16, which isn't enough digits. 1E**¯16 is 1 to 16 places.* I didn't notice this, because you just set it to 16 if I set it to 18. You need to allow a larger *⎕PP to exactly reproduce floating data written out and read back in.*

Re: [Bug-apl] Almost One

2015-09-04 Thread Mike Duvos
Hi Jürgen, To reproduce a floating point value exactly when it is read back in after being converted to ASCII, it is necessary to write out one past the maximum number of decimal digits the floating point representation supports. 64 bit IEEE is 17 decimal places, so you have to write out 18. So

Re: [Bug-apl] Almost One

2015-09-04 Thread Juergen Sauermann
Hi Mike, I can't really see what's wrong here. On my platform I get:   ALMOST_ONE←1D45*8   2 ⎕TF 'ALMOST_ONE' ALMOST_ONE←9.998E¯1J¯2.449293598294707E¯16 2 ⎕TF is independent of ⎕PP and ⎕CT and it prints floating