We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da34ceb commit fcedf7cCopy full SHA for fcedf7c
src/ansi-c/library/float.c
@@ -83,3 +83,18 @@ inline int __builtin_flt_rounds(void)
83
__CPROVER_rounding_mode==3?0: // to zero
84
-1;
85
}
86
+
87
+/* FUNCTION: __flt_rounds */
88
89
+extern int __CPROVER_rounding_mode;
90
91
+inline int __flt_rounds(void)
92
+{
93
+ // Spotted on FreeBSD
94
+ // See __builtin_flt_rounds for the magic numbers.
95
+ return __CPROVER_rounding_mode==0?1: // to nearest
96
+ __CPROVER_rounding_mode==1?3: // downward
97
+ __CPROVER_rounding_mode==2?2: // upward
98
+ __CPROVER_rounding_mode==3?0: // to zero
99
+ -1;
100
+}
0 commit comments