Infinity is a feature of double; extended integers and rationals have no
notion of infinity so normally arithmetic gets done in double. So if
your array has numbers that are too large for machine integers the easy
way out is to convert the extended precision. You could test for special
cases, e.g., when <. has an extended and double argument that only
contains infinity and return the extended, but that doesn't seem very
satisfying. I think it requires more thought.
BTW, anyone is welcome to discuss extensions to Unbox by opening a new
issue: https://github.com/iocane/unbox/issues
If you are not satisfied with that system I am open to suggestions for
implementing a better one.
On 02/03/2016 02:02 PM, Dan Bron wrote:
I know we have yet to organize a formal process for building and disseminating
a community-driven implementation of J, but in anticipation of that day’s
arrival, perhaps we can start collecting community-driven proposals for
enhancements?
One such enhancement could be special code that detects whether the argument to
an arithmetic dyad is the scalar _ (or __ or _.) and if so, avoids demoting the
other argument to double if it’s already extended or rational.
I have other ideas too. But maybe we should collect them on the Wiki?
-Dan
On Feb 2, 2016, at 9:12 PM, Henry Rich <[email protected]> wrote:
No, extendeds promote to float on mixed operations.
Henry Rich
On 2/2/2016 9:09 PM, 'Pascal Jasmin' via Programming wrote:
9223372036854736345 <. _
9.22337e18
result is a double. <. double is the closest integer it can find.
this seems like a problem though:
9223372036854736345x <. _
9.22337e18
----- Original Message -----
From: Henry Rich <[email protected]>
To: Programming forum <[email protected]>
Sent: Tuesday, February 2, 2016 9:05 PM
Subject: [Jprogramming] When a <. _ is less than a
I'm stepping up to the world of 64-bit integers, and stepping into cowflops.
This took me quite a while:
<. 9223372036854736345 <. _
9223372036854735872
See that? Take the minimum of (number) and (infinity), and the result
is less than (number)!
Yes, I understand why it happens. Now I do. Be warned.
Henry Rich
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm