Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/rational.cfa

    reae8b37 rf5e37a4  
    2121
    2222// Arithmetic, Relational
    23 forall( T | Simple(T) ) {
     23
     24forall( T | arithmetic( T ) ) {
    2425        // helper routines
     26
    2527        // Calculate greatest common denominator of two numbers, the first of which may be negative. Used to reduce
    2628        // rationals.  alternative: https://en.wikipedia.org/wiki/Binary_GCD_algorithm
     
    4244                return gcd( abs( n ), d );                                              // simplify
    4345        } // simplify
    44 }
    45 
    46 forall( T | arithmetic( T ) ) {
     46
    4747        // constructors
    4848
     
    197197
    198198forall( T ) {
    199         forall( istype & | istream( istype ) | { istype & ?|?( istype &, T & ); } | Simple(T) )
     199        forall( istype & | istream( istype ) | { istype & ?|?( istype &, T & ); } | arithmetic( T ) )
    200200        istype & ?|?( istype & is, rational(T) & r ) {
    201201                is | r.numerator | r.denominator;
Note: See TracChangeset for help on using the changeset viewer.