From: Mike C. <MF...@uk...> - 2009-09-24 14:28:40
|
> I would leave the implementation as it is, document the 16, and not claim > that the result is precise up to the last digit. It's very common for maths functions to only be 'correct to within 1 ulp', instead of 'correctly rounded' (the latter can be very hard and/or expensive to achieve). However, whichever it is should be documented. Not correct to within 1 ulp would be Very Bad. I still think that if an application calls for (say) 20 digits of precision and only gets 16 then it should be alerted (by an error) -- or else, how does it know what its getting? It might be just 5. (Too late to change the behaviour of existing code that fails quietly, however.) Mike Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU |