Your expressions all produce a 64-bit IEEE
floating point number first, and then converted
it into extended precision.  To avoid that,
append an "x" to the string before executing it:

   ". 'x',~ 50#'1'
11111111111111111111111111111111111111111111111111
   ". 'x',~ 50#'2'
22222222222222222222222222222222222222222222222222
   ". 'x',~ 50#'3'
33333333333333333333333333333333333333333333333333
   
   <[EMAIL PROTECTED] 10^50x
314159265358979323846264338327950288419716939937510



----- Original Message -----
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Date: Wednesday, March 28, 2007 4:43 pm
Subject: [Jgeneral] Extended precision

>   NB. When looking at some of the 'Euler Project' problems
>   NB. I came across the following:
>   
>   ]a=.50#'1'
> 11111111111111111111111111111111111111111111111111
>   x:".a
> 11111111111111110805019569335803527359330256945152
>   x:".50#'2'
> 22222222222222221610039138671607054718660513890304
>   x:".50#'3'
> 33333333333333332415058708007410582077990770835456
>   
>   NB. I suspect that the limit of precision is related to 
>   NB. the fact that I have a 32 bit computer but, not knowing
>   NB. much about the mechanics of the thing, I am intrigued by
>   NB. the apparent reproducibility of the result (under both
>   NB. Windows and Ubuntu linux) and on the relationship between
>   NB. the first 16 digits and the remainder.
>   
>   NB. Can anyone enlighten me?
>   
>   NB. Is there any way of getting the 'correct' answer?  
>   NB. Suppose I want the first 50 digits of Pi?
> 
> Regards,
> 
> Eddie Clough.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to