SQRT(3)

๐Ÿ“ฆ version 14.5, in freebsd 14.5

๐Ÿ’– 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() โ€” return 1 divided by the square root of x unless an error occurs. an attempt to take the rsqrt() of negative x raises an invalid exception and causes an NaN to be returned. the inverse square root of ยฑ0 returns ยฑโˆž and raises a divide-by-zero exception. ๐Ÿ’€โš ๏ธ
  • sqrt(), sqrtf(), sqrtl() โ€” return the requested square root unless an error occurs. an attempt to take the sqrt() of negative x raises an invalid exception and causes an NaN to be returned (except that the square root of -0 is 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
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms