[Insight-developers] vnl updates : Rounding Test : Performance and Correctness
kent williams
norman-k-williams at uiowa.edu
Wed Jan 7 13:24:59 EST 2009
> Am I the only programmer who thinks hard about rounding, every time I use it,
> and usually ends up writing my own rounding function so that I know what I¹m
> getting?
>
> I can¹t think of a case in my own coding where I would trust a
> just_round_it_some_way_or_other function. But I may not be a normal user.¹
>
> The fact is that even if the programmer doesn¹t explicitly ask for a
> particular rounding type, they are making some sort of assumption about the
> rounding type. They¹re likely to be unconsciously making the wrong assumption
> part of the time, which sometimes doesn¹t break anything. But when it does
> break something, you then spend a lot of time debugging, which is a waste.
>
> Having clearly labeled rounding functions would be a big win, because it would
> force those hidden assumptions to be explicitly stated. And while I can
> envision algorithms that would work no matter the rounding used, I don¹t think
> they¹re the most likely sort of programming to turn up often. Usually it
> matters,and sometimes it matters a lot.
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090107/2ff00324/attachment.htm>
More information about the Insight-developers
mailing list