This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 45 - ei_random<Integer type> should be uniform distribution on the whole integer range
Summary: ei_random<Integer type> should be uniform distribution on the whole integer r...
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.0
Hardware: All All
: --- Unknown
Assignee: Benoit Jacob
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 3.0-beta3
  Show dependency treegraph
 
Reported: 2010-10-14 11:50 UTC by Benoit Jacob
Modified: 2019-12-04 09:37 UTC (History)
2 users (show)



Attachments

Description Benoit Jacob 2010-10-14 11:50:50 UTC
...instead of [-10;10].

The reason for [-10;10] is to get good-looking docs, but that should be a compile-time option.

Once 3.0 is released we can't change it anymore, so we'd rather switch now to a natural choice, and the only natural choice is to use the whole integer range.

One should first implement ei_random() manually for each integer type; and then implement ei_random(a,b) from it.
Comment 1 Benoit Jacob 2011-02-04 22:23:59 UTC
Indeed, beta3 blocker.

Keep the old behavior when building the docs.
Comment 2 Benoit Jacob 2011-02-07 16:56:40 UTC
Should be fixed now. Now random<integer types> spans over 0..RAND_MAX, or -RAND_MAX/2..RAND_MAX/2 for signed types, or the most significant bits for smaller integer types.
Comment 3 Nobody 2019-12-04 09:37:46 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/45.

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