Changeset 84929b0 in mainline for uspace/lib/math/generic/__signbit.c
- Timestamp:
- 2018-08-29T20:06:00Z (6 years ago)
- Children:
- ed9043f7
- Parents:
- 184ff675
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-29 19:44:33)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-29 20:06:00)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/generic/__signbit.c
r184ff675 r84929b0 1 1 /* 2 * Copyright (c) 201 4 Martin Decky2 * Copyright (c) 2018 CZ.NIC, z.s.p.o. 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libmath 30 * @{ 29 #include <math.h> 30 #include <stdarg.h> 31 32 /** 33 * Fallback symbol used when code including <math.h> is compiled with something 34 * other than GCC or Clang. The function itself must be built with GCC or Clang. 31 35 */ 32 /** @file 33 */ 36 int __signbit(size_t sz, ...) 37 { 38 va_list ap; 39 va_start(ap, sz); 34 40 35 #ifndef LIBMATH_TRIG_H_ 36 #define LIBMATH_TRIG_H_ 41 int result; 37 42 38 #include <mathtypes.h> 43 switch (sz) { 44 case 4: 45 result = signbit(va_arg(ap, double)); 46 break; 47 case 8: 48 result = signbit(va_arg(ap, double)); 49 break; 50 default: 51 result = signbit(va_arg(ap, long double)); 52 break; 53 } 39 54 40 extern float32_t float32_sin(float32_t); 41 extern float64_t float64_sin(float64_t); 42 extern float32_t float32_cos(float32_t); 43 extern float64_t float64_cos(float64_t); 55 va_end(ap); 56 return result; 57 } 44 58 45 #endif46 47 /** @}48 */
Note:
See TracChangeset
for help on using the changeset viewer.