Decision, decisions.  How /should/ you specify an extended infinity?  I say

   _x
|ill-formed number

There could be alternatives. _r(any finite) and (any non0)r0 are both reasonable.

NOTE that the GMP library that we have moved to has no way to represent extended infinity.  Raul has chosen 1r0 as our internal representation of extended infinity, so infinity will always have rational precision, not extended integer.

For display, we get it right:

   1r0
_

It seems that _r(any) should be converted to infinity - and _x and __x too I think.  This is in Raul's area.

If you have a dependency on the internal representation of infinity it will be on you to update it.

Henry Rich







On 1/24/2023 9:00 PM, Ian Clark wrote:
j903 accepts -- but j904 rejects -- this way of defining rational infinity:

_r1

|ill-formed number

| _r1

| ^

JVERSION

Engine: j904/j64arm/darwin

Beta-k: commercial/2023-01-24T04:42:28

Library: 9.04.10

Qt IDE: 2.0.3/6.2.4(6.2.4)

Platform: Darwin 64

Installer: J904 install

InstallPath: /applications/j904

Contact: www.jsoftware.com

A workaround is to use 1r0 instead:


1r0

_

datatype 1r0

rational


Not a lot of j-ers willl have a use for rational [minus] infinity, but IMO
a beginner might find it more intuitive to define it as _r1 rather than 1r0
. Maybe it's no big deal in itself, but it breaks 3 addons, viz: math/cal,
math/uu -- and in consequence math/tabula:


    load'math/uu' NB. Launch UU only
|ill-formed number in script, executing monad 0!: 0
|any word beginning with a digit or _ must be a valid number
|   BADRAT=: __r1
|            ^
|[-33] /applications/j904/addons/math/uu/uu.ijs

    load'math/cal'
|ill-formed number in script, executing monad 0!: 0
|any word beginning with a digit or _ must be a valid number
|   BAD_EXE_VALUE=: __r1
|                   ^
|[-92] /applications/j904/addons/math/cal/cal.ijs


So I'd call it a bug.


There's been plenty of time to discover this. Sorry it's taken me so long.


Ian Clark
----------------------------------------------------------------------
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