Opened 21 years ago

Closed 19 years ago

#936 closed Bugs (Fixed)

Category rational - negativ numerator

Reported by: wsalomon Owned by: nobody
Milestone: Component: None
Version: None Severity:
Keywords: Cc:

Description

Hi,

there are a bug in 'rational.hpp' if using negativ 
numerators.
in some cases (num=0,num=-1) the operator< works wrong
and the operator /= allows negativ denominator.

I wrote a little test-programm
file "main_rat_comp_test.cpp" to show this.

a bug fix (only for MS VC++ 6.0) is tried in
file "rational2.hpp"

Greetings
Werner Salomon

Change History (2)

comment:1 by pmoore, 21 years ago

Logged In: YES 
user_id=113328

Your fixed code was based on a very old version of boost. 
In future, could you please try to reproduce agains the 
current version?

Your test did pick up an error in the code, for operator/= 
however. A fix has been applied to the library.

Thanks for the bug report!

comment:2 by bjorn_karlsson, 19 years ago

Status: assignedclosed
Logged In: YES 
user_id=536454

Already fixed a long time ago; I'm just closing the case.
Note: See TracTickets for help on using tickets.