Because both 1p1 and %:2 are 64-bit IEEE floating point numbers
and those have only about 18 decimal digits.

If you want more digits you have to use extended precision
numbers and calculations.  See for example:

http://www.jsoftware.com/jwiki/Essays/Extended_Precision_Functions



----- Original Message -----
From: Richard Donovan <[EMAIL PROTECTED]>
Date: Friday, October 19, 2007 14:56
Subject: RE: [Jprogramming] extended decimals
To: Programming forum <[email protected]>

> 
> So why does
> 
>    0j66 ": 1p1
> 3.141592653589793100000000000000000000000000000000000000000000000000
>    0j66 ": %:2
> 1.414213562373095100000000000000000000000000000000000000000000000000
>    
> etc.
> 
> Come up short?
> 
> > Date: Wed, 17 Oct 2007 00:05:54 -0700
> > To: [email protected]
> > From: [EMAIL PROTECTED]
> > Subject: Re: [Jprogramming] extended decimals
> > 
> > Try -
> > 
> >     0j66 ": 1r7
> > 0.142857142857142857142857142857142857142857142857142857142857142857
> > 
> > 
> > 
> > At 12:19  +0530 2007/10/17, adam dunne wrote:
> > >Is it possible to convert a number like 1r7 into an extended 
> decimal?> >I was thinking of far more than the 17 decimal places 
> allowed by
> > >format with fit:
> > >":!.20 %7
> > >0.14285714285714285
> > >    ":!.21 %7
> > >|limit error
> > >|       ":!.21%7
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to