Last change
on this file since 577 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
709 bytes
|
Line | |
---|
1 | /* Copyright (C) 2015 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 | /* finitel(x) returns 1 is x is finite, else 0; */ |
---|
8 | |
---|
9 | #include <math.h> |
---|
10 | |
---|
11 | int |
---|
12 | finitel (long double x) |
---|
13 | { |
---|
14 | #ifdef _LDBL_EQ_DBL |
---|
15 | return finite (x); |
---|
16 | #else |
---|
17 | /* Let the compiler do this for us. |
---|
18 | Note - we do not know how many bits there are in a long double. |
---|
19 | Some architectures for example have an 80-bit long double whereas |
---|
20 | others use 128-bits. We use macros and comiler builtin functions |
---|
21 | to avoid specific knowledge of the long double format. */ |
---|
22 | return __builtin_isfinite (x); |
---|
23 | #endif |
---|
24 | } |
---|
25 | |
---|
Note: See
TracBrowser
for help on using the repository browser.