Browse Subversion Repository
Diff of /BLDConograph_ver1/trunk/src/utility_func/gcd.hh
Parent Directory
| Revision Log
| Patch
| 48 |
inline bool dbl2fraction(const Double& dbl, pair<Int4, Int4>& frac) |
inline bool dbl2fraction(const Double& dbl, pair<Int4, Int4>& frac) |
| 49 |
{ |
{ |
| 50 |
const Int4 k = iround_half_up(dbl*48); |
const Int4 k = iround_half_up(dbl*48); |
| 51 |
if( fabs( k - dbl*48 ) >= 1.0e-2 ) return false; |
if( fabs( k - dbl*48 ) >= 1.0e-8 ) return false; |
| 52 |
|
|
| 53 |
if( k == 0 ) |
if( k == 0 ) |
| 54 |
{ |
{ |
|
|
Legend:
| Removed from v.31 |
|
| changed lines |
| |
Added in v.32 |
|
|
|