Develop and Download Open Source Software

Browse Subversion Repository

Diff of /BLDConograph_ver1/trunk/src/utility_func/gcd.hh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 31 by rtomiyasu, Mon Feb 17 01:11:58 2014 UTC revision 32 by rtomiyasu, Sat Aug 6 01:34:09 2016 UTC
# Line 48  inline Int4 iround_half_up(const double& Line 48  inline Int4 iround_half_up(const double&
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

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26