Opened 18 years ago
Closed 17 years ago
#308 closed Bugs (Fixed)
boost::rational documentation typos(?)
| Reported by: | nobody | Owned by: | Jonathan Turkanis |
|---|---|---|---|
| Milestone: | Component: | None | |
| Version: | None | Severity: | |
| Keywords: | Cc: |
Description
<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"
Change History (2)
comment:2 by , 17 years ago
| Status: | assigned → closed |
|---|
Logged In: YES
user_id=551024
I just submitted a fix; please re-open this bug if the
changes are not adequate. The CVS version of the
fixed file is:
/cvsroot/boost/boost/libs/rational/rational.html :1.8
Note:
See TracTickets
for help on using tickets.
