Re: [eigen] a couple of RFCs |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] a couple of RFCs
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 13 Aug 2009 22:34:22 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=+OkQH5T8p/0w53dwZ+SDQJ1nGeBOwsgGY6MYpdOGKWE=; b=RIKMaQ+35I3EN20WTtl5uGqrnGXxekmdJl/uukoo4IiC3u/c7iehdkbvwrN+DRPtjD 14VKztw+wm+DyCJB7N4oVRmIOHYu/dhAUDR6RxRuvrNxHDKUrk3i2dbKOX7NJCklChtq JLG1KCg07ua8xG6q9JhHy2VmVxUqg0khr0VGQ=
- 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=kPD5vqB4XBj9i4IvRrI+RIOz2+xB2ayqh197Z3wxfvHzdgRjRMyNKG/Q1mP04VhLp9 pXFh794PdOHhADGwpB954tf7XSjQimsf4luRd10mK5taZX+JJoILJWum+pkF+U8ozcri 2cY5QeIXNMC0r4cr06ZI3GLeDHGM/O83SIDD8=
yes, something like that:
template<typename T> typename NumTraits<T>::Real epsilon()
{
return std::numeric_limits<typename NumTraits<T>::Real>::epsilon();
}
gael
On Thu, Aug 13, 2009 at 9:51 PM, Benoit Jacob<jacob.benoit.1@xxxxxxxxx> wrote:
> 2009/8/13 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
>> thanks for the fixes in IOFormat.
>>
>> about numeric_limits, I think we should use:
>>
>> std::numeric_limits<NumTraits<Scalar>::Real>::epsilon()
>
> Indeed, that does the job. But that looks complicated, sooner or later
> we'll forget to do that and will get bug reports.... how about keeping
> machine_epsilon<Scalar>() as a wrapper for exactly that? maybe call it
> epsilon instead?
>
> Benoit
>
>
>
--
Gaël Guennebaud
Iparla - INRIA Bordeaux
(+33)5 40 00 37 95