Since the arrays p1 and p2 are integer vectors, 0 tolerance and print precision are not relevant. The bug you have uncovered is an old one since fixed in the J601 betas.
----- Original Message ----- From: "Sashikanth Chandrasekaran" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, May 18, 2006 12:57 PM Subject: [Jprogramming] Re: simple qn. on e. Providing the output for the sentences, as per Dan Bron's suggestion: (BTW, I am getting the same unexpected results with J504 on Windows also). p1 e.&:(]&.":) p2 NB. Ignore internal reps 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 p2 e. p1 NB. Switch arguments 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 p1 -:!.0 p2 NB. Zero tolerance 1 p1 =!.0 p2 NB. Zero tolerance 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 p1 e.!.(2^_34) p2 NB. Max tolerance 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9!:11[20 NB. Max print precision p1 NB. Display full precision 12764 23608 69514 69538 94548 103028 103030 103038 103077 103092 103106 116138 116158 116193 116216 120335 p2 NB. Display full precision 12764 23608 69514 69538 94548 103028 103030 103038 103077 103092 103106 116138 116158 116193 116216 120335 p1 -:&:(3!:3) p2 NB. Compare byte-for-byte 1 p1 ;&:(3!:3) p2 NB. Display internal reps +--------+--------+ |04000000|04000000| |00000000|00000000| |10000000|10000000| |01000000|01000000| |10000000|10000000| |dc310000|dc310000| |385c0000|385c0000| |8a0f0100|8a0f0100| |a20f0100|a20f0100| |54710100|54710100| |74920100|74920100| |76920100|76920100| |7e920100|7e920100| |a5920100|a5920100| |b4920100|b4920100| |c2920100|c2920100| |aac50100|aac50100| |bec50100|bec50100| |e1c50100|e1c50100| |f8c50100|f8c50100| |0fd60100|0fd60100| +--------+--------+ ----------------------------------------------------- If your transcript is accurate, there is certainly a bug. The fact that e."0 _ works probably indicates it lies in the special code for e. . However, since you're running J5, it may already have been fixed. Can you try downloading the latest J6 beta and trying your experiment there? I would do so for you, but I cannot reproduce your results even in J5. It maybe that I'm on a Windows machine, i.e. 9!:12'' 6 and you're on Linux. But I bet that's not the difference. I believe your data is very specific. For one thing, it's complex. Do you expect that? Complex numbers are implemented with floating points, which has been a historical sticking point for comparatives. Try the following and see if you get the results you expect: p1 e.&:(]&.":) p2 The verb ]&": ensures the numbers "are" what they "look like". If that solves the problem, then you can either use it in your scripts, or we can explore your data further. A few phrases which will help: p1 e.&:(]&.":) p2 NB. Ignore internal reps: still all 0s? p2 e. p1 NB. Switch arguments: still all 0s? (order sensitive?) p1 -:!.0 p2 NB. Zero tolerance: still 1? p1 =!.0 p2 NB. Zero tolerance: still all 1s? p1 e.!.(2^_34) p2 NB. Max tolerance: still all 0s? 9!:11[20 NB. Max print precision p1 NB. Display p1 to full precision p2 NB. Display p2 to full precision p1 -:&:(3!:3) p2 NB. Compare internal reps byte-for-byte p1 ;&:(3!:3) p2 NB. Display the internal reps for comparison. Run these sentences and send the results back to the Forum. -Dan ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
