a. What does it mean to say that something "is not arithmetic"?

b. I note that:

   ^~100
1e200
   ^~100x
100000000000000000000000000000000000000000000000000000000000 ...
   (^~100) - ^~100x
3.39928e184
   (^~100) = ^~100x
1
   1e200 = 1e200-3.39928e184
1
   1e200 %~ (^~100) - ^~100x
3.39928e_16

In this case the difference is less than one part in 3 trillion.
Please define "very different".



----- Original Message -----
From: Raul Miller <[EMAIL PROTECTED]>
Date: Friday, September 28, 2007 14:52
Subject: Re: [Jprogramming] /. in inverted tables
To: Programming forum <[email protected]>

> Here's a better illustration of the issue that J's implicit coercion
> of extended and rational number to floating point is not arithmetic:
> 
>    n1=:{.100 0.01
>    n2=:<.n1
>    n1 - n2
> 0
>    n1 -&(^x:) n2
> 2.19254e186
> 
> Here, we have two numbers which are numerically equivalent,
> but applying the same function to them gives very different results.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to