Skip to content
Tcl Source Code Artifact [68693be7f4]
Login

Artifact [68693be7f4]

Artifact 68693be7f433bc1f1dfe4fc6e0d9ac17c363c21e:

Ticket change [68693be7f4] - New ticket [1275043fffffffff|1275043fff] <i>expr round(0.5) returns no more 1</i>. by sarnold75 on 2005-08-28 08:58:31.
D 2005-08-28T08:58:31
J assignee dkf
J cmimetype text/plain
J comment ---\sEnvironment\s---\nWindowsME\sand\sTcl\s8.5a4\sbuilt\swith\sMingW\n\n---\sExample\sof\scode\s---\nWith\sTcl8.4\s(and\seven\s8.5a3)\s:\n\nexpr\sround(0.5)\s-->\s1\nexpr\sround(-0.5)\s-->\s-1\n\nWith\sthe\snew\s8.5a4\s:\n\nexpr\sround(0.5)\s-->\s0\nexpr\sround(-0.5)\s-->\s0\n\n---\sDiscussion\s---\nI\shave\sbeen\stold\sthat\snow\sthe\snew\sfunctionality\sis\sto\nround\sto\seven\snumbers.\n\nThe\sreason\sfor\sthis\sbug\sreport\sis\sthat\sthe\stcllib's\nmath::bigfloat\spackage\nused\sto\stest\sthe\sbigfloat\sround\scommand\sagainst\sthe\sbuiltin\n[expr\sround()].\nIt\sdoes\sno\smore,\sbecause\sI\shand-coded\sthe\sattempted\sresult\s\nas\s1\sor\s-1.\n\nBut\sI\swould\slike\sto\sknow\sat\sleast\sone\sexample\swhere\sthe\nround\nfunction\swe\sare\sused\sto\scauses\sa\sbug.\sThen,\sI\scould\swant\sto\nimplement\sthe\ssame\sbehavior\sin\smy\spackage.\n
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter sarnold75
J subsystem 16.\sCommands\sA-H
J title expr\sround(0.5)\sreturns\sno\smore\s1
J type Bug
K 1275043fffffffffffffffffffffffffffffffff
U sarnold75
Z e83d2481e639827e6407c8f1feb24818