Skip to content

ArrayFormat broken on Integer and Double (at least) data types #72

@bernecky

Description

@bernecky

The ArrayFormat:format() function is broken for matrix arguments. There
are two direct causes of this failure:

  1. Sac2c Issue #2313 shows a broken sac2c typechecker that generates an AKV result for abs((-2)31). Since there is no way to represent 231 as an integer, the two choices I see here are either to signal an error within the typechecker, or to leave the result as AKS. The latter would, at least, defer the failure, or eliminate it if the abs() turns out to be dead code. The former approach is definitely wrong, and unpleasant. See #2313.

  2. My format() code was lifted directly from the APL model, which would generate a real-number result for the above abs() case, in an interpreter. I am redesigning the format() algorithm to eliminate the use of abs(). That is work in progress...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions