From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/c/numeric%2Fmath%2Fcbrt.html | 71 ------------------------------------ 1 file changed, 71 deletions(-) delete mode 100644 devdocs/c/numeric%2Fmath%2Fcbrt.html (limited to 'devdocs/c/numeric%2Fmath%2Fcbrt.html') diff --git a/devdocs/c/numeric%2Fmath%2Fcbrt.html b/devdocs/c/numeric%2Fmath%2Fcbrt.html deleted file mode 100644 index bb548272..00000000 --- a/devdocs/c/numeric%2Fmath%2Fcbrt.html +++ /dev/null @@ -1,71 +0,0 @@ -

cbrt, cbrtf, cbrtl

Defined in header <math.h>
float       cbrtf( float arg );
-
(1) (since C99)
double      cbrt( double arg );
-
(2) (since C99)
long double cbrtl( long double arg );
-
(3) (since C99)
Defined in header <tgmath.h>
#define cbrt( arg )
-
(4) (since C99)
-1-3) Computes the cube root of arg.
-4) Type-generic macro: If arg has type long double, cbrtl is called. Otherwise, if arg has integer type or the type double, cbrt is called. Otherwise, cbrtf is called.

Parameters

- -
arg - floating point value

Return value

If no errors occur, the cube root of arg (\(\small{\sqrt[3]{arg} }\)3arg), is returned.

-

If a range error occurs due to underflow, the correct result (after rounding) is returned.

-

Error handling

Errors are reported as specified in math_errhandling.

-

If the implementation supports IEEE floating-point arithmetic (IEC 60559),

-

Notes

cbrt(arg) is not equivalent to pow(arg, 1.0/3) because the rational number \(\small{\frac1{3} }\)1/3 is typically not equal to 1.0/3 and std::pow cannot raise a negative base to a fractional exponent. Moreover, cbrt(arg) usually gives more accurate results than pow(arg, 1.0/3) (see example).

Example

#include <stdio.h>
-#include <float.h>
-#include <math.h>
- 
-int main(void)
-{
-    printf("Normal use:\n"
-           "cbrt(729)      = %f\n", cbrt(729));
-    printf("cbrt(-0.125)   = %f\n", cbrt(-0.125));
-    printf("Special values:\n"
-           "cbrt(-0)       = %f\n", cbrt(-0.0));
-    printf("cbrt(+inf)     = %f\n", cbrt(INFINITY));
-    printf("Accuracy:\n"
-           "cbrt(343)      = %.*f\n", DBL_DECIMAL_DIG, cbrt(343));
-    printf("pow(343,1.0/3) = %.*f\n", DBL_DECIMAL_DIG, pow(343, 1.0/3));
-}

Possible output:

-
Normal use:
-cbrt(729)      = 9.000000
-cbrt(-0.125)   = -0.500000
-Special values:
-cbrt(-0)       = -0.000000
-cbrt(+inf)     = inf
-Accuracy:
-cbrt(343)      = 7.00000000000000000
-pow(343,1.0/3) = 6.99999999999999911

References

See also

- - - -
-
(C99)(C99)
computes a number raised to the given power (\(\small{x^y}\)xy)
(function)
-
(C99)(C99)
computes square root (\(\small{\sqrt{x} }\)x)
(function)
-
(C99)(C99)(C99)
computes square root of the sum of the squares of two given numbers (\(\scriptsize{\sqrt{x^2+y^2} }\)x2+y2)
(function)
C++ documentation for cbrt
-

- © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
- https://en.cppreference.com/w/c/numeric/math/cbrt -

-
-- cgit v1.2.3