Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2004-10-09 10:53:47


Bugs item #1043616, was opened at 2004-10-09 08:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1043616&group_id=7586

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: boost::rational documentation typos(?)

Initial Comment:
<http://www.boost.org/libs/rational/
rational.html#Integer%20Type%20Requirements> states:

"I must be an integer-like type, that is the following expressions must
be valid for any two values n and m of type I, with the "expected"
semantics.
[...]
n / m (must truncate, and n/m must be positive if n and m are
positive)"

I doubt that that is what boost::rational requires.

int n = 1;
int m = 3;
int n_over_m = n/m;

if( n_over_m > 0)
{
    std::cout << "all OK\n";
} else {
    std::cout << "Can't use 'int' as base type for boost::rational\n";
}

<http://www.boost.org/libs/rational/rational.html#Constructors>
states:

"Rationals can be constructed from a pair (numerator, denominator)
of integers, or a single integer"

I think that the documentation should read:

"Rationals can be constructed from a pair (numerator, denominator)
of I's, or a single I"

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1043616&group_id=7586

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk