bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Almost One


From: Juergen Sauermann
Subject: Re: [Bug-apl] Almost One
Date: Fri, 04 Sep 2015 16:19:42 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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

[Prev in Thread] Current Thread [Next in Thread]