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

fmaxl函数


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

描述:

该函数确定其参数的较大值。

非数值(NaN)参数视为是缺失数据:如果一个参数是非数值(NaN),另一个参数是数值,函数将返回数值。


参数:
long double x

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

long double y

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


返回值:

函数返回其参数的较大值。


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

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

int main(void)
{
    printf("fmaxl(8.0L, 2.0L) = %.2Lf\n", fmaxl(8.0L, 2.0L));
    printf("fmaxl(-8.0L, -2.0L) = %.2Lf\n", fmaxl(-8.0L, -2.0L));

    return 0;
}

输出:

fmaxl(8.0L, 2.0L) = 8.00

fmaxl(-8.0L, -2.0L) = -2.00


相关内容:
fmax double类型的确定较大值函数。
fmaxf float类型的确定较大值函数。