Changeset 200fcb3 for tests/math1.cfa
 Timestamp:
 Dec 12, 2018, 9:16:12 AM (3 years ago)
 Branches:
 aaronthesis, armeh, cleanupdtors, deferred_resn, jacob/cs343translation, jenkinssandbox, master, newast, newastuniqueexpr, no_list, persistentindexer
 Children:
 5ebb1368
 Parents:
 3d99498
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

tests/math1.cfa
r3d99498 r200fcb3 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:58:37201813 // Update Count : 8 612 // Last Modified On : Tue Dec 11 10:24:31 2018 13 // Update Count : 88 14 14 // 15 15 … … 22 22 long double l; 23 23 24 sout  "fmod:"  5.0F % 2.0F  fmod( 5.0F, 2.0F )  5.0D % 2.0D  fmod( 5.0D, 2.0D )  5.0L % 2.0L  fmod( 5.0L, 2.0L )  endl;25 sout  "remainder:"  remainder( 2.0F, 3.0F )  remainder( 2.0D, 3.0D )  remainder( 2.0L, 3.0L )  endl;24 sout  "fmod:"  5.0F % 2.0F  fmod( 5.0F, 2.0F )  5.0D % 2.0D  fmod( 5.0D, 2.0D )  5.0L % 2.0L  fmod( 5.0L, 2.0L ); 25 sout  "remainder:"  remainder( 2.0F, 3.0F )  remainder( 2.0D, 3.0D )  remainder( 2.0L, 3.0L ); 26 26 int quot; 27 27 f = remquo( 3.6F, 0.5F, " ); 28 sout  "remquo:"  quot  f ;28 sout  "remquo:"  quot  f  nonl; 29 29 d = remquo( 3.6D, 0.5F, " ); 30 sout  quot  d ;30 sout  quot  d  nonl; 31 31 l = remquo( 3.6L, 0.5L, " ); 32 sout  quot  l  endl;33 sout  "div:"  div( 3.6F, 0.5F )  div( 3.6D, 0.5D )  div( 3.6L, 0.5L )  endl;34 sout  "fma:"  fma( 3.0F, 1.0F, 1.0F )  fma( 3.0D, 1.0D, 1.0D )  fma( 3.0L, 1.0L, , 1.0L )  endl;35 sout  "fdim:"  fdim( 1.0F, 1.0F )  fdim( 1.0D, 1.0D )  fdim( 1.0L, 1.0L )  endl;36 sout  "nan:"  (float)nan( "" )  (double)nan( "" )  (long double)nan( "" )  endl;32 sout  quot  l; 33 sout  "div:"  div( 3.6F, 0.5F )  div( 3.6D, 0.5D )  div( 3.6L, 0.5L ); 34 sout  "fma:"  fma( 3.0F, 1.0F, 1.0F )  fma( 3.0D, 1.0D, 1.0D )  fma( 3.0L, 1.0L, , 1.0L ); 35 sout  "fdim:"  fdim( 1.0F, 1.0F )  fdim( 1.0D, 1.0D )  fdim( 1.0L, 1.0L ); 36 sout  "nan:"  (float)nan( "" )  (double)nan( "" )  (long double)nan( "" ); 37 37 38 38 // Exponential  39 39 40 sout  "exp:"  exp( 1.0F )  exp( 1.0D )  exp( 1.0L )  exp( 1.0F+1.0FI )  exp( 1.0D+1.0DI )  exp( 1.0DL+1.0LI )  endl;41 sout  "exp2:"  exp2( 1.0F )  exp2( 1.0D )  exp2( 1.0L )  endl;42 sout  "expm1:"  expm1( 1.0F )  expm1( 1.0D )  expm1( 1.0L )  endl;43 sout  "pow:"  pow( 1.0F, 1.0F )  pow( 1.0D, 1.0D )  pow( 1.0L, 1.0L )  pow( 1.0F+1.0FI, 1.0F+1.0FI )  pow( 1.0D+1.0DI, 1.0D+1.0DI )  pow( 1.5DL+1.5LI, 1.5DL+1.5LI )  endl;40 sout  "exp:"  exp( 1.0F )  exp( 1.0D )  exp( 1.0L )  exp( 1.0F+1.0FI )  exp( 1.0D+1.0DI )  exp( 1.0DL+1.0LI ); 41 sout  "exp2:"  exp2( 1.0F )  exp2( 1.0D )  exp2( 1.0L ); 42 sout  "expm1:"  expm1( 1.0F )  expm1( 1.0D )  expm1( 1.0L ); 43 sout  "pow:"  pow( 1.0F, 1.0F )  pow( 1.0D, 1.0D )  pow( 1.0L, 1.0L )  pow( 1.0F+1.0FI, 1.0F+1.0FI )  pow( 1.0D+1.0DI, 1.0D+1.0DI )  pow( 1.5DL+1.5LI, 1.5DL+1.5LI ); 44 44 45 45 int b = 4; 46 46 unsigned int e = 2; 47 47 b \= e; 48 sout  "\\"  b  b \ e  endl;49 sout  "\\"  'a' \ 3u  2 \ 8u  4 \ 3u  4 \ 3u  4 \ 3  4 \ 3  4.0 \ 2.1  (1.0f+2.0fi) \ (3.0f+2.0fi)  endl;48 sout  "\\"  b  b \ e; 49 sout  "\\"  'a' \ 3u  2 \ 8u  4 \ 3u  4 \ 3u  4 \ 3  4 \ 3  4.0 \ 2.1  (1.0f+2.0fi) \ (3.0f+2.0fi); 50 50 } // main 51 51
Note: See TracChangeset
for help on using the changeset viewer.