[Jprogramming] Complex Numbers
Raul Miller
rauldmiller at gmail.com
Mon Jul 31 18:11:50 UTC 2017
1 j. %:3
Thanks,
--
Raul
On Mon, Jul 31, 2017 at 2:10 PM, Skip Cave <skip at caveconsulting.com> wrote:
> How can I create the complex number 1 i (sqrt 3) in J
>
> Several tries didn't work:
>
>
>
> 1j%:3
>
> |ill-formed number
>
> a =: %:3
>
> 1ja
>
> |ill-formed number
>
> 1j(%:3)
>
> |ill-formed number
>
> %:3
>
> 1.73205
>
> 1j1.73205
>
> 1j1.73205 NB. This works, but it isn't very elegant.
>
> NB. I have to copy/paste the square root as text.
>
>
>
>
> Skip Cave
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list