Skip to content

Commit b72f445

Browse files
refactor: replace separate sin and cos calls with sincos
PR-URL: #6365 Reviewed-by: Philipp Burckhardt <[email protected]>
1 parent 9ba3f82 commit b72f445

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

lib/node_modules/@stdlib/math/base/special/ccis/manifest.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
"@stdlib/complex/float64/ctor",
4141
"@stdlib/complex/float64/reim",
4242
"@stdlib/math/base/special/exp",
43-
"@stdlib/math/base/special/cos",
44-
"@stdlib/math/base/special/sin"
43+
"@stdlib/math/base/special/sincos"
4544
]
4645
},
4746
{
@@ -58,8 +57,7 @@
5857
"@stdlib/complex/float64/ctor",
5958
"@stdlib/complex/float64/reim",
6059
"@stdlib/math/base/special/exp",
61-
"@stdlib/math/base/special/cos",
62-
"@stdlib/math/base/special/sin"
60+
"@stdlib/math/base/special/sincos"
6361
]
6462
},
6563
{
@@ -76,8 +74,7 @@
7674
"@stdlib/complex/float64/ctor",
7775
"@stdlib/complex/float64/reim",
7876
"@stdlib/math/base/special/exp",
79-
"@stdlib/math/base/special/cos",
80-
"@stdlib/math/base/special/sin"
77+
"@stdlib/math/base/special/sincos"
8178
]
8279
}
8380
]

lib/node_modules/@stdlib/math/base/special/ccis/src/main.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
#include "stdlib/complex/float64/ctor.h"
2121
#include "stdlib/complex/float64/reim.h"
2222
#include "stdlib/math/base/special/exp.h"
23-
#include "stdlib/math/base/special/sin.h"
24-
#include "stdlib/math/base/special/cos.h"
23+
#include "stdlib/math/base/special/sincos.h"
2524

2625
/**
2726
* Evaluates the cis function for a double-precision complex floating-point number.
@@ -68,9 +67,7 @@ stdlib_complex128_t stdlib_base_ccis( const stdlib_complex128_t z ) {
6867

6968
stdlib_complex128_reim( z, &re, &im );
7069

71-
// TODO: replace with stdlib/math/base/special/sincos
72-
y = stdlib_base_sin( re );
73-
x = stdlib_base_cos( re );
70+
stdlib_base_sincos( re, &y, &x );
7471
if( im != 0.0 ) {
7572
e = stdlib_base_exp( -im );
7673
y *= e;

0 commit comments

Comments
 (0)