Commit | Line | Data |
---|---|---|
ceb0890f | 1 | /* |
9fee1f06 RE |
2 | * Copyright (c) 1980 Regents of the University of California. |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | * | |
af857331 | 6 | * @(#)d_cnjg.c 5.2 %G% |
ceb0890f DW |
7 | */ |
8 | ||
9 | #include "complex" | |
af857331 KM |
10 | #ifdef tahoe |
11 | #include <tahoemath/FP.h> | |
12 | #endif tahoe | |
ceb0890f DW |
13 | |
14 | d_cnjg(r, z) | |
15 | dcomplex *r, *z; | |
16 | { | |
17 | r->dreal = z->dreal; | |
af857331 | 18 | #ifndef tahoe |
ceb0890f | 19 | r->dimag = - z->dimag; |
af857331 KM |
20 | #else tahoe |
21 | r->dimag = z->dimag; | |
22 | if (z->dimag == 0.0) | |
23 | return; | |
24 | else | |
25 | *(unsigned long *)&(z->dimag) ^= SIGN_BIT; | |
26 | #endif tahoe | |
ceb0890f | 27 | } |