Re: [eigen] inverse unit test |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] inverse unit test
- From: Manuel Yguel <manuel.yguel@xxxxxxxxx>
- Date: Thu, 10 Jun 2010 09:42:21 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=MdXpFsgfhTgLRALAT6gOsJKuyBTTZQYa8pt6Au8aO2I=; b=ri6XMeYk1vOS7CEfZPkH6hVg0vk2yzSD2JYn/wpZ5D6df49DeWidgUS+6iXmPr0CyW 6qys8zOuN3/++6GtEax1Zv818E35+EudhZQfbZrpCclcaBtzcVuxy/fc0SU61OA44dEQ hjb1k/HmrkFfkXjSZpdcKlyv+9Bfstd6XbLkI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=Ugv7TEuz2Sd4sxIn9HbuxX3C8FHELV6Noc9TXeYfcl/CwBTuaAeUsrVJlzkug589gf bLoHEX3r02fq1i/aHIGR0uwnJ9vv99cMa9HKVp+xiFwC/0FhrbVwzZUUasxTFRQU6zC9 MVhkgMlEJJM0XChY82sNNSgfhXsMU4g8kfp3k=
I hit the same problem several times and the implementation of
isMuchSmallerThan for float is:
inline bool ei_isMuchSmallerThan(float a, float b, float prec =
NumTraits<float>::dummy_precision())
{
return ei_abs(a) <= ei_abs(b) * prec;
}
if b is zero, then whatever prec is, it will failed if a is not zero,
so I do agree with Hauke that his implementation is needed.
So in fact in my own code I finally used the function he proposed.
- cheers,
Manu