01-kitchen_sink_utility_cmds_grammar.mdl 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /****************************************************************************
  2. * Test 01: Parser options for standard numerical functions
  3. * Also tests EXPRESSION statement
  4. *
  5. * No errors expected
  6. *
  7. * Author: Boris Kaminsky <[email protected]>
  8. * Date: 2011-03-23
  9. ****************************************************************************/
  10. dt = 1e-6
  11. TIME_STEP = dt
  12. ITERATIONS = 1
  13. SURFACE_GRID_DENSITY = 10000
  14. testfile = "./" & "/my_file.dat"
  15. printf("%.15g\n", SQRT(4))
  16. printf("%.15g\n", EXP(4))
  17. printf("%.15g\n", LOG(4))
  18. printf("%.15g\n", LOG10(4))
  19. printf("%.15g\n", SIN(PI/2))
  20. printf("%.15g\n", COS(0))
  21. printf("%.15g\n", TAN(PI/4))
  22. printf("%.15g\n", ASIN(0))
  23. printf("%.15g\n", ACOS(0))
  24. printf("%.15g\n", ATAN(1))
  25. printf("%.15g\n", ABS(-4))
  26. printf("%.15g\n", CEIL(4.2))
  27. printf("%.15g\n", FLOOR(4.2))
  28. printf("%.15g\n", MAX(5,6))
  29. printf("%.15g\n", MIN(5,6))
  30. printf("%.15g\n", RAND_UNIFORM)
  31. printf("%.15g\n", RAND_GAUSSIAN)
  32. printf("%.15g\n", SEED)
  33. printf("%.15g\n", MOD(3,5))
  34. sprintf(seed, "04g", SEED)
  35. outfile = fopen(testfile, "w")
  36. fprintf(outfile, "%04g\n", SEED)
  37. fclose(outfile)
  38. REACTION_DATA_OUTPUT
  39. {
  40. STEP = dt
  41. {EXPRESSION[2*5]} => "./exp.dat"
  42. }