@@ -2186,60 +2186,6 @@ long double __sort_of_CPROVER_round_to_integrall (int rounding_mode, long double
2186
2186
return (x - * iptr );
2187
2187
}
2188
2188
2189
-
2190
-
2191
- /* FUNCTION: __sort_of_CPROVER_remainder */
2192
- // TODO : Should be a real __CPROVER function to convert to SMT-LIB
2193
- double __sort_of_CPROVER_round_to_integral (int rounding_mode , double d );
2194
-
2195
- double __sort_of_CPROVER_remainder (int rounding_mode , double x , double y )
2196
- {
2197
- if (x == 0.0 || __CPROVER_isinfd (y ))
2198
- return x ;
2199
-
2200
- // Extended precision helps... a bit...
2201
- long double div = x /y ;
2202
- long double n = __sort_of_CPROVER_round_to_integral (rounding_mode ,div );
2203
- long double res = (- y * n ) + x ; // TODO : FMA would be an improvement
2204
- return res ;
2205
- }
2206
-
2207
- /* FUNCTION: __sort_of_CPROVER_remainderf */
2208
- // TODO : Should be a real __CPROVER function to convert to SMT-LIB
2209
-
2210
- float __sort_of_CPROVER_round_to_integralf (int rounding_mode , float d );
2211
-
2212
- float __sort_of_CPROVER_remainderf (int rounding_mode , float x , float y )
2213
- {
2214
- if (x == 0.0f || __CPROVER_isinff (y ))
2215
- return x ;
2216
-
2217
- // Extended precision helps... a bit...
2218
- long double div = x /y ;
2219
- long double n = __sort_of_CPROVER_round_to_integral (rounding_mode ,div );
2220
- long double res = (- y * n ) + x ; // TODO : FMA would be an improvement
2221
- return res ;
2222
- }
2223
-
2224
- /* FUNCTION: __sort_of_CPROVER_remainderl */
2225
- // TODO : Should be a real __CPROVER function to convert to SMT-LIB
2226
-
2227
- long double __sort_of_CPROVER_round_to_integrall (int rounding_mode , long double d );
2228
-
2229
- long double __sort_of_CPROVER_remainderl (int rounding_mode , long double x , long double y )
2230
- {
2231
- if (x == 0.0 || __CPROVER_isinfld (y ))
2232
- return x ;
2233
-
2234
- // Extended precision helps... a bit...
2235
- long double div = x /y ;
2236
- long double n = __sort_of_CPROVER_round_to_integral (rounding_mode ,div );
2237
- long double res = (- y * n ) + x ; // TODO : FMA would be an improvement
2238
- return res ;
2239
- }
2240
-
2241
-
2242
-
2243
2189
/* ISO 9899:2011
2244
2190
*
2245
2191
* The fmod functions return the value x - ny, for some
@@ -2320,15 +2266,10 @@ long double fmodl(long double x, long double y)
2320
2266
#define __CPROVER_MATH_H_INCLUDED
2321
2267
#endif
2322
2268
2323
- #ifndef __CPROVER_FENV_H_INCLUDED
2324
- #include <fenv.h>
2325
- #define __CPROVER_FENV_H_INCLUDED
2326
- #endif
2327
-
2328
- double __sort_of_CPROVER_remainder (int rounding_mode , double x , double y );
2329
-
2330
- double remainder (double x , double y ) { return __sort_of_CPROVER_remainder (FE_TONEAREST , x , y ); }
2331
-
2269
+ double remainder (double x , double y )
2270
+ {
2271
+ return __CPROVER_remainder (x , y );
2272
+ }
2332
2273
2333
2274
/* FUNCTION: remainderf */
2334
2275
@@ -2337,15 +2278,10 @@ double remainder(double x, double y) { return __sort_of_CPROVER_remainder(FE_TON
2337
2278
#define __CPROVER_MATH_H_INCLUDED
2338
2279
#endif
2339
2280
2340
- #ifndef __CPROVER_FENV_H_INCLUDED
2341
- #include <fenv.h>
2342
- #define __CPROVER_FENV_H_INCLUDED
2343
- #endif
2344
-
2345
- float __sort_of_CPROVER_remainderf (int rounding_mode , float x , float y );
2346
-
2347
- float remainderf (float x , float y ) { return __sort_of_CPROVER_remainderf (FE_TONEAREST , x , y ); }
2348
-
2281
+ float remainderf (float x , float y )
2282
+ {
2283
+ return __CPROVER_remainderf (x , y );
2284
+ }
2349
2285
2350
2286
/* FUNCTION: remainderl */
2351
2287
@@ -2354,17 +2290,10 @@ float remainderf(float x, float y) { return __sort_of_CPROVER_remainderf(FE_TONE
2354
2290
#define __CPROVER_MATH_H_INCLUDED
2355
2291
#endif
2356
2292
2357
- #ifndef __CPROVER_FENV_H_INCLUDED
2358
- #include <fenv.h>
2359
- #define __CPROVER_FENV_H_INCLUDED
2360
- #endif
2361
-
2362
- long double __sort_of_CPROVER_remainderl (int rounding_mode , long double x , long double y );
2363
-
2364
- long double remainderl (long double x , long double y ) { return __sort_of_CPROVER_remainderl (FE_TONEAREST , x , y ); }
2365
-
2366
-
2367
-
2293
+ long double remainderl (long double x , long double y )
2294
+ {
2295
+ return __CPROVER_remainderl (x , y );
2296
+ }
2368
2297
2369
2298
/* ISO 9899:2011
2370
2299
* The copysign functions produce a value with the magnitude of x and
0 commit comments