Changeset cd7ef0b for src/libcfa/math
- Timestamp:
- Aug 10, 2017, 3:39:11 PM (8 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:
- 38d70ab
- Parents:
- 275f4b4 (diff), e1780a2 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/math
r275f4b4 rcd7ef0b 10 10 // Created On : Mon Apr 18 23:37:04 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 21 17:03:13201713 // Update Count : 10 112 // Last Modified On : Mon Aug 7 07:51:15 2017 13 // Update Count : 108 14 14 // 15 15 … … 18 18 #include <math.h> 19 19 #include <complex.h> 20 21 //---------------------- General ---------------------- 20 22 21 23 static inline float ?%?( float x, float y ) { return fmodf( x, y ); } … … 37 39 static inline [ int, long double ] remquo( long double x, long double y ) { int quo; x = remquol( x, y, &quo ); return [ quo, x ]; } 38 40 39 // alternative name for remquo 40 static inline float div( float x, float y, int * quo ) { return remquof( x, y, quo ); } 41 static inline double div( double x, double y, int * quo ) { return remquo( x, y, quo ); } 42 static inline long double div( long double x, long double y, int * quo ) { return remquol( x, y, quo ); } 43 static inline [ int, float ] div( float x, float y ) { int quo; x = remquof( x, y, &quo ); return [ quo, x ]; } 44 static inline [ int, double ] div( double x, double y ) { int quo; x = remquo( x, y, &quo ); return [ quo, x ]; } 45 static inline [ int, long double ] div( long double x, long double y ) { int quo; x = remquol( x, y, &quo ); return [ quo, x ]; } 41 static inline [ float, float ] div( float x, float y ) { y = modff( x / y, &x ); return [ x, y ]; } 42 static inline [ double, double ] div( double x, double y ) { y = modf( x / y, &x ); return [ x, y ]; } 43 static inline [ long double, long double ] div( long double x, long double y ) { y = modfl( x / y, &x ); return [ x, y ]; } 46 44 47 45 static inline float fma( float x, float y, float z ) { return fmaf( x, y, z ); }
Note:
See TracChangeset
for help on using the changeset viewer.