Re: [eigen] Rotations and unit vectors |

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

*To*: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>*Subject*: Re: [eigen] Rotations and unit vectors*From*: Hauke Heibel <hauke.heibel@xxxxxxxxx>*Date*: Tue, 7 May 2013 17:13:09 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=s/hX1iSImQsxnGNiXJXEFB4fU2Ok5aeksnEYC+CRBkA=; b=bBwb0KcIS04xQ3qASYvm4trjzje5AA1YpD2+I7pSzHtqIeWVzoTCjBfToq/elvloOx jnEO4DobYqqzVaUNEnqYlzIge2ieMpcIwBM1L//z5gVur49tXqlFh2hzNPnp6Q/s/CYt 32tlDSIuK/37oiTenOm6nVzo8DfepLQljPf/9yhl6rdorjRjL19/vzZNLhfdiikSo0Nn iGD6w/gOlJRzq29SRQGs8XayOf6icVXVHgCeSfYSKyWuWtdpz0DWWJREQJGVapd+/Lee dKznjTPMMnG77YfzVBo5zF7FedJkOEhrqsuBgVygm+IaaGLUBT7C7GZI+jQvZV3Uns5w MRyw==

Hi Benoit,

On Tue, May 7, 2013 at 4:47 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:

But it's probably never OK to assert on anything that can depend on floating point values: that gives too finicky crashes (it doesn't help much that it's only #ifndef NDEBUG).

Could you explain why you think this is an issue? What kind of crashes are you referring to? When I hit an assert in a debug session, I get the exact line in my source code in which the error occurred. If I were seeing something like

assert( abs(axis.squaredNorm() - 1) > eps); // just an example

maybe even with a comment, there is hardly a more simple method to point me directly to the issue. Maybe that's different on other systems.

I already like the idea of a loose threshold (e.g. sqrt(numeric_limits<double>::epsilon())) as suggested by Gael.. Any code which triggers such a threshold e.g. due to numerical issues definitely has a problem and by quietly accepting these values we only delay the issue from surfacing.

Regards,

Hauke

**Follow-Ups**:**Re: [eigen] Rotations and unit vectors***From:*Benoit Jacob

**References**:**[eigen] Rotations and unit vectors***From:*Hauke Heibel

**Re: [eigen] Rotations and unit vectors***From:*Robert Lupton the Good

**Re: [eigen] Rotations and unit vectors***From:*Benoit Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Rotations and unit vectors** - Next by Date:
**Re: [eigen] Rotations and unit vectors** - Previous by thread:
**Re: [eigen] Rotations and unit vectors** - Next by thread:
**Re: [eigen] Rotations and unit vectors**

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