Skip to content

ARCTAN2 errors out when X is 0 #2380

@RyanBurnside

Description

@RyanBurnside

Describe the bug
Currently ARCTAN2 is implemented using FQUOTIENT division that does no zero check.
I came across this when it was throwing errors during my game project.
Unfortunately it also means it considers perfectly valid parameters errors.

To Reproduce
In your Exec for Interlisp try
(ARCTAN2 -1 0)
You'll see an error followed by 0.0.

Expected behavior
It should return a computation for that parameter set without error.
(ARCTAN2 0 0) /may/ be considered undefined but currently the function is erroring on ALL cases where X is 0 and Y is not due to the immediate division.

Screenshots

Image

Context (please complete the following information):

  • Are you using online.interlisp.org? [no]
  • OS: [Linux]
  • OS Version: [Kubuntu 24]
  • Display/window system: [X11]
  • Host arch: [x86_64]
  • Maiko version: [e.g. commit ID from git log | head]
  • IL:MAKESYSDATE: [8-Oct-2025]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions