Skip to content
Tcl Source Code Artifact [009b6203d4]
Login

Artifact [009b6203d4]

Artifact 009b6203d41f8902b39e4d7c181425d19edf6140:

Ticket change [009b6203d4] - New ticket [2931407fffffffff|2931407fff] <i>expr.n should document integer division rounding</i>. by cjmcdonald on 2010-01-13 15:25:14.
D 2010-01-13T15:25:14
J assignee msofer
J cmimetype text/plain
J comment The\sexpr.n\sman\spages\srefers\sto\sa\sC\smanual\sfor\sa\sdescription\sof\sthe\sbehaviour\sof\sarithmetic\soperators.\n\nBut,\sin\sTcl\s[expr\s{\s-57/10\s}]\sgives\s-6,\srounding\stowards\sminus\sinfinity.\s\sThis\swas\sa\ssurprise\sto\sme,\sas\smost\sC\simplementations\sround\stowards\szero,\sand\s-57/10\sreturns\s-5.\s\s\n\nGoogling,\sthe\slatest\sC\sstandard\sISO\s9899:1999\sactually\sspecifies\srounding\stowards\szero\sin\sthis\scase.\s\sPreviously\sit\sappears\sto\shave\sbeen\s"implementation\sdependant".\s\sSo\swe\sare\snow\sat\sodds\swith\sstandard\sC\shere.\n\nI\sthink\sthat\sthe\sexpr.n\sman\spage\sshould\sdocument\sthis\sbehaviour.
J foundin obsolete:\s8.5.8
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter cjmcdonald
J subsystem 45.\sParsing\sand\sEval
J title expr.n\sshould\sdocument\sinteger\sdivision\srounding
J type Bug
K 2931407fffffffffffffffffffffffffffffffff
U cjmcdonald
Z 8038ba68ebde2a0837f159cb0d59782d