Boost logo

Boost :

Subject: Re: [boost] [random][rational] Is there any standard way to generate a random rationals?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-03-05 14:24:15


On 03/05/2015 12:12 PM, Damian Vicino wrote:
> Hi,
> I’m using Boost.Rational in a simulation program.
> for some experiment, I want to generate some random values between 2 rational numbers.
> I’m wondering if someone already worked on this.

I'm not aware of anything.
You could try something like:

- Find a denominator somehow
- Then calculate a random numerator

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at