当前位置: C语言 -- 标准库 -- <math.h> -- cbrtl

cbrtl函数


概要:
#include <math.h>
long double cbrtl(long double x);

描述:

该函数计算参数x的立方根。


参数:
long double x

参数为一个long double类型的浮点数。


返回值:

函数返回x1/3的值。


范例:
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
/*函数cbrtl范例*/

#include <math.h>
#include <stdio.h>

int main(void)
{
    long double x = 8.0L;
    long double y;

    y = cbrtl(x);
    printf("The cube root of %.6Lf is %.6Lf.\n", x, y);

    return 0;
}

输出:

The cube root of 8.000000 is 2.000000.


相关内容:
cbrt double类型的立方根函数。
cbrtf float类型的立方根函数。