cbrt(3)

✨ cbrt(3) β€” the cube root girlies ✨

okay so bestie, welcome to cbrt(3), the manual page for the cube root function and its two glow-up siblings. this is the one you want when you need to undo a cube. no cap. 🧊


🌸 NAME 🌸

cbrt, cbrtf, cbrtl β€” cube root function πŸ’…

πŸ“š LIBRARY πŸ“š

Math library (libm, link it with -lm) 🫢

✨ SYNOPSIS ✨

#include <math.h>

double cbrt(double x);
float cbrtf(float x);
long double cbrtl(long double x);

πŸŽ€ Feature Test Macro Requirements for glibc πŸŽ€

(peep feature_test_macros(7) if you wanna know what these even are, iykyk)

cbrt():

_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
    || _XOPEN_SOURCE >= 500
    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
    || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

cbrtf(), cbrtl():

_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
    || /* Since glibc 2.19: */ _DEFAULT_SOURCE
    || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

πŸ’– DESCRIPTION πŸ’–

These functions return the (real) cube root of x. that's it, that's the whole job. 🫧

and here's the thing that makes her so iconic: this function cannot fail. literally cannot. every representable real value has a real cube root, and rounding it to a representable value never causes overflow nor underflow. no edge case drama, no surprise L's, just vibes. πŸ‘‘


🌈 RETURN VALUE 🌈

These functions return the cube root of x. simple as.

and if x is +0, -0, positive infinity, negative infinity, or NaN? then x is returned. she's giving "i'm not doing extra work for this" and honestly? valid. πŸ’€


πŸ¦‹ ERRORS πŸ¦‹

No errors occur. like, at all. zero. none. not even one. the error handling section is a ghost town and we love that for her. 🌡✨


πŸ‘‘ ATTRIBUTES πŸ‘‘

for an explanation of the terms used in this section, go check attributes(7). the girlies over there explain the lore.

  • Interface: cbrt(), cbrtf(), cbrtl() β€” Attribute: Thread safety β€” Value: MT-Safe πŸ”₯

so yes bestie, she's MT-Safe. thread away. 🧡


⭐ STANDARDS ⭐

C11, POSIX.1-2008. certified and valid, periodt. πŸ’…


🌸 HISTORY 🌸

GNU, C99, POSIX.1-2001. she's been around, she's got lore. πŸŽ€


πŸ”— SEE ALSO πŸ”—


that's the whole page bestie, go cube root something. ily 🫢

this has been Linux man-pages 6.20, dated 2026-02-08, coming at you with cbrt(3) energy. stay iconic. πŸ’–βœ¨

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms