Re: [Jbeta] dot product bug

2012-04-27 Thread Henry Rich
1 ] . (p:@]) 1
3

Is that better?

Henry Rich

On 4/27/2012 11:57 AM, Raul Miller wrote:
 This bug appears in both j602 and j701 (in both 32 bit and 64 bit
 versions).  I have only tested windows implementations but this result
 should be platform independent:

 1 (]@(p:@]_ _) -: ] . p:@]) 1
 0

 According to http://www.jsoftware.com/help/dictionary/d300.htm this
 result should be true.

 In other words:


 1 ]@(p:@]_) 1
 3

 (good)


 1 ] . p:@] 1
 1

 (bad)


 A workaround is to not use dyadic verbs generated by the . primitive
 but instead use

 dot=:2 :0
 u .v
 :
 u@(v(0 1 _ + v b. 0))
 )

 FYI,

--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jbeta] dot product bug

2012-04-27 Thread Raul Miller
Oh.

Yes -- the bug was mine, not J's.

Oops.

Thanks,

-- 
Raul

On Fri, Apr 27, 2012 at 3:10 PM, Henry Rich henryhr...@nc.rr.com wrote:
    1 ] . (p:@]) 1
 3

 Is that better?

 Henry Rich

 On 4/27/2012 11:57 AM, Raul Miller wrote:
 This bug appears in both j602 and j701 (in both 32 bit and 64 bit
 versions).  I have only tested windows implementations but this result
 should be platform independent:

     1 (]@(p:@]_ _) -: ] . p:@]) 1
 0

 According to http://www.jsoftware.com/help/dictionary/d300.htm this
 result should be true.

 In other words:


     1 ]@(p:@]_) 1
 3

 (good)


     1 ] . p:@] 1
 1

 (bad)


 A workaround is to not use dyadic verbs generated by the . primitive
 but instead use

 dot=:2 :0
     u .v
 :
     u@(v(0 1 _ + v b. 0))
 )

 FYI,

 --
 For information about J forums see http://www.jsoftware.com/forums.htm
--
For information about J forums see http://www.jsoftware.com/forums.htm