Overview
| Artifact ID: | d9d2e1089801e3807abf3270f4e0818f55126711 |
|---|---|
| Ticket: | 1340260fffffffffffffffffffffffffffffffff
Simplify round() implementation in expr cmd |
| User & Date: | dgp on 2005-11-02 02:10:15 |
Changes
- icomment:
Logged In: YES user_id=80530 expr {double(.)} converts to a double-precision floating point value, and suffers the loss of precision compared with a 64-bit integer that implies. In these examples, the nearest double value to 0x7fffffffffffffff is 1.0 * 2**63, or 9223372036854775808.0 Convert that back to integer using entier(.) to get 9223372036854775808 Convert to integer and truncate to wide integer range using wide(.), and get the results you report. Pehaps "odd" at first glance, but I think correct results. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"