[omniORB] Re: bug in CORBA::Fixed constructor

Jonathan Biggar jon at levanta.com
Tue Jan 9 10:39:42 GMT 2007


OKeeffe, Michael K wrote:
> Alexander Haarer writes:
>  
>  
> 1.10*1.10 => 1.2100
> 
> suggests, that the precision of the result would be higher than the 
> precision
> of the source values - but this is just wrong, because the relative errors
> of the source values sum up in a multiplication operation.
> 
> That means the relative error of the result is always bigger. Following
> the argumentation of the mentioned web link, this should result in less
> significant digits, but not in more significant digits.
> 
> Personally, i dont like the style of enconding precision into digits, 
> because
> it restricts to discrete steps of precision values.

You're presuming that precision equals relative error.  That may be true 
in some use cases, but not all.  In other use cases, 1.10 may be exact 
and the result of 1.10*1.10 should be exactly 1.2100.

For use cases where relative error is important, you can use the 
rounding and/or truncation functions to trim the result.

-- 
Jon Biggar
Levanta
jon at levanta.com
650-403-7252



More information about the omniORB-list mailing list