Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Fix sincosf(PI)#229

Merged
alexcrichton merged 1 commit intorust-lang:masterfrom
CryZe:fix-sincosf
Oct 18, 2019
Merged

Fix sincosf(PI)#229
alexcrichton merged 1 commit intorust-lang:masterfrom
CryZe:fix-sincosf

Conversation

@CryZe
Copy link
Copy Markdown
Contributor

@CryZe CryZe commented Oct 4, 2019

Looks like the implementation was not ported correctly. Some negations were forgotten in a certain branch. Here is the original code in musl that has the negations:

https://github.com/bpowers/musl/blob/94cb2ec2a0ffcb47d24dbf7a30e462505396cf54/src/math/sincosf.c#L66-L67

Resolves #228

@alexcrichton
Copy link
Copy Markdown
Member

Thanks! Can you be sure to add some tests for this as well?

Looks like the implementation was not ported correctly. Some negations
were forgotten in a certain branch. Here is the original code in musl
that has the negations:

https://github.com/bpowers/musl/blob/94cb2ec2a0ffcb47d24dbf7a30e462505396cf54/src/math/sincosf.c#L66-L67

Resolves rust-lang#228
@CryZe
Copy link
Copy Markdown
Contributor Author

CryZe commented Oct 18, 2019

Alright, I added a test.

@alexcrichton alexcrichton merged commit a5e39d8 into rust-lang:master Oct 18, 2019
tgross35 pushed a commit that referenced this pull request Apr 18, 2025
Looks like the implementation was not ported correctly. Some negations
were forgotten in a certain branch. Here is the original code in musl
that has the negations:

https://github.com/bpowers/musl/blob/94cb2ec2a0ffcb47d24dbf7a30e462505396cf54/src/math/sincosf.c#L66-L67

Resolves #228
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sincosf returns (0, 1) on PI instead of (0, -1)

2 participants