Re: [eigen] beta1: geo_alignedbox_8 failing |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] beta1: geo_alignedbox_8 failing
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 30 Jun 2010 22:50:25 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.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=DAw1FziqWygqaBeWo+hlx4SgduJZvHP+2BEyuTEpqzc=; b=wSKYVnvARgHQJDnb2bObqLaCS1181JP/zkmYsxVqYtnsuaJ+tqGRqJaNw12ztzp3zv J/T/lPlhZ6Vpa8ysbeDkcoQs/ZyP3aOC6F7BF/dtkSTDs6xtmbdjc4Du4iscU8qNBrM2 gscIXXd/8M8HZIUhtn72MyDwRPoo0m9P18hZg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=aATFNEK+J9SlMgStMqJKTRggHcuNVb57d1e6QBfUY7V96N5Vgj032dOZnD0F7KGJa8 5wkvritSzZRXaBnc+p3PhlRC3R9O5jmBko7SOkudwazw92YWO/MXFZu3jFx97+ZCTzZv At8TffNqFpDo8bDAE94WificQbAoyucWqE5aQ=
2010/6/30 Jitse Niesen <jitse@xxxxxxxxxxxxxxxxx>:
> On Wed, 30 Jun 2010, Carlos Becker wrote:
>
>> The other error I get is regarding geo_alignedbox_8:
>>
>> Test alignedboxCastTests(AlignedBox<double,1>()) failed in
>> "/home/cjb/eigenThings/eigenBetaTest/eigen/test/geo_alignedbox.cpp" (105)
>> test_ei_isApprox(hp1f.template cast<Scalar>(), b0)
>>
>> So I believe it is due to the same issues as the previous email regarding
>> nullary tests, but I don't know exactly what this is supposed to do.
>
> I had a look at this and I think there was a genuine bug lurking underneath,
> which I now fixed. For the record, the code
>
> AlignedBox<double,1> interval;
> Matrix<double,1,1> alpha;
> alpha << -1;
> interval.extend(alpha);
> cout << interval.min() << " , " << interval.max() << "\n";
>
> used to print: -1 , 2.22507e-308
> but now prints: -1 , -1
>
> The problem was that std::numeric_limits<double>::min() does not return the
> smallest double (approx. -1e300) but the smallest positive normalized double
> (approx. 1e-300).
Wow. I didn't know that. But of course, for integers, min() does
return the smallest possible value, so a negative value for signed
types. This is very inconsistent!
Benoit
>
> Cheers,
> Jitse