home::buildo....3::man::erfi(3)

πŸ’œ erfi(3) β€” the imaginary error function, bestie edition 🌸

okay so real talk, this is home::buildo....3::man::erfi(3) from the libcerf manual, and it's about to be your new fave little corner of the C math world. no cap, it's short but it slaps. ✨


πŸŽ€ NAME πŸŽ€

cerfi, erfi β€” the imaginary error function. that's it, that's the vibe. two sisters, one complex, one real, both iconic. πŸ‘‘


✨ SYNOPSIS ✨

first things first, you gotta pull in the header, like so:

#include <cerf.h>

then you've got your two baddies:

double _Complex cerfi ( double _Complex z );

double          erfi  ( double x );

so cerfi takes a double _Complex and hands you back a double _Complex. erfi takes a plain old double and gives you a double right back. simple. clean. we love a consistent signature. 🫢


πŸ’… DESCRIPTION πŸ’…

so cerfi is basically the error function but rotated in the complex plane β€” the way that it does this is literally this formula right here, memorize it:

erfi(z) = -i erf(iz)

that's the whole lore. it's erf, but spun around. iykyk. πŸŒ€

then erfi is the chill one β€” it takes a real argument and returns a real result. no imaginary drama. 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

not me telling you to go read more man pages, but honestly they're all connected and it's giving family reunion energy: 🧚

  • the implementation of cerfi and erfi is trivially based on cerf(3) and im_w_of_x(3). like, trivially trivially. they're standing on those shoulders, fr fr.
  • other complex error functions hanging out in libcerf: dawson(3), erfcx(3), voigt(3), w_of_z(3) β€” a whole squad. πŸ”₯
  • and the real error function? that ships with recent versions of glibc, as requested by the C99 standard: erf(3). yes, it's been standardized, we stan. ⭐
  • Homepage, for the curious: http://apps.jcns.fz-juelich.de/libcerf

πŸ‘‘ AUTHORS πŸ‘‘

give it up for the people who actually did the work:

  • Steven G. Johnson, http://math.mit.edu/~stevenj, Massachusetts Institute of Technology β€” he researched the numerics and implemented the Faddeeva function. huge. πŸ’–
  • Joachim Wuttke <j.wuttke@fz-juelich.de>, Forschungszentrum Juelich β€” reorganized the code into a library and wrote this man page. the reason you're reading this rn tbh. 🫑

Please report bugs to the authors. (bestie behavior: if something's broken, tell them, don't just suffer in silence 😭)


🌸 COPYING 🌸

legal bit, but make it cute:

  • Copyright (c) 2012 Massachusetts Institute of Technology
  • Copyright (c) 2013 Forschungszentrum Juelich GmbH
  • Software: MIT License.
  • This documentation: Creative Commons Attribution Share Alike.
πŸ’€ heads up: those licenses are real and they mean something β€” respect the MIT and CC-BY-SA terms, don't just vibe past them.

and that's the page!! mwah πŸ’‹ signed off from the hall of fame with perl v5.42.2, dated 2026-02-15, still serving under the home::buildo....3::man::erfi(3) banner. go forth and compute, bestie. πŸ“πŸ’œ

πŸ“¦ where this page comes from