msvcr120: Add fmax implementation.

This commit is contained in:
Piotr Caban 2015-05-26 14:54:40 +02:00 committed by Alexandre Julliard
parent 852f6a5bcc
commit ec2f02db0c
3 changed files with 34 additions and 6 deletions

View File

@ -2164,9 +2164,9 @@
@ stub fma
@ stub fmaf
@ stub fmal
@ stub fmax
@ stub fmaxf
@ stub fmaxl
@ cdecl fmax(double double) MSVCR120_fmax
@ cdecl fmaxf(float float) MSVCR120_fmaxf
@ cdecl fmaxl(double double) MSVCR120_fmax
@ stub fmin
@ stub fminf
@ stub fminl

View File

@ -1833,9 +1833,9 @@
@ stub fma
@ stub fmaf
@ stub fmal
@ stub fmax
@ stub fmaxf
@ stub fmaxl
@ cdecl fmax(double double) msvcr120.fmax
@ cdecl fmaxf(float float) msvcr120.fmaxf
@ cdecl fmaxl(double double) msvcr120.fmaxl
@ stub fmin
@ stub fminf
@ stub fminl

View File

@ -2605,3 +2605,31 @@ short CDECL MSVCR120__ldtest(LDOUBLE *x)
{
return MSVCR120__dclass(*x);
}
/*********************************************************************
* fmaxf (MSVCR120.@)
*/
float CDECL MSVCR120_fmaxf(float x, float y)
{
if(isnanf(x))
return y;
if(isnanf(y))
return x;
if(x==0 && y==0)
return signbit(x) ? y : x;
return x<y ? y : x;
}
/*********************************************************************
* fmax (MSVCR120.@)
*/
double CDECL MSVCR120_fmax(double x, double y)
{
if(isnan(x))
return y;
if(isnan(y))
return x;
if(x==0 && y==0)
return signbit(x) ? y : x;
return x<y ? y : x;
}