Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/rational.c

    r6c6455f r561f730  
    1010// Created On       : Mon Mar 28 08:43:12 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 15 21:32:22 2017
    13 // Update Count     : 64
     12// Last Modified On : Sun May 14 18:10:28 2017
     13// Update Count     : 57
    1414//
    1515
     
    2323void ?{}( int * this, zero_t ) { *this = 0; }
    2424void ?{}( int * this, one_t ) { *this = 1; }
    25 double convert( int i ) { return (double)i; }
    26 int convert( double d ) { return (int)d; }
    2725
    2826int main() {
     
    5957        sout | a / b | endl;
    6058
    61         sout | "conversion" | endl;
    62         a = (Rational(int)){ 3, 4 };
    63         sout | widen( a ) | endl;
    64         a = (Rational(int)){ 1, 7 };
    65         sout | widen( a ) | endl;
    66         a = (Rational(int)){ 355, 113 };
    67         sout | widen( a ) | endl;
    68         sout | narrow( 0.75, 4 ) | endl;
    69         sout | narrow( 0.14285714285714, 16 ) | endl;
    70         sout | narrow( 3.14159265358979, 256 ) | endl;
     59//      sout | "conversion" | endl;
     60//      a = (Rational(int)){ 3, 4 };
     61//      sout | widen( a ) | endl;
     62//      a = (Rational(int)){ 1, 7 };
     63//      sout | widen( a ) | endl;
     64//      a = (Rational(int)){ 355, 113 };
     65//      sout | widen( a ) | endl;
     66//      sout | narrow( 0.75, 4 ) | endl;
     67//      sout | narrow( 0.14285714285714, 16 ) | endl;
     68//      sout | narrow( 3.14159265358979, 256 ) | endl;
    7169
    7270        sout | "decompose" | endl;
Note: See TracChangeset for help on using the changeset viewer.