[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] stable norm
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Wed, 9 Jun 2010 09:42:26 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=SY8EDIbPauWTuux3hf6y3OY62Gm1whaTozyKe2akg7g=; b=ZnGekoPt7vkaYQoRvfFGjBDQiY1HQvbEiWNzf3dy6sprA7zCkLiL5xsLwO6m7z+iVK X85+eF5dF2Lf5JccOAWe3MG0VdIPDD1aTaRiBErme7YqbzucXd3v6FGN/tpKtlEUAOb8 PJAspoP4Ak559jdq9MP0sx8J0UbmvkdtlvC4Y=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=gz55E7gu/TzcpTAgv1J6IE16X/P7Lsg0YdUDVnc7F53hLgi6sIw+R/M8EFpHeqRx4i 5gcx7uKaR9RE7KnqkXUgFOBC1tJf8N292HgEpQPKE+GY2BzY73w0dyvuDLQ2t6H5uHxn ZQQjRnlEAVnncsa2zWvIQLnAcmfOA4MfFZYFs=
On Wed, Jun 9, 2010 at 9:20 AM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
>
>
> On Wed, Jun 9, 2010 at 9:13 AM, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
> wrote:
>>
>> Hi,
>>
>> There is a glitch in stable norm. I think these two lines should be
>> removed
>>
>> VERIFY(!isFinite( ei_abs(big)/RealScalar(0)));
>> VERIFY(!isFinite(-ei_abs(big)/RealScalar(0)));
>>
>> The test seems useless since any number divided by zero will yield Inf
>> and thus the test is always true.
>>
>> Is that right, or am I overseeing someting?
>
> yes, the goal of these lines was simply to test the function isFinite
> itself, not the fact that x/0 returns Inf.
>
> So I still think it is nice to keep them.
>
> gael
>
>
>>
>> - Hauke
>>
>>
>
>
Then, I could as well replace the code by:
VERIFY(!isFinite( std::numeric_limits<RealScalar>::infinity() ) );
I am nit-picking, since we are receiving a warning on the division by
zero on MSVC.
- Hauke