| 1 | /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ |
| 2 | /* |
| 3 | * math definitions for NOLIBC |
| 4 | * Copyright (C) 2025 Thomas Weißschuh <[email protected]> |
| 5 | */ |
| 6 | |
| 7 | /* make sure to include all global symbols */ |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | static __inline__ |
| 14 | double |
| 15 | |
| 16 | return x >= 0 ? x : -x; |
| 17 | |
| 18 | |
| 19 | static __inline__ |
| 20 | float |
| 21 | |
| 22 | return x >= 0 ? x : -x; |
| 23 | |
| 24 | |
| 25 | static __inline__ |
| 26 | long double |
| 27 | |
| 28 | return x >= 0 ? x : -x; |
| 29 | |
| 30 | |
| 31 | /* _NOLIBC_SYS_MATH_H */ |