There is no global setting, but you can use monadic *. .  From the Dictionary 
entry,

*.y is a two-element list of the length and angle (in radians) of the 
hypotenuse 
of a triangle with base and altitude equal to the real and imaginary parts y . 
For example, *. 3j4 is 5 0.927295.

Also, click on Constants on the Voc help page.  Finally, check out dyadic o. .


On 10/10/2010 7:00 AM, Bo Jacoby wrote:
> The natural logarithm of a complex number basicly gives the polar form.
>     ^. 1j1
> 0.346574j0.785398
>
>
> --- Den søn 10/10/10 skrev david alis<[email protected]>:
>
> Fra: david alis<[email protected]>
> Emne: [Jprogramming] represention of complex numbers
> Til: "Programming forum"<[email protected]>
> Dato: søndag 10. oktober 2010 13.26
>
> Complex numbers always seem to be displayed using cartesian coordinates.
>
> When complex numbers represent rotations and displacements in 2-D
> then rotations are better displayed in polar form
> and displacements in cartesian.
>
> 1ad45    NB. rotate by 45 degrees
>       0.707107j0.707107
>
> I wrote a simple polar format verb because i couldn't find an !:
> option that would help.
>
> Is there a global setting that controls the display format of complex?
>
> Thanks
> David
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to