J uses the C printf() routine to format 64-bit floating point numbers. The different outputs are perhaps due to the differences in the printf()'s on the different systems. In any case, only the first 16 decimal digits are significant; the rest are garbage.
----- Original Message ----- From: Joey K Tuttle <[email protected]> Date: Sunday, August 9, 2009 11:35 Subject: Re: [Jgeneral] Array Based Languages To: General forum <[email protected]> > At 07:50 -0500 2009/08/09, Tom Arneson wrote: > >My version is: > > JVERSION > >Installer: j602a_win.exe > >Engine: j602/2008-03-03/16:45 > >Library: 6.02.049 > > > >At 18:11 -0500 2009/08/08, Tom Arneson wrote: > > >You can use the Format verb ": to convert the real > value to a literal (or > >>string): > >> > >> 0j16": o. 1 > >>3.1415926535897931 > > > 0j20": o. 1 > > >3.14159265358979310000 > >> > > Tom, > > I find your second result very peculiar, I hope Roger will > comment on it. > > From several versions of j, I consistently get a different > result - > > 9!:14'' > 4.05/2001-05-16/11:30 > 0j20": o. 1 > 3.14159265358979311600 > > --- > > 9!:14'' > j602/2008-03-03/16:45 > 0j20": o. 1 > 3.14159265358979311600 > > I am quite curious to see what you might get from the following > 2 expressions - > > (j.15+i.15)":"0 o.1 > 3.141592653589793 > 3.1415926535897931 > 3.14159265358979312 > 3.141592653589793116 > 3.1415926535897931160 > 3.14159265358979311600 > 3.141592653589793115998 > 3.1415926535897931159980 > 3.14159265358979311599796 > 3.141592653589793115997963 > 3.1415926535897931159979635 > 3.14159265358979311599796347 > 3.141592653589793115997963469 > 3.1415926535897931159979634685 > 3.14159265358979311599796346854 > > 40":"0 ]2^120+4*i.5 > 1329227995784915872903807060280344576 > 21267647932558653966460912964485513216 > 340282366920938463463374607431768211456 > 5444517870735015415413993718908291383296 > **************************************** ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
