This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 759 - Quaternion function angularDistance is hardcoded for double math
Summary: Quaternion function angularDistance is hardcoded for double math
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Geometry (show other bugs)
Version: 3.2
Hardware: All All
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-12 02:34 UTC by Jimmy Paulos
Modified: 2019-12-04 13:04 UTC (History)
4 users (show)



Attachments

Description Jimmy Paulos 2014-03-12 02:34:47 UTC
The angularDistance function in Quaternion.h uses an explicit double type variable in an intermediate step.  I believe the word 'double' on line 670 should be changed to 'Scalar'.  This is the only place double is used this way in Quaternion.h, so I think it's just a mistake.

On the next line the constant 1.0 should be Scalar(1) for similar reasons.  This change would make it consistent with use elsewhere.

A user working exclusively with Quaternionf types would be surprised by the use of double math trig.  I found the bug when turning on -Wdouble-promotion, as I'm working on an ARM Cortex-M4 with hardware support for single precision only.
Comment 1 Christoph Hertzberg 2014-03-12 14:06:18 UTC
Thanks for reporting this. Fixed in devel and 3.2:
https://bitbucket.org/eigen/eigen/commits/d71665f
https://bitbucket.org/eigen/eigen/commits/b75a554
Comment 2 Nobody 2019-12-04 13:04:25 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/759.

Note You need to log in before you can comment on or make changes to this bug.