Re: [eigen] a couple of RFCs

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


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



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/