The choice of I instead of i for the imaginary unit concedes
to the widespread use of the identifier i for
other purposes. The application can use a different identifier, say
j, for the imaginary unit by following the inclusion of
the <complex.h> header with:
#undef I
#define j _Imaginary_I
An I suffix to designate imaginary constants is not required,
as multiplication by I provides a sufficiently
convenient and more generally useful notation for imaginary terms.
The corresponding real type for the imaginary unit is
float, so that use of I for algorithmic or notational
convenience will not result in widening types.
On systems with imaginary types, the application has the ability to
control whether use of the macro I introduces an imaginary
type, by explicitly defining I to be _Imaginary_I or _Complex_I. Disallowing
imaginary types is useful for some applications
intended to run on implementations without support for such types.
The macro _Imaginary_I provides a test for whether imaginary types
are supported.
The cis() function (cos(x) + I*sin(x))
was considered but rejected because its
implementation is easy and straightforward, even though some implementations
could compute sine and cosine more efficiently in
tandem.
The following function names and the same names suffixed with f
or l are reserved for future use, and may be added
to the declarations in the <complex.h> header.
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html .
IEEE/The Open Group
<complex.h> (P)
2003
Generated by OpenAsthra.com from man0p/complex.h.0p using man macros with tbl support.