Ignore:
Timestamp:
Nov 28, 2024, 3:31:29 PM (3 weeks ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
509ec82
Parents:
956b389 (diff), f5e37a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/rational.hfa

    r956b389 r3e2e9b2  
    1212// Created On       : Wed Apr  6 17:56:25 2016
    1313// Last Modified By : Peter A. Buhr
    14 // Last Modified On : Fri Nov  8 17:02:09 2024
    15 // Update Count     : 126
     14// Last Modified On : Wed Nov 27 18:11:07 2024
     15// Update Count     : 128
    1616//
    1717
     
    2121#include "math.trait.hfa"                                                               // arithmetic
    2222
    23 // implementation
     23// Implementation
    2424
    2525forall( T ) {
     
    2828        }; // rational
    2929}
     30
     31// Arithmetic, Relational
    3032
    3133forall( T | arithmetic( T ) ) {
     
    7375        rational(T) ?/?( rational(T) l, rational(T) r );
    7476        rational(T) ?/=?( rational(T) & l, rational(T) r );
     77} // distribution
    7578
    76         // I/O
    77         forall( istype & | istream( istype ) | { istype & ?|?( istype &, T & ); } )
     79// I/O
     80
     81forall( T ) {
     82        forall( istype & | istream( istype ) | { istype & ?|?( istype &, T & ); } | arithmetic( T ) )
    7883        istype & ?|?( istype &, rational(T) & );
    7984
     
    8489} // distribution
    8590
     91// Exponentiation
     92
    8693forall( T | arithmetic( T ) | { T ?\?( T, unsigned long ); } ) {
    8794        rational(T) ?\?( rational(T) x, long int y );
     
    8996} // distribution
    9097
    91 // conversion
     98// Conversion
     99
    92100forall( T | arithmetic( T ) | { double convert( T ); } )
    93101double widen( rational(T) r );
Note: See TracChangeset for help on using the changeset viewer.