Boost logo

Boost Users :

From: Daryle Walker (darylew_at_[hidden])
Date: 2005-08-23 04:40:47


On 8/23/05 2:17 AM, "Daniel Krügler" <dsp_at_[hidden]> wrote:

> 2) It seems as if the functions of common_factor_rt are prepared for
> that, although I only skimmed over the code. Honestly from the current
> boost docs in
>
> http://www.boost.org/libs/math/doc/common_factor.html

(I wrote this.)

> I could not extract the exact requirements on the template parameter for
> common_factor_rt. It just says "This type should be a numeric type that
> represents integers". What does that mean under the language
> restrictions of C++?

The type's operations should be like the ones for built-in integers. For
instance, the functions need "quotient & remainder" type division.

> (Note that the boost::rational docs describe specific requirements on
> this type, see corresponding section "Integer Type Requirements")

Basically any type that matches the description for boost::rational should
also work for the common-factor functions (since my code was inspired by
Paul's).

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net