1 | #include <rf_core.hh> |
---|
2 | #include <refal/StdIO.hh> |
---|
3 | #include <refal/Arithm.hh> |
---|
4 | |
---|
5 | namespace refal |
---|
6 | { |
---|
7 | |
---|
8 | using namespace rfrt; |
---|
9 | |
---|
10 | namespace gcd |
---|
11 | { |
---|
12 | |
---|
13 | static const Expr _c_0 = ShortInt::create_expr (22); |
---|
14 | |
---|
15 | static const Expr _c_1 = ShortInt::create_expr (2); |
---|
16 | |
---|
17 | static const Expr _c_2 = Integer::create_expr ("2147483648"); |
---|
18 | |
---|
19 | static const Expr _c_3 = ShortInt::create_expr (135); |
---|
20 | |
---|
21 | static const Expr _c_4 = ShortInt::create_expr (-1146); |
---|
22 | |
---|
23 | static const Expr _c_5 = ShortInt::create_expr (-1245); |
---|
24 | |
---|
25 | static const Expr _c_6 = ShortInt::create_expr (-1156); |
---|
26 | |
---|
27 | static const Expr _c_7 = Integer::create_expr ("-2147483648"); |
---|
28 | |
---|
29 | static const Expr _c_8 = ShortInt::create_expr (-1156548745); |
---|
30 | |
---|
31 | static const Expr _c_9 = Integer::create_expr ("-1156548745234678"); |
---|
32 | |
---|
33 | static const Expr _c_10 = Integer::create_expr ("214748364809876"); |
---|
34 | |
---|
35 | static const Expr _c_11 = ShortInt::create_expr (2147483647); |
---|
36 | |
---|
37 | static const Expr _c_12 = ShortInt::create_expr (-2147483647); |
---|
38 | |
---|
39 | RF_FUNC (Main, (), (RF_RES _v_res1)) |
---|
40 | { |
---|
41 | Expr _v_GCD1; |
---|
42 | RF_CALL (Arithm::GCD, (_c_0, _c_1), (_v_GCD1)); |
---|
43 | RF_CALL (StdIO::PrintLN, (_v_GCD1), ()); |
---|
44 | Expr _v_GCD2; |
---|
45 | RF_CALL (Arithm::GCD, (_c_2, _c_3), (_v_GCD2)); |
---|
46 | RF_CALL (StdIO::PrintLN, (_v_GCD2), ()); |
---|
47 | Expr _v_GCD3; |
---|
48 | RF_CALL (Arithm::GCD, (_c_2, _c_4), (_v_GCD3)); |
---|
49 | RF_CALL (StdIO::PrintLN, (_v_GCD3), ()); |
---|
50 | Expr _v_GCD4; |
---|
51 | RF_CALL (Arithm::GCD, (_c_5, _c_2), (_v_GCD4)); |
---|
52 | RF_CALL (StdIO::PrintLN, (_v_GCD4), ()); |
---|
53 | Expr _v_GCD5; |
---|
54 | RF_CALL (Arithm::GCD, (_c_6, _c_7), (_v_GCD5)); |
---|
55 | RF_CALL (StdIO::PrintLN, (_v_GCD5), ()); |
---|
56 | Expr _v_GCD6; |
---|
57 | RF_CALL (Arithm::GCD, (_c_8, _c_7), (_v_GCD6)); |
---|
58 | RF_CALL (StdIO::PrintLN, (_v_GCD6), ()); |
---|
59 | Expr _v_GCD7; |
---|
60 | RF_CALL (Arithm::GCD, (_c_9, _c_10), (_v_GCD7)); |
---|
61 | RF_CALL (StdIO::PrintLN, (_v_GCD7), ()); |
---|
62 | Expr _v_GCD8; |
---|
63 | RF_CALL (Arithm::GCD, (_c_11, _c_12), (_v_GCD8)); |
---|
64 | RF_CALL (StdIO::PrintLN, (_v_GCD8), ()); |
---|
65 | Expr _v_GCD9; |
---|
66 | RF_CALL (Arithm::GCD, (_c_7, _c_2), (_v_GCD9)); |
---|
67 | RF_CALL (StdIO::PrintLN, (_v_GCD9), ()); |
---|
68 | Expr _v_GCD10; |
---|
69 | RF_CALL (Arithm::GCD, (_c_2, _c_2), (_v_GCD10)); |
---|
70 | RF_CALL (StdIO::PrintLN, (_v_GCD10), ()); |
---|
71 | _v_res1 = empty; |
---|
72 | } |
---|
73 | RF_END |
---|
74 | |
---|
75 | } |
---|
76 | |
---|
77 | rfrt::Entry rf_entry (gcd::Main); |
---|
78 | |
---|
79 | } |
---|