2 A division optimization evaluated operands to double precision only, thus losing information on long long variables.
9 unsigned long long f(void)
11 unsigned long long left
= (ULLONG_MAX
- 2);
12 return(left
/ (ULLONG_MAX
- 3));
15 unsigned long long g(void)
17 unsigned long long left
= (ULLONG_MAX
- 2);
18 return(left
% (ULLONG_MAX
- 3));
21 unsigned long long fs(void)
23 unsigned long long left
= (LLONG_MAX
- 2);
24 return(left
/ (LLONG_MAX
- 3));
27 unsigned long long gs(void)
29 unsigned long long left
= (LLONG_MAX
- 2);
30 return(left
% (LLONG_MAX
- 3));
35 ASSERT (f() == (ULLONG_MAX
- 2) / (ULLONG_MAX
- 3));
36 ASSERT (g() == (ULLONG_MAX
- 2) % (ULLONG_MAX
- 3));
37 ASSERT (fs() == (LLONG_MAX
- 2) / (LLONG_MAX
- 3));
38 ASSERT (gs() == (LLONG_MAX
- 2) % (LLONG_MAX
- 3));