Just remember that there are some pitfalls comparing the special number
notations with some of the primitives, e.g. this works:

   1j2=j./1 2
1

NB. OK, but
   12345678910111213x = x: 12345678910111213
0
   12345678910111213x - x: 12345678910111213
1
NB. Conversion/precision issue?

   2r3=r./2 3
0
NB. Not even close
   r./2 3
_1.979985j0.28224002

NB. Different notation for number versus conversion.
   1p1=o. 1
1
   1p2 = *: o. 1
1


On Mon, Mar 8, 2010 at 11:38 PM, David Ward Lambert
<[email protected]>wrote:

> Whoops!  I had ignored these primitives thinking they were merely
> alternate ways to write numbers.
>
> j. Imaginary • Complex
> o. Pi Times
> r. Angle • Polar
> x: Extended Precision
>
>
> From: "Dan Bron" <[email protected]>
> Subject: Re: [Jchat] Conversion
> To: "'Chat forum'" <[email protected]>
> Message-ID: <010901cabf1e$82032a10$86097e...@us>
> Content-Type: text/plain;       charset="us-ascii"
>
> David Ward Lambert wrote:
> >  I'd like to convert rational to float.  What, please, is a better
> way?
> >    1.001 * 2r5  NB. unsatisfying.
>
> Since  x: 2%5  converts  0.4  to  2r5  we might expect that  (x:^:_1)
> 2r5 would ...
>
>
>
>
>
>
>
>
>
>
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to