Commit cc405661458bf4dd1bb82fd9b59ebfc257788aa9

Authored by Jordi Inglada
1 parent c413a1b6
Exists in master

mcm for S2 & L8

Showing 1 changed file with 20 additions and 7 deletions   Show diff stats
scrapbook.org
... ... @@ -523,8 +523,11 @@ int main(int argc, char* argv[])
523 523 std::cout << fact_fun(3) << std::endl;
524 524 std::cout << fact_fun(5) << std::endl;
525 525  
526   - std::cout << fact_cnstxpr(3) << std::endl;
527   - std::cout << fact_cnstxpr(5) << std::endl;
  526 +constexpr auto fc3 = fact_cnstxpr(3);
  527 +constexpr auto fc5 = fact_cnstxpr(5);
  528 +
  529 + std::cout << fc3 << std::endl;
  530 + std::cout << fc5 << std::endl;
528 531  
529 532 double reps{20e6};
530 533 constexpr U v{20};
... ... @@ -582,11 +585,11 @@ int main(int argc, char* argv[])
582 585 120
583 586 6
584 587 120
585   -TMP : 11855896914258034688 43186423
586   -TMC : 11855896914258034688 42993989
587   -CLF : 11855896914258034688 2371147092
588   -CXP : 11855896914258034688 43005418
589   -RNT : 11855896914258034688 1438049451
  588 +TMP : 11855896914258034688 35419676
  589 +TMC : 11855896914258034688 30396358
  590 +CLF : 11855896914258034688 972745195
  591 +CXP : 11855896914258034688 16800450
  592 +RNT : 11855896914258034688 562590599
590 593 #+end_example
591 594  
592 595 * Boost Statistical Distributions
... ... @@ -1275,3 +1278,13 @@ int main()
1275 1278 #+RESULTS:
1276 1279 : 1 2 3 3 4 4 5 6 7 12
1277 1280  
  1281 +* mcm
  1282 +#+BEGIN_SRC python :results output
  1283 +print [i*5 for i in range(75)]
  1284 +print [i*16+2 for i in range(30) if (i*16+2)/5==(i*16+2)/5.0]
  1285 +#+END_SRC
  1286 +
  1287 +#+RESULTS:
  1288 +: [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, 320, 325, 330, 335, 340, 345, 350, 355, 360, 365, 370]
  1289 +: [50, 130, 210, 290, 370, 450]
  1290 +
... ...