xref: /csrg-svn/usr.bin/f77/libF77/d_cnjg.c (revision 29962)
110454Sdlw /*
222847Skre  * Copyright (c) 1980 Regents of the University of California.
322847Skre  * All rights reserved.  The Berkeley software License Agreement
422847Skre  * specifies the terms and conditions for redistribution.
522847Skre  *
6*29962Smckusick  *	@(#)d_cnjg.c	5.2	11/03/86
710454Sdlw  */
810454Sdlw 
910454Sdlw #include "complex"
10*29962Smckusick #ifdef tahoe
11*29962Smckusick #include <tahoemath/FP.h>
12*29962Smckusick #endif tahoe
1310454Sdlw 
1410454Sdlw d_cnjg(r, z)
1510454Sdlw dcomplex *r, *z;
1610454Sdlw {
1710454Sdlw r->dreal = z->dreal;
18*29962Smckusick #ifndef tahoe
1910454Sdlw r->dimag = - z->dimag;
20*29962Smckusick #else tahoe
21*29962Smckusick r->dimag = z->dimag;
22*29962Smckusick if (z->dimag == 0.0)
23*29962Smckusick 	return;
24*29962Smckusick else
25*29962Smckusick 	*(unsigned long *)&(z->dimag) ^= SIGN_BIT;
26*29962Smckusick #endif tahoe
2710454Sdlw }
28