[Insight-developers] vnl updates

Bill Lorensen bill.lorensen at gmail.com
Tue Dec 30 16:37:50 EST 2008


I wonder what the radiology community says about this?

On Tue, Dec 30, 2008 at 4:32 PM, Steve M. Robbins <steve at sumost.ca> wrote:
> On Tue, Dec 30, 2008 at 01:58:28PM -0500, Luis Ibanez wrote:
>
>> Choosing the rounding standard based on the performance of the platform
>> doesn't seem to be a good solution for ITK.
>>
>> We would want a round() function that produces the *same* output on
>> *every* platform.
>
> That makes sense to me.
>
>
>> If we pick a rounding policy, it should be the same for all
>> platforms, and it should also include a specification on how
>> it will apply to negative numbers.
>
> I've always been under the impression that round-to-even is to be
> preferred, since the other methods (round-up, round-down, or
> round-to-zero) will bias the calculations.
>
> Quoting Wikipedia:
>
>    Despite the custom of rounding the number 4.5 up to 5, in fact 4.5
>    is no nearer to 5 than it is to 4 (it is 0.5 away from both). When
>    dealing with large sets of scientific or statistical data, where
>    trends are important, traditional rounding on average biases the
>    data upwards slightly. Over a large set of data, or when many
>    subsequent rounding operations are performed as in digital signal
>    processing, the round-to-even rule tends to reduce the total
>    rounding error, with (on average) an equal portion of numbers
>    rounding up as rounding down. This generally reduces upwards
>    skewing of the result.
>
>    http://en.wikipedia.org/wiki/Rounding
>
> Also, according to Goldberg's classic paper [1] Knuth also prefers
> round-to-even, which is a strong recommendation in my books ;-)
>
> [1] http://docs.sun.com/source/806-3568/ncg_goldberg.html
>
> Cheers,
> -Steve
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD8DBQFJWpNp0i2bPSHbMcURAkkEAKCeGnxwyjeQYc+NiJ7tcPiw/3birgCfZ9zv
> F5W5uGojrYesCPeonZloUpw=
> =E/CS
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
>


More information about the Insight-developers mailing list