|
From: Luigi B. <lui...@gm...> - 2010-06-07 15:22:36
|
On Thu, 2010-05-27 at 01:58 -0500, Kakhkhor Abdijalilov wrote: > If the argument x is close to 0.0 or 1.0, the implementation sets it > exactly to 0.0 or 1.0. > This leads to an attempt to evaluate std::log(0.0) or std::log(1.0). You're right. I wonder why it does it though, since 0 and 1 are outside the domain of the function. If I were to return a value, I'd return the maximum allowed double for 1 and the minimum for 0 (to get an approximation of plus/minus infinity.) But I'd rather throw an exception in that case. Thoughts? Luigi -- Call on God, but row away from the rocks. -- Indian proverb |