Develop and Download Open Source Software

Browse Subversion Repository

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

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

revision 3 by rtomiyasu, Fri Feb 22 04:51:31 2013 UTC revision 33 by rtomiyasu, Wed Sep 7 04:38:51 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.3  
changed lines
  Added in v.33

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