When working with complex number computations some result, (a j. b) may satisfy
the equation (a=a+b) within tolerance. In that case it is reasonable to write
(b=0), even if the imaginary part b is not exactly equal to zero.
I wrote program f0 such that
f0 0.210224j2.92605e_98 _7.31512e_99
Note that b may depend on a.
b=: 1e6
a=: 9e99
a=a+b
1
FYI,
--
Raul
On Fri, Feb 19, 2021 at 1:55 PM 'Bo Jacoby' via Programming
wrote:
>
> When working with complex number computations some result, (a j. b) may
> satisfy the equation (a=a+b) within tolerance. In that case it is reaso
I think that’s his point. He wants b to be 0 here.
Am 19.02.21 um 21:39 schrieb Raul Miller:
> Note that b may depend on a.
>
>b=: 1e6
>a=: 9e99
>a=a+b
> 1
>
> FYI,
>
--
--
mail written using NEO
neo-layout.org
-
I'm not quite sure I understand, then.
On the one hand, irrational numbers can not all be represented
exactly. And, we're using IEEE-754 binary 64 bit floating point
numbers as our final precision, in current J implementations. So we
have to deal with epsilon issues.
On the other hand, J also inc
And there’s more than one way of doing so.
But I don’t think anyone would want this
to happen in every calculation, in any
algorithm. It’s okay to have a function
you call every time you might actually
want to consider the smaller one 0 but
not with every intermediate result.
From my point of vie
You have it right.
In cases like this does the smaller one being zero vs non-zero matter?
If it is carried along the effect is not a reduction of accuracy.
The problem (if any) may bethe way that numbers are stored. Floats have
basically 63bits including a sign bit and 11 bit exponent bits
I find this lack of beauty surprisingly disturbing:
(^ j. 1p1)
_1j1.22465e_16
So much so, in fact, that if I'm ever in the situation of having to prove
to a finicky Galactic Emperor that humanity is indeed capable of producing
the most sublime beauty and thus worthy of saving, I would undou