blob: 8e8d867354cd7b45d87bf1883e141af0fc3e94f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#define _GNU_SOURCE
#define __USE_GNU
#define __STDC_WANT_DEC_FP__ 1
#include <fenv.h>
#include <math.h>
#include <float.h>
#include <stdio.h>
int main() {
_Decimal64 d164;
_Decimal64 d264;
_Decimal64 res;
int exc;
exc = feenableexcept(FE_DIVBYZERO);
d164 = 35.0DD;
d264 = 0.0DD;
res = d164/d264;
printf ("res: %Df\n", res);
return 0;
}
|