9d8b5fa74e
Most complex function implementations are from the "c9x-complex" library, originating from the "cephes" math library, see http://www.netlib.org/cephes/, from Stephen L. Moshier, incorporated and redistributed with the NetBSD license by permission of the author. Error behaviour and other boundary conditions (branch cuts) need to be looked at. For namespace sanity, I've done the rename/weak alias procedure to most of the exported functions which are also used internally. Didn't do so for sin/cos(f) yet because assembler implementations use them directly, and renaming functions shared between the main libm and the machine specific "overlay" might raise binary compatibility issues.
16 lines
224 B
C
16 lines
224 B
C
/* $NetBSD: creal.c,v 1.1 2007/08/20 16:01:36 drochner Exp $ */
|
|
|
|
/*
|
|
* Written by Matthias Drochner <drochner@NetBSD.org>.
|
|
* Public domain.
|
|
*/
|
|
|
|
#include <complex.h>
|
|
|
|
double
|
|
creal(double complex z)
|
|
{
|
|
|
|
return __real__ z;
|
|
}
|