xref: /csrg-svn/usr.bin/f77/libF77/d_cnjg.c (revision 47940)
1*47940Sbostic /*-
2*47940Sbostic  * Copyright (c) 1980 The Regents of the University of California.
3*47940Sbostic  * All rights reserved.
422847Skre  *
5*47940Sbostic  * %sccs.include.proprietary.c%
610454Sdlw  */
710454Sdlw 
8*47940Sbostic #ifndef lint
9*47940Sbostic static char sccsid[] = "@(#)d_cnjg.c	5.4 (Berkeley) 04/12/91";
10*47940Sbostic #endif /* not lint */
11*47940Sbostic 
1210454Sdlw #include "complex"
1329962Smckusick #ifdef tahoe
1445967Sbostic #include <tahoe/math/FP.h>
1545967Sbostic #endif
1610454Sdlw 
d_cnjg(r,z)1710454Sdlw d_cnjg(r, z)
1810454Sdlw dcomplex *r, *z;
1910454Sdlw {
2010454Sdlw r->dreal = z->dreal;
2129962Smckusick #ifndef tahoe
2210454Sdlw r->dimag = - z->dimag;
2329962Smckusick #else tahoe
2429962Smckusick r->dimag = z->dimag;
2529962Smckusick if (z->dimag == 0.0)
2629962Smckusick 	return;
2729962Smckusick else
2829962Smckusick 	*(unsigned long *)&(z->dimag) ^= SIGN_BIT;
2929962Smckusick #endif tahoe
3010454Sdlw }
31