MCPcopy Create free account
hub / github.com/pydata/numexpr / nc_cos

Function nc_cos

numexpr3/complex_functions.hpp:1290–1306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1288}
1289
1290static void
1291nc_cos( npy_intp n, npy_complex64 *x, npy_intp sb1, npy_complex64 *r)
1292{
1293 if( sb1 == sizeof(npy_complex64) ) { // Aligned
1294 for( npy_intp I = 0; I < n; I++ ) {
1295 r[I].real = cosf(x[I].real)*coshf(x[I].imag);
1296 r[I].imag = -sinf(x[I].real)*sinhf(x[I].imag);
1297 }
1298 }
1299 else {
1300 sb1 /= sizeof(npy_complex64);
1301 for( npy_intp I = 0; I < n; I++ ) {
1302 r[I].real = cosf(x[I*sb1].real)*coshf(x[I*sb1].imag);
1303 r[I].imag = -sinf(x[I*sb1].real)*sinhf(x[I*sb1].imag);
1304 }
1305 }
1306}
1307
1308static void
1309nc_cos( npy_intp n, npy_complex128 *x, npy_intp sb1, npy_complex128 *r)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…