Similar to 'powl(3)' but without requiring 'libm'. */
| 330 | |
| 331 | /* Similar to 'powl(3)' but without requiring 'libm'. */ |
| 332 | static long double |
| 333 | powerld (long double base, int x) |
| 334 | { |
| 335 | long double result = base; |
| 336 | if (x == 0) |
| 337 | return 1; /* note for test coverage: this is never |
| 338 | reached, as 'powerld' won't be called if |
| 339 | there's no suffix, hence, no "power". */ |
| 340 | |
| 341 | /* TODO: check for overflow, inf? */ |
| 342 | while (--x) |
| 343 | result *= base; |
| 344 | return result; |
| 345 | } |
| 346 | |
| 347 | /* Similar to 'fabs(3)' but without requiring 'libm'. */ |
| 348 | static inline long double |
no outgoing calls
no test coverage detected