Skip to content

Commit e4197b7

Browse files
RealKCawesomekling
authored andcommitted
LibM: Define HUGE_VAL{F,L} in terms of compiler builtins
1 parent e9533da commit e4197b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Userland/Libraries/LibM/math.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ __BEGIN_DECLS
4242
#define MATH_ERREXCEPT 2
4343
#define math_errhandling MATH_ERREXCEPT
4444

45-
#define HUGE_VAL 1e10000
45+
#define HUGE_VALF __builtin_huge_valf()
46+
#define HUGE_VAL __builtin_huge_val()
47+
#define HUGE_VALL __builtin_huge_vall()
4648
#define INFINITY __builtin_huge_val()
4749
#define NAN __builtin_nan("")
4850
#define MAXFLOAT FLT_MAX

0 commit comments

Comments
 (0)