| 1475 | } |
| 1476 | |
| 1477 | static void |
| 1478 | nc_tan( npy_intp n, npy_complex64 *x, npy_intp sb1, npy_complex64 *r) |
| 1479 | { |
| 1480 | npy_float32 sr,cr,shi,chi; |
| 1481 | npy_float32 rs,is,rc,ic; |
| 1482 | npy_float32 d; |
| 1483 | if( sb1 == sizeof(npy_complex64) ) { // Aligned |
| 1484 | for( npy_intp I = 0; I < n; I++ ) { |
| 1485 | sr = sinf(x[I].real); |
| 1486 | cr = cosf(x[I].real); |
| 1487 | shi = sinhf(x[I].imag); |
| 1488 | chi = coshf(x[I].imag); |
| 1489 | rs = sr*chi; |
| 1490 | is = cr*shi; |
| 1491 | rc = cr*chi; |
| 1492 | ic = -sr*shi; |
| 1493 | d = rc*rc + ic*ic; |
| 1494 | r[I].real = (rs*rc+is*ic)/d; |
| 1495 | r[I].imag = (is*rc-rs*ic)/d; |
| 1496 | } |
| 1497 | } |
| 1498 | else { |
| 1499 | sb1 /= sizeof(npy_complex64); |
| 1500 | for( npy_intp I = 0; I < n; I++ ) { |
| 1501 | sr = sinf(x[I*sb1].real); |
| 1502 | cr = cosf(x[I*sb1].real); |
| 1503 | shi = sinhf(x[I*sb1].imag); |
| 1504 | chi = coshf(x[I*sb1].imag); |
| 1505 | rs = sr*chi; |
| 1506 | is = cr*shi; |
| 1507 | rc = cr*chi; |
| 1508 | ic = -sr*shi; |
| 1509 | d = rc*rc + ic*ic; |
| 1510 | r[I].real = (rs*rc+is*ic)/d; |
| 1511 | r[I].imag = (is*rc-rs*ic)/d; |
| 1512 | } |
| 1513 | } |
| 1514 | } |
| 1515 | |
| 1516 | static void |
| 1517 | nc_tan( npy_intp n, npy_complex128 *x, npy_intp sb1, npy_complex128 *r) |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…