Hi Mike,

I can't really see what's wrong here. On my platform I get:

      ALMOST_ONE←1D45*8
      2 ⎕TF 'ALMOST_ONE'
ALMOST_ONE←9.999999999999998E¯1J¯2.449293598294707E¯16

2 ⎕TF is independent of ⎕PP and ⎕CT and it prints floating point and complex numbers
with their maximum precision. So this merely shows that 1D45 to the 8th power
slightly differs from its theoretical value 1.0 (due to rounding erros when parsing
1D45 and when computing the 8th power).

/// Jürgen


On 09/03/2015 01:26 AM, Mike Duvos wrote:
       )CLEAR
CLEAR WS
     
      ALMOST_ONE←1D45*8
     
      ⎕CT←0
     
      ⎕PP←18
     
      ALMOST_ONE
1
      1=ALMOST_ONE
0
      2 ⎕TF 'ALMOST_ONE'
ALMOST_ONE←1J¯2.449293598294707E¯16

When I set ⎕PP←18, I would expect the exact values of numbers to be printed.

APL2 prints the number exactly.



Reply via email to