exp
 =: ^ ^:]"0

   100 1 2 exp 1 0 0 
100 0 0 
   100 1 2 ^ 1 0 0 
100 1 1 

both behave as I wish

when I want this

   100 1 2 ^ 1 1 _2 
100 1 0.25 

I get with exp, this

   100 1 2 exp 1 1 _2 
100 1 2.21455j1.95289 

is there a way to define exp such that it does not return imaginary numbers?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to