- Timestamp:
- Nov 8, 2024, 5:20:49 PM (4 days ago)
- Branches:
- master
- Children:
- 464cfc7
- Parents:
- 44e2a5a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/rational.cfa
r44e2a5a r74cbaa3 10 10 // Created On : Wed Apr 6 17:54:28 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 2 07:41:25202413 // Update Count : 19912 // Last Modified On : Fri Nov 8 17:00:38 2024 13 // Update Count : 205 14 14 // 15 15 … … 203 203 204 204 forall( ostype & | ostream( ostype ) | { ostype & ?|?( ostype &, T ); } ) { 205 205 ostype & ?|?( ostype & os, rational(T) r ) { 206 206 return os | r.numerator | '/' | r.denominator; 207 207 } // ?|? … … 211 211 212 212 forall( T | arithmetic( T ) | { T ?\?( T, unsigned long ); } ) { 213 213 rational(T) ?\?( rational(T) x, long int y ) { 214 214 if ( y < 0 ) { 215 215 return (rational(T)){ x.denominator \ -y, x.numerator \ -y };
Note: See TracChangeset
for help on using the changeset viewer.