Changeset 5ea26ed for src/libcfa
- Timestamp:
- Aug 8, 2017, 5:36:27 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 08d14cf
- Parents:
- 43f8fd8
- Location:
- src/libcfa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/stdlib
r43f8fd8 r5ea26ed 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 14:32:37 201713 // Update Count : 22 012 // Last Modified On : Mon Aug 7 11:19:07 2017 13 // Update Count : 223 14 14 // 15 15 … … 183 183 //--------------------------------------- 184 184 185 [ int, int ] div( int num, int denom ); 186 [ long int, long int ] div( long int num, long int denom ); 187 [ long long int, long long int ] div( long long int num, long long int denom ); 185 188 forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } ) 186 [ T, T ] div( T t1, T t2);189 [ T, T ] div( T num, T demon ); 187 190 188 191 //--------------------------------------- -
src/libcfa/stdlib.c
r43f8fd8 r5ea26ed 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Jul 20 16:01:40201713 // Update Count : 2 8212 // Last Modified On : Tue Aug 8 17:31:13 2017 13 // Update Count : 291 14 14 // 15 15 … … 255 255 //--------------------------------------- 256 256 257 [ int, int ] div( int num, int denom ) { div_t qr = div( num, denom ); return [ qr.quot, qr.rem ]; } 258 [ long int, long int ] div( long int num, long int denom ) { ldiv_t qr = ldiv( num, denom ); return [ qr.quot, qr.rem ]; } 259 [ long long int, long long int ] div( long long int num, long long int denom ) { lldiv_t qr = lldiv( num, denom ); return [ qr.quot, qr.rem ]; } 257 260 forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } ) 258 [ T, T ] div( T t1, T t2 ) { return [ t1 / t2, t1 % t2]; }261 [ T, T ] div( T num, T denom ) { return [ num / denom, num % denom ]; } 259 262 260 263 //---------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.