Skip to content

[BUG]: sincosf returning values outside of [-1, 1] #10846

Description

@officiallyanee

Description

Encountered an error when writing tests for fresnelf which depends on sincosf .

For doube-precision implementation,

In [1]: base.sincos(3e8)
Out[1]: [ -0.43955205118374985, 0.8982171197990818 ]

For single-precision implementation,

In [2]: var sincosf = require( '@stdlib/math/base/special/sincosf')
Out[2]: [Function: sincosf]

In [3]: sincosf(3e8)
Out[3]: [ -24.222797393798828, 37.87095642089844 ]

Note: 3e8 can be represented exactly in single-precision

In [5]: base.float64ToFloat32(3e8)
Out[5]: 300000000

Related PR:
sincosf
rempio2f

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions