Sourceware Bugzilla – Attachment 7133 Details for
Bug 15799
glibc div() code is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
More examples (3 types of division, plus exact quotient and zero)
file_15799.txt (text/plain), 1021 bytes, created by
Guilliam Xavier
on 2013-08-01 07:43:32 UTC
(
hide
)
Description:
More examples (3 types of division, plus exact quotient and zero)
Filename:
MIME Type:
Creator:
Guilliam Xavier
Created:
2013-08-01 07:43:32 UTC
Size:
1021 bytes
patch
obsolete
>Common types of integer division: > > T: Truncated (the quotient is truncated toward 0) > F: Floored (the quotient is floored toward -infinity) > E: Euclidean (the remainder is always positive) > >C89 requires Truncated semantics for div(), but not for / and %. >C99 and newer require Truncated semantics for / and % (and for div() too). > > T F E > > 33 / 5 6 6 6 > 33 % 5 3 3 3 > >-33 / 5 -6 -7 -7 >-33 % 5 -3 2 2 > > 33 / -5 -6 -7 -6 > 33 % -5 3 -2 3 > >-33 / -5 6 6 7 >-33 % -5 -3 -3 2 > > T F E > > 30 / 5 6 6 6 > 30 % 5 0 0 0 > >-30 / 5 -6 -6 -6 >-30 % 5 0 0 0 > > 30 / -5 -6 -6 -6 > 30 % -5 0 0 0 > >-30 / -5 6 6 6 >-30 % -5 0 0 0 > > T F E > > 0 / 5 0 0 0 > 0 % 5 0 0 0 > > 0 / -5 0 0 0 > 0 % -5 0 0 0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 15799
:
7126
| 7133