xref: /csrg-svn/usr.bin/f77/libF77/d_cnjg.c (revision 45967)
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*45967Sbostic  *	@(#)d_cnjg.c	5.3	01/15/91
710454Sdlw  */
810454Sdlw 
910454Sdlw #include "complex"
1029962Smckusick #ifdef tahoe
11*45967Sbostic #include <tahoe/math/FP.h>
12*45967Sbostic #endif
1310454Sdlw 
1410454Sdlw d_cnjg(r, z)
1510454Sdlw dcomplex *r, *z;
1610454Sdlw {
1710454Sdlw r->dreal = z->dreal;
1829962Smckusick #ifndef tahoe
1910454Sdlw r->dimag = - z->dimag;
2029962Smckusick #else tahoe
2129962Smckusick r->dimag = z->dimag;
2229962Smckusick if (z->dimag == 0.0)
2329962Smckusick 	return;
2429962Smckusick else
2529962Smckusick 	*(unsigned long *)&(z->dimag) ^= SIGN_BIT;
2629962Smckusick #endif tahoe
2710454Sdlw }
28