This bugzilla service is closed. All entries have been migrated to

Bug 1354

Summary: GMP rationals support
Product: Eigen Reporter: Angelos Mantzaflaris <Angelos.Mantzaflaris>
Component: Unsupported modulesAssignee: Nobody <eigen.nobody>
Status: NEW ---    
Severity: Feature Request CC: chtz, gael.guennebaud
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Description Flags
Adaptor for GMP rational arithmetic type none

Description Angelos Mantzaflaris 2016-12-01 00:26:07 UTC
Created attachment 753 [details]
Adaptor for GMP rational arithmetic type

The attached file enables GMP rationals (mpq_class) support in Eigen. Minor issues arise occationally due to expression templates used by GMP, but in general it works fine, could be added to unsupported modules, next to MPRealSupport.
Comment 1 Gael Guennebaud 2016-12-06 10:10:15 UTC
Thanks but some cleaning are required:

- cdiv is not used anymore
- mini/maxi are commented out
- on our side we should really bypass the heavy product kernels for anything but trivial scalar types. (that's for us!)

Then to add such a support module we need the usual unit tests, cmake detections, etc.
Comment 2 Angelos Mantzaflaris 2016-12-06 23:23:55 UTC
Thanx for the feedback. 
I will update/complete the file+tests+cmake and make a pull request when time permits.

I did not quite catch the third point (heavy product kernels). 
Do you mean that rationals are heavy (sure they are, yet some users might need it) ?
Or is it that I could bypass gebp_kernel ?
Comment 3 Nobody 2019-12-04 16:33:35 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to'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: