CREAL(3P)

πŸ’– CREAL(3P) β€” the complex real functions πŸ’–

okay so bestie, we're in the POSIX Programmer's Manual rn, and this little cutie is called creal, crealf, and creall. yes she has three forms, she's versatile like that πŸ’…


✨ PROLOG ✨

so like, full transparency: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so pls go consult the corresponding Linux manual page for the deets on Linux behavior, no cap), or honestly the interface might not even be implemented on Linux at all. it's giving "check first, bestie" πŸ™ˆ


🌸 NAME 🌸

creal, crealf, creall β€” complex real functions ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <complex.h>

double creal(double complex z);
float crealf(float complex z);
long double creall(long double complex z);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the functionality described on this reference page is aligned with the ISO C standard. if there's any conflict between the requirements described here and the ISO C standard, that's unintentional β€” no drama intended. this volume of POSIX.1‐2017 defers to the ISO C standard, periodt.

and what do these functions actually do?? they shall compute the real part of z. that's it. that's the whole job. main character behavior honestly πŸ‘‘


πŸ’œ RETURN VALUE πŸ’œ

these functions shall return the real part value. like, they hand you the real part. that's the vibe. ✨


🌈 ERRORS 🌈

No errors are defined. not a single one. flawless. πŸ’…

the following sections are informative btw, just so you know 🫢


πŸ“ EXAMPLES πŸ“

None. 😭 iconic of them honestly. no examples, we're just built different.


🧚 APPLICATION USAGE 🧚

okay so for a variable z of type complex, the whole situation is:

z == creal(z) + cimag(z)*I

that's the relationship, bestie. real part plus imaginary part times I gets you right back to z. math girlies stay winning 🌸


⭐ RATIONALE ⭐

None. nothing to explain, it just is πŸ’€


πŸ”₯ FUTURE DIRECTIONS πŸ”₯

None. she's staying exactly as she is. we love consistency πŸ‘‘


πŸ’« SEE ALSO πŸ’«

  • carg()
  • cimag()
  • conj()
  • cproj()
  • The Base Definitions volume of POSIX.1‐2017, <complex.h>

go read those too, they're the friend group 🫢


okay legal moment, pls don't skip this part bestie:

Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 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 .

Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


and that's a wrap!! this was brought to you by IEEE/The Open Group, 2017, page CREAL(3P) 🌈✨ tysm for reading, ily, go compute some real parts πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from