언제나휴일 2016. 5. 10. 17:18
반응형

cbrt, cbrtf, cbrtl


헤더 파일

[언어 자료구조 알고리즘/C11 표준 라이브러리 함수] - math.h



double cbrt(double x); 삼제곱근

float cbrtf(float x); 삼제곱근

long double cbrtl(long double x); 삼제곱근

 

입력 매개 변수 리스트

x 실수

반환 값

x의 삼제곱근

 

사용 예

//C언어 표준 라이브러리 함수 가이드

//double cbrt(double x); 삼제곱근

//float cbrtf(float x); 삼제곱근

//long double cbrtl(long double x); 삼제곱근

 

#include <math.h>

#include <stdio.h>

int main(void)

{

    printf("%f\n", cbrt(1.0));

    printf("%f\n", cbrt(8.0));

    printf("%f\n", cbrt(27.0));

 

    return 0;

}

 

출력

1.000000

2.000000

3.000000



사용한 함수

[언어 자료구조 알고리즘/C11 표준 라이브러리 함수] - printf

반응형