SQRT(3)
๐ SQRT(3) โ cube root, square root, and inverse square root functions ๐
okay bestie, welcome to the SQRT(3) page from the Library Functions Manual โ the math girlies are literally right here and they are serving roots. ๐งฎโจ
๐ธ NAME ๐ธ
Bestie, meet the lineup: cbrt, cbrtf, cbrtl, rsqrt, rsqrtf, rsqrtl, sqrt, sqrtf, sqrtl โ these are your cube root, square root, and inverse square root functions. periodt. ๐
๐ง LIBRARY ๐ง
Math Library (libm, -lm) โ that's the address, and yes you link it with -lm. ๐ซถ
โจ SYNOPSIS โจ
#include <math.h>
double
cbrt(double x);
float
cbrtf(float x);
long double
cbrtl(long double x);
double
rsqrt(double x);
float
rsqrtf(float x);
long double
rsqrtl(long double x);
double
sqrt(double x);
float
sqrtf(float x);
long double
sqrtl(long double x);
๐ฆ DESCRIPTION ๐ฆ
Listen, it's giving โthree little families, three big jobsโ:
cbrt(),cbrtf(),cbrtl()โ compute the cube root of x. ๐งrsqrt(),rsqrtf(),rsqrtl()โ compute the inverse square root of x. ๐sqrt(),sqrtf(),sqrtl()โ compute the non-negative square root of x. ๐ฑ
๐ฅ RETURN VALUES ๐ฅ
cbrt(),cbrtf(),cbrtl()โ return the requested cube root. no drama. ๐rsqrt(),rsqrtf(),rsqrtl()โ return1divided by the square root of x unless an error occurs. an attempt to take thersqrt()of negative x raises an invalid exception and causes anNaNto be returned. the inverse square root ofยฑ0returnsยฑโand raises a divide-by-zero exception. ๐โ ๏ธsqrt(),sqrtf(),sqrtl()โ return the requested square root unless an error occurs. an attempt to take thesqrt()of negative x raises an invalid exception and causes anNaNto be returned (except that the square root of-0is valid and equal to-0.) ๐
๐ SEE ALSO ๐
fenv(3), math(3) โ go say hi. ๐
๐ STANDARDS ๐
cbrt(), cbrtf(), cbrtl(), sqrt(), sqrtf(), and sqrtl() conform to ISO/IEC 9899:1999 (โISO C99โ). the rsqrt(), rsqrtf(), and rsqrtl() functions conform to ISO/IEC 9899:2024 ("ISO C23"). โจ slay and standardize โจ ๐
๐ฐ๏ธ HISTORY ๐ฐ๏ธ
the tea: cbrt() appeared in 4.3BSD. sqrt() appeared in Version 2 AT&T UNIX. sqrtl() appeared in FreeBSD 8.0. cbrtl() appeared in FreeBSD 9.0. rsqrt(), rsqrtf(), and rsqrtl() appeared in FreeBSD 16.0. ancient roots, fresh fits. ๐๐ซถ
mwah ๐ โ source/version: Debian, date: May 7, 2026, page: SQRT(3). now go be iconic with your roots ๐โจ
๐ฆ where this page comes from
- freebsd 14.5: base 14.5
- Copyright (c) 1985, 1991 Regents of the University of California
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms