Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore original fdlibm copyright on sincos files #265

Merged
merged 1 commit into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/s_sincos.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
/* @(#)s_sincos.c 5.1 13/07/15 */
/*
/* See openlibm LICENSE.md for full license details.
*
* ====================================================
* This file is derived from fdlibm:
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
*
* ====================================================
* Copyright (C) 2013 Elliot Saba. All rights reserved.
*
Expand All @@ -25,7 +34,7 @@
* Borrow liberally from s_sin.c and s_cos.c, merging
* efforts where applicable and returning their values in
* appropriate variables, thereby slightly reducing the
* amount of work relative to just calling sin/cos(x)
* amount of work relative to just calling sin/cos(x)
* separately
*
* Special cases:
Expand Down
15 changes: 12 additions & 3 deletions src/s_sincosf.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
/* s_sincosf.c -- float version of s_sincos.c
*
* ====================================================
* This file is derived from fdlibm:
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
*
* ====================================================
* Copyright (C) 2013 Elliot Saba
* Developed at the University of Washington
*
Expand Down Expand Up @@ -115,14 +124,14 @@ sincosf(float x, float * s, float * c) {
/* |x| ~<= 9*pi/4 */
if(ix<=0x40e231d5) {
/* |x| ~> 7*pi/4 */
if(ix<=0x40afeddf) {
if(ix<=0x40afeddf) {
if(hx>0) {
__kernel_sincosdf( x - sc3pio2, c, &k_s );
*s = -k_s;
} else {
__kernel_sincosdf( x + sc3pio2, &k_c, s );
*c = -k_c;
}
}
}
else {
if( hx > 0 ) {
Expand All @@ -148,7 +157,7 @@ sincosf(float x, float * s, float * c) {
case 1:
__kernel_sincosdf( -y, c, s );
break;
case 2:
case 2:
__kernel_sincosdf( -y, s, &k_c);
*c = -k_c;
break;
Expand Down