should we really be using floating point math for ceil/floor integer division?

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
14 years ago
9 months ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [patch])

Attachments

(1 attachment)

The patch for bug 317375 introduced use of floating point math to do integer division that rounds up or down rather than towards zero.  I'm not sure this is the best idea -- it's probably slower, and I'm not convinced that it won't introduce round-tripping error at some point.

Patch to undo this attached; interested in opinions.
Whiteboard: [patch]
Attachment #210833 - Flags: superreview?(roc)
Attachment #210833 - Flags: superreview+
Attachment #210833 - Flags: review?(roc)
Attachment #210833 - Flags: review+
+  // ANSI C, ISO 9899:1999 section 6.5.5

this is a C++ file though, wouldn't it be better to quote ISO 14882 instead?
So, actually, ISO/IEC 14882:1998 only defines it for both operators being nonnegative, but has a footnote saying that C99 is likely to change to defining it in the manner of ISO Fortran (ISO/IEC 1539:1991), which it did.  I don't have a copy of 14882:2003.
Fix checked in, 22:05 -0800.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Component: Layout: View Rendering → Layout: Web Painting
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.