Last change
on this file since 445 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
672 bytes
|
Rev | Line | |
---|
[444] | 1 | /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. |
---|
| 2 | * |
---|
| 3 | * Permission to use, copy, modify, and distribute this software |
---|
| 4 | * is freely granted, provided that this notice is preserved. |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | #include "fdlibm.h" |
---|
| 8 | |
---|
| 9 | #ifdef __STDC__ |
---|
| 10 | float fminf(float x, float y) |
---|
| 11 | #else |
---|
| 12 | float fminf(x,y) |
---|
| 13 | float x; |
---|
| 14 | float y; |
---|
| 15 | #endif |
---|
| 16 | { |
---|
| 17 | if (__fpclassifyf(x) == FP_NAN) |
---|
| 18 | return y; |
---|
| 19 | if (__fpclassifyf(y) == FP_NAN) |
---|
| 20 | return x; |
---|
| 21 | |
---|
| 22 | return x < y ? x : y; |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | #ifdef _DOUBLE_IS_32BITS |
---|
| 26 | |
---|
| 27 | #ifdef __STDC__ |
---|
| 28 | double fmin(double x, double y) |
---|
| 29 | #else |
---|
| 30 | double fmin(x,y) |
---|
| 31 | double x; |
---|
| 32 | double y; |
---|
| 33 | #endif |
---|
| 34 | { |
---|
| 35 | return (double) fminf((float) x, (float) y); |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | #endif /* defined(_DOUBLE_IS_32BITS) */ |
---|
Note: See
TracBrowser
for help on using the repository browser.