Skip to content

utrig arcsin(x) not working for domain of |x| <= 1 #7

Closed

Description

@CedarGroveStudios

utrig line 185:

The arctan method for determining arcsin(x) only works for values in the domain of |x| < 1 rather than |x| <= 1. The method throws a DivisionByZero error for x = 1 or x = -1.

Activity

  1. jepler commented on Feb 11, 2022

    @jepler
    Collaborator

    I'd be happy to accept a patch that special cases these two values. Add a test for bonus points.

  2. CedarGroveStudios commented on Feb 11, 2022

    @CedarGroveStudios
    ContributorAuthor

    I'm not fully confident in my understanding of using arctan to derive arccos and arcsin, but could take a stab at simply substituting 1/2 * pi or 3/2 * pi for the domain boundary condition.

    Also, the DivisionByZero issue only impacts arcsin results. I fixed the issue title and initial description. arccos has a different domain boundary issue.

  3. changed the title [-]utrig arcsin(x) and arccos(x) not working for domain of |x| <= 1[/-] [+]utrig arcsin(x) not working for domain of |x| <= 1[/+] on Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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