IEE 754 floating point numbers are fixed size, and J represents
complex numbers as pairs with a real and an imaginary component.  Both
of these prevent arbitrary complexity.

The lack of any magnitude in "negative zero" also makes reasoning
about algorithms difficult, in the general case.  Since "negative
zero" only makes sense when associated with a process, it's not really
clear why this belongs in the magnitude rather than elsewhere in the
process.

Still, it's there, and "it does what it does", whatever that is. But
consistent treatment, in the general case, seems ill-defined - if
negative zeros matter, that can easily mean that floating point
numbers are not going to be adequate to represent your results.

-- 
Raul

On Thu, Jan 17, 2013 at 5:34 AM, Boyko Bantchev <[email protected]> wrote:
> Once we have +0 and -0 as distinct values, why stop here?
> In the complex plane, one would expect a continuum of zeros with
> all possible trends.  Thus,
>
>    z =. 0 r. α
>
> is a complex number of zero magnitude and argument α -- a pure
> direction!  So  *.z  returns the list  0,α, while  +.z  returns
> a list of two values such that  0=+/|+.z  and  %/+.z  is the tangent
> of α, i.e.  _3&o.%/+.z  is α itself.
> :)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to