From 6fff4fa7214723ebabc7c4e4926af9f044330a0b Mon Sep 17 00:00:00 2001 From: Smit-create Date: Wed, 3 Aug 2022 20:00:21 +0530 Subject: [PATCH 1/2] Add support 3 args in builtin pow --- src/lpython/semantics/python_comptime_eval.h | 23 +++++++- src/runtime/lpython_builtin.py | 61 ++++++++++++++++++++ 2 files changed, 81 insertions(+), 3 deletions(-) diff --git a/src/lpython/semantics/python_comptime_eval.h b/src/lpython/semantics/python_comptime_eval.h index 6654602ad5..6ea6bd47e6 100644 --- a/src/lpython/semantics/python_comptime_eval.h +++ b/src/lpython/semantics/python_comptime_eval.h @@ -207,6 +207,16 @@ struct PythonIntrinsicProcedures { ASR::expr_t* arg2 = args[1]; ASR::ttype_t* arg1_type = ASRUtils::expr_type(arg1); ASR::ttype_t* arg2_type = ASRUtils::expr_type(arg2); + int64_t mod_by = -1; + if (args.size() == 3) { + ASR::expr_t* arg3 = args[2]; + ASR::ttype_t* arg3_type = ASRUtils::expr_type(arg3); + if (!ASRUtils::is_integer(*arg3_type) ) { // Zero Division + throw SemanticError("Third argument must be an integer. Found: " + \ + ASRUtils::type_to_str_python(arg3_type), loc); + } + mod_by = ASR::down_cast(arg3)->m_n; + } ASR::ttype_t *int_type = ASRUtils::TYPE(ASR::make_Integer_t(al, loc, 4, nullptr, 0)); ASR::ttype_t *real_type = ASRUtils::TYPE(ASR::make_Real_t(al, loc, 8, nullptr, 0)); ASR::ttype_t *complex_type = ASRUtils::TYPE(ASR::make_Complex_t(al, loc, 8, nullptr, 0)); @@ -219,9 +229,16 @@ struct PythonIntrinsicProcedures { if (b < 0) // Negative power return ASR::down_cast(make_RealConstant_t(al, loc, pow(a, b), real_type)); - else // Positive power - return ASR::down_cast(make_IntegerConstant_t(al, loc, - (int64_t)pow(a, b), int_type)); + else {// Positive power + if (mod_by == -1) + return ASR::down_cast(make_IntegerConstant_t(al, loc, + (int64_t)pow(a, b), int_type)); + else { + int64_t res = (int64_t)pow(a, b); + return ASR::down_cast(make_IntegerConstant_t(al, loc, + res % mod_by, int_type)); + } + } } else if (ASRUtils::is_real(*arg1_type) && ASRUtils::is_real(*arg2_type)) { double a = ASR::down_cast(arg1)->m_r; diff --git a/src/runtime/lpython_builtin.py b/src/runtime/lpython_builtin.py index da45890cd4..c788b501c5 100644 --- a/src/runtime/lpython_builtin.py +++ b/src/runtime/lpython_builtin.py @@ -541,3 +541,64 @@ def min(a: f64, b: f64) -> f64: return a else: return b + + +@overload +def _floor(x: f64) -> i64: + r: i64 + r = int(x) + if x >= 0 or x == r: + return r + return r - 1 + +@overload +def _floor(x: f32) -> i32: + r: i32 + r = int(x) + if x >= 0 or x == r: + return r + return r - 1 + + +@overload +def _mod(a: i32, b: i32) -> i32: + """ + Returns a%b + """ + r: i32 + r = _floor(a/b) + return a - r*b + + +@overload +def _mod(a: i64, b: i64) -> i64: + """ + Returns a%b + """ + r: i64 + r = _floor(a/b) + return a - r*b + + +@overload +def pow(x: i32, y: i32, z: i32) -> i32: + """ + Return `x` raised to the power `y`. + """ + if y < 0: + raise ValueError('y should be nonnegative') + result: i32 + result = _mod(x**y, z) + return result + + +@overload +def pow(x: i64, y: i64, z: i64) -> i64: + """ + Return `x` raised to the power `y`. + """ + if y < 0: + raise ValueError('y should be nonnegative') + result: i64 + result = _mod(x**y, z) + return result From 2b2aa9aa0817b3ba300af83f4f519757b2b59c98 Mon Sep 17 00:00:00 2001 From: Smit-create Date: Wed, 3 Aug 2022 22:48:32 +0530 Subject: [PATCH 2/2] Add and update tests --- integration_tests/test_builtin_pow.py | 9 ++ integration_tests/test_math.py | 2 +- tests/reference/asr-complex1-f26c460.json | 2 +- tests/reference/asr-complex1-f26c460.stdout | 2 +- tests/reference/asr-constants1-5828e8a.json | 2 +- tests/reference/asr-constants1-5828e8a.stdout | 2 +- tests/reference/asr-elemental_01-b58df26.json | 2 +- .../reference/asr-elemental_01-b58df26.stdout | 2 +- tests/reference/asr-expr10-efcbb1b.json | 2 +- tests/reference/asr-expr10-efcbb1b.stdout | 2 +- tests/reference/asr-expr13-81bdb5a.json | 2 +- tests/reference/asr-expr13-81bdb5a.stdout | 2 +- tests/reference/asr-expr7-480ba2f.json | 2 +- tests/reference/asr-expr7-480ba2f.stdout | 2 +- tests/reference/asr-expr8-6beda60.json | 2 +- tests/reference/asr-expr8-6beda60.stdout | 2 +- tests/reference/asr-expr_05-3a37324.json | 2 +- tests/reference/asr-expr_05-3a37324.stdout | 2 +- tests/reference/asr-structs_05-fa98307.json | 2 +- tests/reference/asr-structs_05-fa98307.stdout | 2 +- .../asr-test_bool_binop-f856ef0.json | 2 +- .../asr-test_bool_binop-f856ef0.stdout | 2 +- .../asr-test_builtin_abs-c74d2c9.json | 2 +- .../asr-test_builtin_abs-c74d2c9.stdout | 2 +- .../asr-test_builtin_bin-52ba9fa.json | 2 +- .../asr-test_builtin_bin-52ba9fa.stdout | 2 +- .../asr-test_builtin_bool-330223a.json | 2 +- .../asr-test_builtin_bool-330223a.stdout | 2 +- .../asr-test_builtin_hex-64bd268.json | 2 +- .../asr-test_builtin_hex-64bd268.stdout | 2 +- .../asr-test_builtin_oct-20b9066.json | 2 +- .../asr-test_builtin_oct-20b9066.stdout | 2 +- .../asr-test_builtin_pow-f02fcda.json | 4 +- .../asr-test_builtin_pow-f02fcda.stdout | 2 +- .../asr-test_builtin_round-7417a21.json | 2 +- .../asr-test_builtin_round-7417a21.stdout | 2 +- .../asr-test_c_interop_01-e374f43.json | 2 +- .../asr-test_c_interop_01-e374f43.stdout | 2 +- tests/reference/asr-test_complex-70f026c.json | 2 +- .../reference/asr-test_complex-70f026c.stdout | 2 +- tests/reference/asr-test_max_min-3c2fc51.json | 2 +- .../reference/asr-test_max_min-3c2fc51.stdout | 2 +- .../reference/asr-test_numpy_03-e600a49.json | 2 +- .../asr-test_numpy_03-e600a49.stdout | 2 +- .../reference/asr-test_numpy_04-ecbb614.json | 2 +- .../asr-test_numpy_04-ecbb614.stdout | 2 +- tests/reference/asr-test_pow-3f5d550.json | 2 +- tests/reference/asr-test_pow-3f5d550.stdout | 2 +- .../cpp-test_builtin_pow-56b3f92.json | 4 +- .../cpp-test_builtin_pow-56b3f92.stdout | 84 +++++++++++++++++++ 50 files changed, 143 insertions(+), 50 deletions(-) diff --git a/integration_tests/test_builtin_pow.py b/integration_tests/test_builtin_pow.py index 97cfd12c41..d9497340e0 100644 --- a/integration_tests/test_builtin_pow.py +++ b/integration_tests/test_builtin_pow.py @@ -73,6 +73,15 @@ def test_pow(): assert pow(4, 2) == 16 assert abs(pow(-4235.0, 52) - 3.948003805985264e+188) < eps + i: i64 + i = 7 + j: i64 + j = 2 + k: i64 + k = 5 + assert pow(i, j, k) == 4 + assert pow(102, 3, 121) == 38 + c1: c32 c1 = complex(4, 5) c1 = pow(c1, 4) diff --git a/integration_tests/test_math.py b/integration_tests/test_math.py index 513b29c658..b5c6f9c964 100644 --- a/integration_tests/test_math.py +++ b/integration_tests/test_math.py @@ -72,7 +72,7 @@ def test_pow(): a = 2 b: i64 b = 4 - assert abs(pow(a, b) - 16) < eps + assert pow(a, b) == 16 def test_ldexp(): i: f64 diff --git a/tests/reference/asr-complex1-f26c460.json b/tests/reference/asr-complex1-f26c460.json index 98d25a28c7..f0ca5b2ad4 100644 --- a/tests/reference/asr-complex1-f26c460.json +++ b/tests/reference/asr-complex1-f26c460.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-complex1-f26c460.stdout", - "stdout_hash": "0962e62f1546143e61a7f2b8dd8f5a15f3f769accb991a8a382a1390", + "stdout_hash": "c9367e1509aa99dfeede3c7379e41ca9ca30083e9f7cb4d4a44aaa04", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-complex1-f26c460.stdout b/tests/reference/asr-complex1-f26c460.stdout index c79392da46..3d43b53d3d 100644 --- a/tests/reference/asr-complex1-f26c460.stdout +++ b/tests/reference/asr-complex1-f26c460.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {complex@__lpython_overloaded_0__complex: (ExternalSymbol 1 complex@__lpython_overloaded_0__complex 5 __lpython_overloaded_0__complex lpython_builtin [] __lpython_overloaded_0__complex Public), complex@__lpython_overloaded_13__complex: (ExternalSymbol 1 complex@__lpython_overloaded_13__complex 5 __lpython_overloaded_13__complex lpython_builtin [] __lpython_overloaded_13__complex Public), complex@__lpython_overloaded_1__complex: (ExternalSymbol 1 complex@__lpython_overloaded_1__complex 5 __lpython_overloaded_1__complex lpython_builtin [] __lpython_overloaded_1__complex Public), complex@__lpython_overloaded_2__complex: (ExternalSymbol 1 complex@__lpython_overloaded_2__complex 5 __lpython_overloaded_2__complex lpython_builtin [] __lpython_overloaded_2__complex Public), complex@__lpython_overloaded_5__complex: (ExternalSymbol 1 complex@__lpython_overloaded_5__complex 5 __lpython_overloaded_5__complex lpython_builtin [] __lpython_overloaded_5__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 5 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 76 {}) main_program [] []), test: (Subroutine (SymbolTable 3 {x: (Variable 3 x Local () () Default (Complex 8 []) Source Public Required .false.), y: (Variable 3 y Local () () Default (Complex 8 []) Source Public Required .false.), z: (Variable 3 z Local () () Default (Complex 4 []) Source Public Required .false.)}) test [] [(= (Var 3 x) (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 3 y) (ComplexBinOp (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 5.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 5.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 3 z) (Cast (ComplexBinOp (Var 3 x) Add (Var 3 y) (Complex 8 []) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 3 z) (Cast (ComplexBinOp (Var 3 x) Sub (Var 3 y) (Complex 8 []) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 3 z) (Cast (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Mul (Var 3 x) (Complex 8 []) ()) ComplexToComplex (Complex 4 []) ()) ())] Source Public Implementation () .false. .false.), test_complex: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Logical 4 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 4 []) Source Public Required .false.), c1: (Variable 2 c1 Local () () Default (Complex 4 []) Source Public Required .false.), c2: (Variable 2 c2 Local () () Default (Complex 4 []) Source Public Required .false.), c3: (Variable 2 c3 Local () () Default (Complex 8 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 5 complex lpython_builtin [] complex Private)}) test_complex [] [(= (Var 2 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_0__complex 2 complex [] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((RealConstant 3.39999999999999991e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.39999999999999991e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 3.39999999999999991e+00 0.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_5__complex 2 complex [((RealConstant 5.00000000000000000e+00 (Real 8 []))) ((RealConstant 4.29999999999999982e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 5.00000000000000000e+00 4.29999999999999982e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 5.00000000000000000e+00 4.29999999999999982e+00 (Complex 4 []))) ()) (= (Var 2 c) (FunctionCall 1 complex@__lpython_overloaded_2__complex 2 complex [((IntegerConstant 1 (Integer 4 [])))] (Complex 4 []) (ComplexConstant 1.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ()) (= (Var 2 c1) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c2) (Cast (FunctionCall 1 complex@__lpython_overloaded_13__complex 2 complex [((IntegerConstant 2 (Integer 4 []))) ((RealConstant 4.50000000000000000e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 4.50000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 2.00000000000000000e+00 4.50000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c3) (FunctionCall 1 complex@__lpython_overloaded_5__complex 2 complex [((RealConstant 3.00000000000000000e+00 (Real 8 []))) ((RealConstant 4.00000000000000000e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) ()) (= (Var 2 b) (ComplexCompare (Var 2 c1) NotEq (Var 2 c2) (Logical 4 []) ()) ()) (= (Var 2 b) (ComplexCompare (Cast (Var 2 c1) ComplexToComplex (Complex 8 []) ()) Eq (Var 2 c3) (Logical 4 []) ()) ()) (= (Var 2 c) (ComplexBinOp (Var 2 c1) Add (Var 2 c2) (Complex 4 []) ()) ()) (= (Var 2 c) (ComplexBinOp (Var 2 c2) Sub (Var 2 c1) (Complex 4 []) ()) ()) (= (Var 2 c) (ComplexBinOp (Var 2 c1) Mul (Var 2 c2) (Complex 4 []) ()) ()) (= (Var 2 c) (Cast (ComplexBinOp (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 1.00000000000000000e+00 2.00000000000000000e+00 (Complex 8 [])) ()) Pow (FunctionCall 1 complex@__lpython_overloaded_5__complex 2 complex [((RealConstant 3.34534000000000020e+00 (Real 8 []))) ((RealConstant 4.86786779999999997e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.34534000000000020e+00 4.86786779999999997e+00 (Complex 8 [])) ()) (Complex 8 []) (ComplexConstant 1.55532894199002149e-02 6.55611790271555805e-02 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant 1.55532894199002149e-02 6.55611790271555805e-02 (Complex 4 []))) ()) (= (Var 2 c) (Cast (ComplexBinOp (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 1.00000000000000000e+00 2.00000000000000000e+00 (Complex 8 [])) ()) Mul (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) (Complex 8 []) (ComplexConstant -5.00000000000000000e+00 1.00000000000000000e+01 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant -5.00000000000000000e+00 1.00000000000000000e+01 (Complex 4 []))) ()) (= (Var 2 c) (Cast (ComplexBinOp (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 5 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) ()) Sub (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) (Complex 8 []) (ComplexConstant 1.00000000000000000e+00 1.00000000000000000e+00 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant 1.00000000000000000e+00 1.00000000000000000e+00 (Complex 4 []))) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {complex@__lpython_overloaded_0__complex: (ExternalSymbol 1 complex@__lpython_overloaded_0__complex 5 __lpython_overloaded_0__complex lpython_builtin [] __lpython_overloaded_0__complex Public), complex@__lpython_overloaded_13__complex: (ExternalSymbol 1 complex@__lpython_overloaded_13__complex 5 __lpython_overloaded_13__complex lpython_builtin [] __lpython_overloaded_13__complex Public), complex@__lpython_overloaded_1__complex: (ExternalSymbol 1 complex@__lpython_overloaded_1__complex 5 __lpython_overloaded_1__complex lpython_builtin [] __lpython_overloaded_1__complex Public), complex@__lpython_overloaded_2__complex: (ExternalSymbol 1 complex@__lpython_overloaded_2__complex 5 __lpython_overloaded_2__complex lpython_builtin [] __lpython_overloaded_2__complex Public), complex@__lpython_overloaded_5__complex: (ExternalSymbol 1 complex@__lpython_overloaded_5__complex 5 __lpython_overloaded_5__complex lpython_builtin [] __lpython_overloaded_5__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 5 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 82 {}) main_program [] []), test: (Subroutine (SymbolTable 3 {x: (Variable 3 x Local () () Default (Complex 8 []) Source Public Required .false.), y: (Variable 3 y Local () () Default (Complex 8 []) Source Public Required .false.), z: (Variable 3 z Local () () Default (Complex 4 []) Source Public Required .false.)}) test [] [(= (Var 3 x) (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 3 y) (ComplexBinOp (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 5.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 5.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 3 z) (Cast (ComplexBinOp (Var 3 x) Add (Var 3 y) (Complex 8 []) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 3 z) (Cast (ComplexBinOp (Var 3 x) Sub (Var 3 y) (Complex 8 []) ()) ComplexToComplex (Complex 4 []) ()) ()) (= (Var 3 z) (Cast (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Mul (Var 3 x) (Complex 8 []) ()) ComplexToComplex (Complex 4 []) ()) ())] Source Public Implementation () .false. .false.), test_complex: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Logical 4 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 4 []) Source Public Required .false.), c1: (Variable 2 c1 Local () () Default (Complex 4 []) Source Public Required .false.), c2: (Variable 2 c2 Local () () Default (Complex 4 []) Source Public Required .false.), c3: (Variable 2 c3 Local () () Default (Complex 8 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 5 complex lpython_builtin [] complex Private)}) test_complex [] [(= (Var 2 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_0__complex 2 complex [] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_1__complex 2 complex [((RealConstant 3.39999999999999991e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.39999999999999991e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 3.39999999999999991e+00 0.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_5__complex 2 complex [((RealConstant 5.00000000000000000e+00 (Real 8 []))) ((RealConstant 4.29999999999999982e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 5.00000000000000000e+00 4.29999999999999982e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 5.00000000000000000e+00 4.29999999999999982e+00 (Complex 4 []))) ()) (= (Var 2 c) (FunctionCall 1 complex@__lpython_overloaded_2__complex 2 complex [((IntegerConstant 1 (Integer 4 [])))] (Complex 4 []) (ComplexConstant 1.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ()) (= (Var 2 c1) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c2) (Cast (FunctionCall 1 complex@__lpython_overloaded_13__complex 2 complex [((IntegerConstant 2 (Integer 4 []))) ((RealConstant 4.50000000000000000e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 4.50000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 2.00000000000000000e+00 4.50000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c3) (FunctionCall 1 complex@__lpython_overloaded_5__complex 2 complex [((RealConstant 3.00000000000000000e+00 (Real 8 []))) ((RealConstant 4.00000000000000000e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) ()) (= (Var 2 b) (ComplexCompare (Var 2 c1) NotEq (Var 2 c2) (Logical 4 []) ()) ()) (= (Var 2 b) (ComplexCompare (Cast (Var 2 c1) ComplexToComplex (Complex 8 []) ()) Eq (Var 2 c3) (Logical 4 []) ()) ()) (= (Var 2 c) (ComplexBinOp (Var 2 c1) Add (Var 2 c2) (Complex 4 []) ()) ()) (= (Var 2 c) (ComplexBinOp (Var 2 c2) Sub (Var 2 c1) (Complex 4 []) ()) ()) (= (Var 2 c) (ComplexBinOp (Var 2 c1) Mul (Var 2 c2) (Complex 4 []) ()) ()) (= (Var 2 c) (Cast (ComplexBinOp (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 1.00000000000000000e+00 2.00000000000000000e+00 (Complex 8 [])) ()) Pow (FunctionCall 1 complex@__lpython_overloaded_5__complex 2 complex [((RealConstant 3.34534000000000020e+00 (Real 8 []))) ((RealConstant 4.86786779999999997e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.34534000000000020e+00 4.86786779999999997e+00 (Complex 8 [])) ()) (Complex 8 []) (ComplexConstant 1.55532894199002149e-02 6.55611790271555805e-02 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant 1.55532894199002149e-02 6.55611790271555805e-02 (Complex 4 []))) ()) (= (Var 2 c) (Cast (ComplexBinOp (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 1.00000000000000000e+00 2.00000000000000000e+00 (Complex 8 [])) ()) Mul (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) (Complex 8 []) (ComplexConstant -5.00000000000000000e+00 1.00000000000000000e+01 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant -5.00000000000000000e+00 1.00000000000000000e+01 (Complex 4 []))) ()) (= (Var 2 c) (Cast (ComplexBinOp (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 5 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) ()) Sub (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) (Complex 8 []) (ComplexConstant 1.00000000000000000e+00 1.00000000000000000e+00 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant 1.00000000000000000e+00 1.00000000000000000e+00 (Complex 4 []))) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-constants1-5828e8a.json b/tests/reference/asr-constants1-5828e8a.json index bc7c2708c7..f58b9b4487 100644 --- a/tests/reference/asr-constants1-5828e8a.json +++ b/tests/reference/asr-constants1-5828e8a.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-constants1-5828e8a.stdout", - "stdout_hash": "a501ee33a6c5ceb7e94b68933e664826aee6e97ec90bdb17078be9ef", + "stdout_hash": "e0ab7f321cf9154c14127feb2ff3843d43456a28163ed2b117468711", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-constants1-5828e8a.stdout b/tests/reference/asr-constants1-5828e8a.stdout index 4cd2d7e7ad..994fb1acf5 100644 --- a/tests/reference/asr-constants1-5828e8a.stdout +++ b/tests/reference/asr-constants1-5828e8a.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 13 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_4__abs: (ExternalSymbol 1 abs@__lpython_overloaded_4__abs 13 __lpython_overloaded_4__abs lpython_builtin [] __lpython_overloaded_4__abs Public), abs@__lpython_overloaded_6__abs: (ExternalSymbol 1 abs@__lpython_overloaded_6__abs 13 __lpython_overloaded_6__abs lpython_builtin [] __lpython_overloaded_6__abs Public), abs@__lpython_overloaded_8__abs: (ExternalSymbol 1 abs@__lpython_overloaded_8__abs 13 __lpython_overloaded_8__abs lpython_builtin [] __lpython_overloaded_8__abs Public), complex@__lpython_overloaded_5__complex: (ExternalSymbol 1 complex@__lpython_overloaded_5__complex 13 __lpython_overloaded_5__complex lpython_builtin [] __lpython_overloaded_5__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 13 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 84 {}) main_program [] []), test_abs: (Subroutine (SymbolTable 4 {a: (Variable 4 a Local () () Default (Integer 4 []) Source Public Required .false.), abs: (ExternalSymbol 4 abs 13 abs lpython_builtin [] abs Private), b: (Variable 4 b Local () () Default (Real 4 []) Source Public Required .false.), complex: (ExternalSymbol 4 complex 13 complex lpython_builtin [] complex Private)}) test_abs [] [(= (Var 4 a) (FunctionCall 1 abs@__lpython_overloaded_4__abs 4 abs [((IntegerConstant 5 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 5 (Integer 4 [])) ()) ()) (= (Var 4 a) (FunctionCall 1 abs@__lpython_overloaded_4__abs 4 abs [((IntegerUnaryMinus (IntegerConstant 500 (Integer 4 [])) (Integer 4 []) (IntegerConstant -500 (Integer 4 []))))] (Integer 4 []) (IntegerConstant 500 (Integer 4 [])) ()) ()) (= (Var 4 a) (FunctionCall 1 abs@__lpython_overloaded_6__abs 4 abs [((LogicalConstant .false. (Logical 4 [])))] (Integer 4 []) (IntegerConstant 0 (Integer 4 [])) ()) ()) (= (Var 4 a) (FunctionCall 1 abs@__lpython_overloaded_6__abs 4 abs [((LogicalConstant .true. (Logical 4 [])))] (Integer 4 []) (IntegerConstant 1 (Integer 4 [])) ()) ()) (= (Var 4 b) (Cast (FunctionCall 1 abs@__lpython_overloaded_0__abs 4 abs [((RealConstant 3.45000000000000018e+00 (Real 8 [])))] (Real 8 []) (RealConstant 3.45000000000000018e+00 (Real 8 [])) ()) RealToReal (Real 4 []) (RealConstant 3.45000000000000018e+00 (Real 4 []))) ()) (= (Var 4 b) (Cast (FunctionCall 1 abs@__lpython_overloaded_0__abs 4 abs [((RealUnaryMinus (RealConstant 5.34634000000000015e+03 (Real 8 [])) (Real 8 []) (RealConstant -5.34634000000000015e+03 (Real 8 []))))] (Real 8 []) (RealConstant 5.34634000000000015e+03 (Real 8 [])) ()) RealToReal (Real 4 []) (RealConstant 5.34634000000000015e+03 (Real 4 []))) ()) (= (Var 4 b) (Cast (FunctionCall 1 abs@__lpython_overloaded_8__abs 4 abs [((FunctionCall 1 complex@__lpython_overloaded_5__complex 4 complex [((RealConstant 3.45000000000000018e+00 (Real 8 []))) ((RealConstant 5.59999999999999964e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.45000000000000018e+00 5.59999999999999964e+00 (Complex 8 [])) ()))] (Real 8 []) (RealConstant 6.57742350772701823e+00 (Real 8 [])) ()) RealToReal (Real 4 []) (RealConstant 6.57742350772701823e+00 (Real 4 []))) ())] Source Public Implementation () .false. .false.), test_bool: (Subroutine (SymbolTable 6 {a: (Variable 6 a Local () () Default (Logical 4 []) Source Public Required .false.), complex: (ExternalSymbol 6 complex 13 complex lpython_builtin [] complex Private)}) test_bool [] [(= (Var 6 a) (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 6 a) (Cast (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) IntegerToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 6 a) (Cast (StringConstant "" (Character 1 0 () [])) CharacterToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 6 a) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 6 complex [((IntegerConstant 0 (Integer 4 []))) ((IntegerConstant 0 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ComplexToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (Assert (LogicalCompare (Var 6 a) Eq (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) ()) ()) (= (Var 6 a) (Cast (StringConstant "t" (Character 1 1 () [])) CharacterToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 6 a) (Cast (RealConstant 2.29999999999999982e+00 (Real 8 [])) RealToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (LogicalCompare (Var 6 a) Eq (LogicalConstant .true. (Logical 4 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_boz: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Character 1 -2 () []) Source Public Required .false.), bin: (ExternalSymbol 2 bin 13 bin lpython_builtin [] bin Private), hex: (ExternalSymbol 2 hex 13 hex lpython_builtin [] hex Private), oct: (ExternalSymbol 2 oct 13 oct lpython_builtin [] oct Private)}) test_boz [] [(= (Var 2 b) (FunctionCall 2 bin () [((IntegerConstant 5 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0b101" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 bin () [((IntegerConstant 64 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0b1000000" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 bin () [((IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0b1000010110" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 oct () [((IntegerConstant 8 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0o10" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 oct () [((IntegerConstant 56 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0o70" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 oct () [((IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0o1026" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 hex () [((IntegerConstant 42 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0x2a" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 hex () [((IntegerConstant 12648430 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0xc0ffee" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 hex () [((IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0x216" (Character 1 1 () [])) ()) ())] Source Public Implementation () .false. .false.), test_callable: (Subroutine (SymbolTable 8 {a: (Variable 8 a Local () () Default (Logical 4 []) Source Public Required .false.), b: (Variable 8 b Local () () Default (Integer 4 []) Source Public Required .false.)}) test_callable [] [(= (Var 8 b) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 8 a) (LogicalConstant .true. (Logical 4 [])) ()) (Assert (LogicalCompare (Var 8 a) Eq (LogicalConstant .true. (Logical 4 [])) (Logical 4 []) ()) ()) (= (Var 8 a) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (LogicalCompare (Var 8 a) Eq (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) ()) ()) (= (Var 8 a) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (LogicalCompare (Var 8 a) Eq (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_divmod: (Subroutine (SymbolTable 11 {a: (Variable 11 a Local () () Default (Tuple [(Integer 4 []) (Integer 4 [])]) Source Public Required .false.), divmod: (ExternalSymbol 11 divmod 13 divmod lpython_builtin [] divmod Private)}) test_divmod [] [(= (Var 11 a) (FunctionCall 11 divmod () [((IntegerConstant 9 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Tuple [(Integer 4 []) (Integer 4 [])]) (TupleConstant [(IntegerConstant 3 (Integer 4 [])) (IntegerConstant 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) ()) (= (Var 11 a) (FunctionCall 11 divmod () [((IntegerConstant 9 (Integer 4 []))) ((IntegerUnaryMinus (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) (IntegerConstant -3 (Integer 4 []))))] (Tuple [(Integer 4 []) (Integer 4 [])]) (TupleConstant [(IntegerConstant -3 (Integer 4 [])) (IntegerConstant 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) ()) (= (Var 11 a) (FunctionCall 11 divmod () [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Tuple [(Integer 4 []) (Integer 4 [])]) (TupleConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) ()) (= (Var 11 a) (FunctionCall 11 divmod () [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 5 (Integer 4 [])))] (Tuple [(Integer 4 []) (Integer 4 [])]) (TupleConstant [(IntegerConstant 0 (Integer 4 [])) (IntegerConstant 4 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) ()) (= (Var 11 a) (FunctionCall 11 divmod () [((IntegerConstant 0 (Integer 4 []))) ((IntegerConstant 5 (Integer 4 [])))] (Tuple [(Integer 4 []) (Integer 4 [])]) (TupleConstant [(IntegerConstant 0 (Integer 4 [])) (IntegerConstant 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) ())] Source Public Implementation () .false. .false.), test_float: (Subroutine (SymbolTable 10 {a: (Variable 10 a Local () () Default (Real 8 []) Source Public Required .false.)}) test_float [] [(= (Var 10 a) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) (= (Var 10 a) (RealConstant 4.55999999999999961e+00 (Real 8 [])) ()) (= (Var 10 a) (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToReal (Real 8 []) (RealConstant 5.00000000000000000e+00 (Real 8 []))) ()) (= (Var 10 a) (Cast (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) IntegerToReal (Real 8 []) (RealConstant -1.00000000000000000e+00 (Real 8 []))) ()) (= (Var 10 a) (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToReal (Real 8 []) (RealConstant 1.00000000000000000e+00 (Real 8 []))) ()) (= (Var 10 a) (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToReal (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))) ())] Source Public Implementation () .false. .false.), test_int: (Subroutine (SymbolTable 9 {a: (Variable 9 a Local () () Default (Integer 8 []) Source Public Required .false.)}) test_int [] [(= (Var 9 a) (IntegerConstant 0 (Integer 8 [])) ()) (= (Var 9 a) (Cast (RealConstant 4.55999999999999961e+00 (Real 8 [])) RealToInteger (Integer 8 []) (IntegerConstant 4 (Integer 8 []))) ()) (= (Var 9 a) (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (Cast (RealUnaryMinus (RealConstant 5.00000999999999962e+00 (Real 8 [])) (Real 8 []) (RealConstant -5.00000999999999962e+00 (Real 8 []))) RealToInteger (Integer 8 []) (IntegerConstant -5 (Integer 8 []))) ()) (= (Var 9 a) (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 8 []) (IntegerConstant 1 (Integer 8 []))) ()) (= (Var 9 a) (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 8 []) (IntegerConstant 0 (Integer 8 []))) ()) (= (Var 9 a) (IntegerConstant 5346 (Integer 8 [])) ())] Source Public Implementation () .false. .false.), test_len: (Subroutine (SymbolTable 5 {a: (Variable 5 a Local () () Default (Integer 4 []) Source Public Required .false.), l: (Variable 5 l Local () () Default (List (Integer 4 [])) Source Public Required .false.)}) test_len [] [(= (Var 5 a) (StringLen (StringConstant "" (Character 1 0 () [])) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) ()) (= (Var 5 a) (StringLen (StringConstant "test" (Character 1 4 () [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))) ()) (= (Var 5 a) (StringLen (StringConstant "this is a test" (Character 1 14 () [])) (Integer 4 []) (IntegerConstant 14 (Integer 4 []))) ()) (= (Var 5 a) (TupleLen (TupleConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 []) (Integer 4 [])])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) ()) (= (Var 5 a) (TupleLen (TupleConstant [(TupleConstant [(StringConstant "c" (Character 1 1 () [])) (StringConstant "b" (Character 1 1 () [])) (RealConstant 3.39999999999999991e+00 (Real 8 []))] (Tuple [(Character 1 1 () []) (Character 1 1 () []) (Real 8 [])])) (TupleConstant [(StringConstant "c" (Character 1 1 () [])) (IntegerConstant 3 (Integer 4 [])) (RealConstant 5.59999999999999964e+00 (Real 8 []))] (Tuple [(Character 1 1 () []) (Integer 4 []) (Real 8 [])]))] (Tuple [(Tuple [(Character 1 1 () []) (Character 1 1 () []) (Real 8 [])]) (Tuple [(Character 1 1 () []) (Integer 4 []) (Real 8 [])])])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))) ()) (= (Var 5 a) (ListLen (ListConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 []))] (List (Integer 4 []))) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) ()) (= (Var 5 a) (ListLen (ListConstant [(ListConstant [(IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 []))) (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) (IntegerUnaryMinus (IntegerConstant 6 (Integer 4 [])) (Integer 4 []) (IntegerConstant -6 (Integer 4 [])))] (List (Integer 4 []))) (ListConstant [(IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) (IntegerUnaryMinus (IntegerConstant 2 (Integer 4 [])) (Integer 4 []) (IntegerConstant -2 (Integer 4 []))) (IntegerUnaryMinus (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) (IntegerConstant -3 (Integer 4 [])))] (List (Integer 4 [])))] (List (List (Integer 4 [])))) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))) ()) (= (Var 5 a) (SetLen (SetConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 []))] (Set (Integer 4 []))) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) ()) (= (Var 5 a) (DictLen (DictConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 []))] [(StringConstant "c" (Character 1 1 () [])) (StringConstant "b" (Character 1 1 () [])) (StringConstant "c" (Character 1 1 () []))] (Dict (Integer 4 []) (Character 1 1 () []))) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) ()) (= (Var 5 l) (ListConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 [])) (IntegerConstant 4 (Integer 4 []))] (List (Integer 4 []))) ()) (= (Var 5 a) (ListLen (Var 5 l) (Integer 4 []) ()) ()) (ListAppend (Var 5 l) (IntegerConstant 5 (Integer 4 []))) (= (Var 5 a) (ListLen (Var 5 l) (Integer 4 []) ()) ())] Source Public Implementation () .false. .false.), test_ord_chr: (Subroutine (SymbolTable 3 {a: (Variable 3 a Local () () Default (Integer 4 []) Source Public Required .false.), s: (Variable 3 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_ord_chr [] [(= (Var 3 a) (StringOrd (StringConstant "5" (Character 1 1 () [])) (Integer 4 []) (IntegerConstant 53 (Integer 4 []))) ()) (= (Var 3 s) (StringChr (IntegerConstant 43 (Integer 4 [])) (Character 1 1 () []) (StringConstant "+" (Character 1 1 () []))) ())] Source Public Implementation () .false. .false.), test_str: (Subroutine (SymbolTable 7 {s: (Variable 7 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_str [] [(= (Var 7 s) (StringConstant "" (Character 1 1 () [])) ()) (= (Var 7 s) (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToCharacter (Character 1 1 () []) (StringConstant "5" (Character 1 1 () []))) ()) (= (Var 7 s) (Cast (IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 []))) IntegerToCharacter (Character 1 1 () []) (StringConstant "-4" (Character 1 1 () []))) ()) (= (Var 7 s) (Cast (RealConstant 5.59999999999999964e+00 (Real 8 [])) RealToCharacter (Character 1 1 () []) (StringConstant "5.6" (Character 1 1 () []))) ()) (= (Var 7 s) (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToCharacter (Character 1 1 () []) (StringConstant "True" (Character 1 1 () []))) ()) (= (Var 7 s) (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToCharacter (Character 1 1 () []) (StringConstant "False" (Character 1 1 () []))) ()) (= (Var 7 s) (StringConstant "5346" (Character 1 4 () [])) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 13 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_4__abs: (ExternalSymbol 1 abs@__lpython_overloaded_4__abs 13 __lpython_overloaded_4__abs lpython_builtin [] __lpython_overloaded_4__abs Public), abs@__lpython_overloaded_6__abs: (ExternalSymbol 1 abs@__lpython_overloaded_6__abs 13 __lpython_overloaded_6__abs lpython_builtin [] __lpython_overloaded_6__abs Public), abs@__lpython_overloaded_8__abs: (ExternalSymbol 1 abs@__lpython_overloaded_8__abs 13 __lpython_overloaded_8__abs lpython_builtin [] __lpython_overloaded_8__abs Public), complex@__lpython_overloaded_5__complex: (ExternalSymbol 1 complex@__lpython_overloaded_5__complex 13 __lpython_overloaded_5__complex lpython_builtin [] __lpython_overloaded_5__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 13 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 90 {}) main_program [] []), test_abs: (Subroutine (SymbolTable 4 {a: (Variable 4 a Local () () Default (Integer 4 []) Source Public Required .false.), abs: (ExternalSymbol 4 abs 13 abs lpython_builtin [] abs Private), b: (Variable 4 b Local () () Default (Real 4 []) Source Public Required .false.), complex: (ExternalSymbol 4 complex 13 complex lpython_builtin [] complex Private)}) test_abs [] [(= (Var 4 a) (FunctionCall 1 abs@__lpython_overloaded_4__abs 4 abs [((IntegerConstant 5 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 5 (Integer 4 [])) ()) ()) (= (Var 4 a) (FunctionCall 1 abs@__lpython_overloaded_4__abs 4 abs [((IntegerUnaryMinus (IntegerConstant 500 (Integer 4 [])) (Integer 4 []) (IntegerConstant -500 (Integer 4 []))))] (Integer 4 []) (IntegerConstant 500 (Integer 4 [])) ()) ()) (= (Var 4 a) (FunctionCall 1 abs@__lpython_overloaded_6__abs 4 abs [((LogicalConstant .false. (Logical 4 [])))] (Integer 4 []) (IntegerConstant 0 (Integer 4 [])) ()) ()) (= (Var 4 a) (FunctionCall 1 abs@__lpython_overloaded_6__abs 4 abs [((LogicalConstant .true. (Logical 4 [])))] (Integer 4 []) (IntegerConstant 1 (Integer 4 [])) ()) ()) (= (Var 4 b) (Cast (FunctionCall 1 abs@__lpython_overloaded_0__abs 4 abs [((RealConstant 3.45000000000000018e+00 (Real 8 [])))] (Real 8 []) (RealConstant 3.45000000000000018e+00 (Real 8 [])) ()) RealToReal (Real 4 []) (RealConstant 3.45000000000000018e+00 (Real 4 []))) ()) (= (Var 4 b) (Cast (FunctionCall 1 abs@__lpython_overloaded_0__abs 4 abs [((RealUnaryMinus (RealConstant 5.34634000000000015e+03 (Real 8 [])) (Real 8 []) (RealConstant -5.34634000000000015e+03 (Real 8 []))))] (Real 8 []) (RealConstant 5.34634000000000015e+03 (Real 8 [])) ()) RealToReal (Real 4 []) (RealConstant 5.34634000000000015e+03 (Real 4 []))) ()) (= (Var 4 b) (Cast (FunctionCall 1 abs@__lpython_overloaded_8__abs 4 abs [((FunctionCall 1 complex@__lpython_overloaded_5__complex 4 complex [((RealConstant 3.45000000000000018e+00 (Real 8 []))) ((RealConstant 5.59999999999999964e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.45000000000000018e+00 5.59999999999999964e+00 (Complex 8 [])) ()))] (Real 8 []) (RealConstant 6.57742350772701823e+00 (Real 8 [])) ()) RealToReal (Real 4 []) (RealConstant 6.57742350772701823e+00 (Real 4 []))) ())] Source Public Implementation () .false. .false.), test_bool: (Subroutine (SymbolTable 6 {a: (Variable 6 a Local () () Default (Logical 4 []) Source Public Required .false.), complex: (ExternalSymbol 6 complex 13 complex lpython_builtin [] complex Private)}) test_bool [] [(= (Var 6 a) (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 6 a) (Cast (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) IntegerToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 6 a) (Cast (StringConstant "" (Character 1 0 () [])) CharacterToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 6 a) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 6 complex [((IntegerConstant 0 (Integer 4 []))) ((IntegerConstant 0 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ComplexToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (Assert (LogicalCompare (Var 6 a) Eq (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) ()) ()) (= (Var 6 a) (Cast (StringConstant "t" (Character 1 1 () [])) CharacterToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 6 a) (Cast (RealConstant 2.29999999999999982e+00 (Real 8 [])) RealToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (LogicalCompare (Var 6 a) Eq (LogicalConstant .true. (Logical 4 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_boz: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Character 1 -2 () []) Source Public Required .false.), bin: (ExternalSymbol 2 bin 13 bin lpython_builtin [] bin Private), hex: (ExternalSymbol 2 hex 13 hex lpython_builtin [] hex Private), oct: (ExternalSymbol 2 oct 13 oct lpython_builtin [] oct Private)}) test_boz [] [(= (Var 2 b) (FunctionCall 2 bin () [((IntegerConstant 5 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0b101" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 bin () [((IntegerConstant 64 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0b1000000" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 bin () [((IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0b1000010110" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 oct () [((IntegerConstant 8 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0o10" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 oct () [((IntegerConstant 56 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0o70" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 oct () [((IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0o1026" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 hex () [((IntegerConstant 42 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0x2a" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 hex () [((IntegerConstant 12648430 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0xc0ffee" (Character 1 1 () [])) ()) ()) (= (Var 2 b) (FunctionCall 2 hex () [((IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0x216" (Character 1 1 () [])) ()) ())] Source Public Implementation () .false. .false.), test_callable: (Subroutine (SymbolTable 8 {a: (Variable 8 a Local () () Default (Logical 4 []) Source Public Required .false.), b: (Variable 8 b Local () () Default (Integer 4 []) Source Public Required .false.)}) test_callable [] [(= (Var 8 b) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 8 a) (LogicalConstant .true. (Logical 4 [])) ()) (Assert (LogicalCompare (Var 8 a) Eq (LogicalConstant .true. (Logical 4 [])) (Logical 4 []) ()) ()) (= (Var 8 a) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (LogicalCompare (Var 8 a) Eq (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) ()) ()) (= (Var 8 a) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (LogicalCompare (Var 8 a) Eq (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_divmod: (Subroutine (SymbolTable 11 {a: (Variable 11 a Local () () Default (Tuple [(Integer 4 []) (Integer 4 [])]) Source Public Required .false.), divmod: (ExternalSymbol 11 divmod 13 divmod lpython_builtin [] divmod Private)}) test_divmod [] [(= (Var 11 a) (FunctionCall 11 divmod () [((IntegerConstant 9 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Tuple [(Integer 4 []) (Integer 4 [])]) (TupleConstant [(IntegerConstant 3 (Integer 4 [])) (IntegerConstant 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) ()) (= (Var 11 a) (FunctionCall 11 divmod () [((IntegerConstant 9 (Integer 4 []))) ((IntegerUnaryMinus (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) (IntegerConstant -3 (Integer 4 []))))] (Tuple [(Integer 4 []) (Integer 4 [])]) (TupleConstant [(IntegerConstant -3 (Integer 4 [])) (IntegerConstant 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) ()) (= (Var 11 a) (FunctionCall 11 divmod () [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Tuple [(Integer 4 []) (Integer 4 [])]) (TupleConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) ()) (= (Var 11 a) (FunctionCall 11 divmod () [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 5 (Integer 4 [])))] (Tuple [(Integer 4 []) (Integer 4 [])]) (TupleConstant [(IntegerConstant 0 (Integer 4 [])) (IntegerConstant 4 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) ()) (= (Var 11 a) (FunctionCall 11 divmod () [((IntegerConstant 0 (Integer 4 []))) ((IntegerConstant 5 (Integer 4 [])))] (Tuple [(Integer 4 []) (Integer 4 [])]) (TupleConstant [(IntegerConstant 0 (Integer 4 [])) (IntegerConstant 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) ())] Source Public Implementation () .false. .false.), test_float: (Subroutine (SymbolTable 10 {a: (Variable 10 a Local () () Default (Real 8 []) Source Public Required .false.)}) test_float [] [(= (Var 10 a) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) (= (Var 10 a) (RealConstant 4.55999999999999961e+00 (Real 8 [])) ()) (= (Var 10 a) (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToReal (Real 8 []) (RealConstant 5.00000000000000000e+00 (Real 8 []))) ()) (= (Var 10 a) (Cast (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) IntegerToReal (Real 8 []) (RealConstant -1.00000000000000000e+00 (Real 8 []))) ()) (= (Var 10 a) (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToReal (Real 8 []) (RealConstant 1.00000000000000000e+00 (Real 8 []))) ()) (= (Var 10 a) (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToReal (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))) ())] Source Public Implementation () .false. .false.), test_int: (Subroutine (SymbolTable 9 {a: (Variable 9 a Local () () Default (Integer 8 []) Source Public Required .false.)}) test_int [] [(= (Var 9 a) (IntegerConstant 0 (Integer 8 [])) ()) (= (Var 9 a) (Cast (RealConstant 4.55999999999999961e+00 (Real 8 [])) RealToInteger (Integer 8 []) (IntegerConstant 4 (Integer 8 []))) ()) (= (Var 9 a) (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (Cast (RealUnaryMinus (RealConstant 5.00000999999999962e+00 (Real 8 [])) (Real 8 []) (RealConstant -5.00000999999999962e+00 (Real 8 []))) RealToInteger (Integer 8 []) (IntegerConstant -5 (Integer 8 []))) ()) (= (Var 9 a) (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 8 []) (IntegerConstant 1 (Integer 8 []))) ()) (= (Var 9 a) (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 8 []) (IntegerConstant 0 (Integer 8 []))) ()) (= (Var 9 a) (IntegerConstant 5346 (Integer 8 [])) ())] Source Public Implementation () .false. .false.), test_len: (Subroutine (SymbolTable 5 {a: (Variable 5 a Local () () Default (Integer 4 []) Source Public Required .false.), l: (Variable 5 l Local () () Default (List (Integer 4 [])) Source Public Required .false.)}) test_len [] [(= (Var 5 a) (StringLen (StringConstant "" (Character 1 0 () [])) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) ()) (= (Var 5 a) (StringLen (StringConstant "test" (Character 1 4 () [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))) ()) (= (Var 5 a) (StringLen (StringConstant "this is a test" (Character 1 14 () [])) (Integer 4 []) (IntegerConstant 14 (Integer 4 []))) ()) (= (Var 5 a) (TupleLen (TupleConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 []) (Integer 4 [])])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) ()) (= (Var 5 a) (TupleLen (TupleConstant [(TupleConstant [(StringConstant "c" (Character 1 1 () [])) (StringConstant "b" (Character 1 1 () [])) (RealConstant 3.39999999999999991e+00 (Real 8 []))] (Tuple [(Character 1 1 () []) (Character 1 1 () []) (Real 8 [])])) (TupleConstant [(StringConstant "c" (Character 1 1 () [])) (IntegerConstant 3 (Integer 4 [])) (RealConstant 5.59999999999999964e+00 (Real 8 []))] (Tuple [(Character 1 1 () []) (Integer 4 []) (Real 8 [])]))] (Tuple [(Tuple [(Character 1 1 () []) (Character 1 1 () []) (Real 8 [])]) (Tuple [(Character 1 1 () []) (Integer 4 []) (Real 8 [])])])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))) ()) (= (Var 5 a) (ListLen (ListConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 []))] (List (Integer 4 []))) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) ()) (= (Var 5 a) (ListLen (ListConstant [(ListConstant [(IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 []))) (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) (IntegerUnaryMinus (IntegerConstant 6 (Integer 4 [])) (Integer 4 []) (IntegerConstant -6 (Integer 4 [])))] (List (Integer 4 []))) (ListConstant [(IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) (IntegerUnaryMinus (IntegerConstant 2 (Integer 4 [])) (Integer 4 []) (IntegerConstant -2 (Integer 4 []))) (IntegerUnaryMinus (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) (IntegerConstant -3 (Integer 4 [])))] (List (Integer 4 [])))] (List (List (Integer 4 [])))) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))) ()) (= (Var 5 a) (SetLen (SetConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 []))] (Set (Integer 4 []))) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) ()) (= (Var 5 a) (DictLen (DictConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 []))] [(StringConstant "c" (Character 1 1 () [])) (StringConstant "b" (Character 1 1 () [])) (StringConstant "c" (Character 1 1 () []))] (Dict (Integer 4 []) (Character 1 1 () []))) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) ()) (= (Var 5 l) (ListConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 [])) (IntegerConstant 4 (Integer 4 []))] (List (Integer 4 []))) ()) (= (Var 5 a) (ListLen (Var 5 l) (Integer 4 []) ()) ()) (ListAppend (Var 5 l) (IntegerConstant 5 (Integer 4 []))) (= (Var 5 a) (ListLen (Var 5 l) (Integer 4 []) ()) ())] Source Public Implementation () .false. .false.), test_ord_chr: (Subroutine (SymbolTable 3 {a: (Variable 3 a Local () () Default (Integer 4 []) Source Public Required .false.), s: (Variable 3 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_ord_chr [] [(= (Var 3 a) (StringOrd (StringConstant "5" (Character 1 1 () [])) (Integer 4 []) (IntegerConstant 53 (Integer 4 []))) ()) (= (Var 3 s) (StringChr (IntegerConstant 43 (Integer 4 [])) (Character 1 1 () []) (StringConstant "+" (Character 1 1 () []))) ())] Source Public Implementation () .false. .false.), test_str: (Subroutine (SymbolTable 7 {s: (Variable 7 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_str [] [(= (Var 7 s) (StringConstant "" (Character 1 1 () [])) ()) (= (Var 7 s) (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToCharacter (Character 1 1 () []) (StringConstant "5" (Character 1 1 () []))) ()) (= (Var 7 s) (Cast (IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 []))) IntegerToCharacter (Character 1 1 () []) (StringConstant "-4" (Character 1 1 () []))) ()) (= (Var 7 s) (Cast (RealConstant 5.59999999999999964e+00 (Real 8 [])) RealToCharacter (Character 1 1 () []) (StringConstant "5.6" (Character 1 1 () []))) ()) (= (Var 7 s) (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToCharacter (Character 1 1 () []) (StringConstant "True" (Character 1 1 () []))) ()) (= (Var 7 s) (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToCharacter (Character 1 1 () []) (StringConstant "False" (Character 1 1 () []))) ()) (= (Var 7 s) (StringConstant "5346" (Character 1 4 () [])) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-elemental_01-b58df26.json b/tests/reference/asr-elemental_01-b58df26.json index b28031741a..d030ce237c 100644 --- a/tests/reference/asr-elemental_01-b58df26.json +++ b/tests/reference/asr-elemental_01-b58df26.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-elemental_01-b58df26.stdout", - "stdout_hash": "15427f36dad87379bfdd0cd738b5f633d5b15fe517db961ca218d5db", + "stdout_hash": "04c9c971491d2fcbad688ca2a88ac38cb5ae071416eb8229d2c70cde", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-elemental_01-b58df26.stdout b/tests/reference/asr-elemental_01-b58df26.stdout index ea1cee920e..1a7fcd5146 100644 --- a/tests/reference/asr-elemental_01-b58df26.stdout +++ b/tests/reference/asr-elemental_01-b58df26.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 111 {}) _lpython_main_program [] [(SubroutineCall 1 elemental_sin () [] ()) (SubroutineCall 1 elemental_cos () [] ()) (SubroutineCall 1 elemental_trig_identity () [] ()) (SubroutineCall 1 elemental_sum () [] ()) (SubroutineCall 1 elemental_mul () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 39 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_1__abs: (ExternalSymbol 1 abs@__lpython_overloaded_1__abs 39 __lpython_overloaded_1__abs lpython_builtin [] __lpython_overloaded_1__abs Public), cos: (ExternalSymbol 1 cos 3 cos numpy [] cos Public), cos@__lpython_overloaded_0__cos: (ExternalSymbol 1 cos@__lpython_overloaded_0__cos 3 __lpython_overloaded_0__cos numpy [] __lpython_overloaded_0__cos Public), cos@__lpython_overloaded_1__cos: (ExternalSymbol 1 cos@__lpython_overloaded_1__cos 3 __lpython_overloaded_1__cos numpy [] __lpython_overloaded_1__cos Public), elemental_cos: (Subroutine (SymbolTable 36 {array2d: (Variable 36 array2d Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 []))))]) Source Public Required .false.), cos2d: (Variable 36 cos2d Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 []))))]) Source Public Required .false.), i: (Variable 36 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 36 j Local () () Default (Integer 4 []) Source Public Required .false.)}) elemental_cos [] [(DoLoop ((Var 36 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 36 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 36 array2d) [(() (Var 36 i) ()) (() (Var 36 j) ())] (Real 8 []) ()) (Cast (IntegerBinOp (Var 36 i) Add (Var 36 j) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) ())])]) (= (Var 36 cos2d) (RealBinOp (FunctionCall 1 cos@__lpython_overloaded_0__cos 1 cos [((Var 36 array2d))] (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 []))))]) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 []))))]) ()) ()) (SubroutineCall 1 verify2d () [((Var 36 array2d)) ((Var 36 cos2d)) ((IntegerConstant 256 (Integer 4 []))) ((IntegerConstant 64 (Integer 4 [])))] ())] Source Public Implementation () .false. .false.), elemental_mul: (Subroutine (SymbolTable 34 {array_a: (Variable 34 array_a Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), array_b: (Variable 34 array_b Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), array_c: (Variable 34 array_c Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), i: (Variable 34 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 34 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 34 k Local () () Default (Integer 4 []) Source Public Required .false.)}) elemental_mul [] [(DoLoop ((Var 34 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 34 array_a) [(() (Var 34 i) ())] (Real 8 []) ()) (Cast (Var 34 i) IntegerToReal (Real 8 []) ()) ())]) (DoLoop ((Var 34 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 34 array_b) [(() (Var 34 j) ())] (Real 8 []) ()) (Cast (IntegerBinOp (Var 34 j) Add (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) ())]) (= (Var 34 array_c) (RealBinOp (RealBinOp (RealBinOp (Var 34 array_a) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) Mul (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) Mul (RealBinOp (Var 34 array_b) Pow (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) ()) (SubroutineCall 1 verify1d_mul () [((Var 34 array_a)) ((Var 34 array_b)) ((Var 34 array_c)) ((IntegerConstant 100 (Integer 4 [])))] ())] Source Public Implementation () .false. .false.), elemental_sin: (Subroutine (SymbolTable 35 {array1d: (Variable 35 array1d Local () () Default (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) Source Public Required .false.), arraynd: (Variable 35 arraynd Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.), i: (Variable 35 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 35 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 35 k Local () () Default (Integer 4 []) Source Public Required .false.), sin1d: (Variable 35 sin1d Local () () Default (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) Source Public Required .false.), sinnd: (Variable 35 sinnd Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.)}) elemental_sin [] [(DoLoop ((Var 35 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 35 array1d) [(() (Var 35 i) ())] (Real 4 []) ()) (Cast (Cast (Var 35 i) IntegerToReal (Real 8 []) ()) RealToReal (Real 4 []) ()) ())]) (= (Var 35 sin1d) (FunctionCall 1 sin@__lpython_overloaded_1__sin 1 sin [((FunctionCall 1 sin@__lpython_overloaded_1__sin 1 sin [((Var 35 array1d))] (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) () ()))] (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) () ()) ()) (SubroutineCall 1 verify1d () [((Var 35 array1d)) ((Var 35 sin1d)) ((IntegerConstant 256 (Integer 4 [])))] ()) (DoLoop ((Var 35 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 35 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 35 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 35 arraynd) [(() (Var 35 i) ()) (() (Var 35 j) ()) (() (Var 35 k) ())] (Real 8 []) ()) (Cast (IntegerBinOp (IntegerBinOp (Var 35 i) Add (Var 35 j) (Integer 4 []) ()) Add (Var 35 k) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) ())])])]) (= (Var 35 sinnd) (RealBinOp (FunctionCall 1 sin@__lpython_overloaded_0__sin 1 sin [((Var 35 arraynd))] (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) ()) ()) (SubroutineCall 1 verifynd () [((Var 35 arraynd)) ((Var 35 sinnd)) ((IntegerConstant 256 (Integer 4 []))) ((IntegerConstant 64 (Integer 4 []))) ((IntegerConstant 16 (Integer 4 [])))] ())] Source Public Implementation () .false. .false.), elemental_sum: (Subroutine (SymbolTable 33 {array_a: (Variable 33 array_a Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), array_b: (Variable 33 array_b Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), array_c: (Variable 33 array_c Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), i: (Variable 33 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 33 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 33 k Local () () Default (Integer 4 []) Source Public Required .false.)}) elemental_sum [] [(DoLoop ((Var 33 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 33 array_a) [(() (Var 33 i) ())] (Real 8 []) ()) (Cast (Var 33 i) IntegerToReal (Real 8 []) ()) ())]) (DoLoop ((Var 33 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 33 array_b) [(() (Var 33 j) ())] (Real 8 []) ()) (Cast (IntegerBinOp (Var 33 j) Add (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) ())]) (= (Var 33 array_c) (RealBinOp (RealBinOp (Var 33 array_a) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) Add (RealBinOp (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) Mul (RealBinOp (Var 33 array_b) Pow (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) ()) (SubroutineCall 1 verify1d_sum () [((Var 33 array_a)) ((Var 33 array_b)) ((Var 33 array_c)) ((IntegerConstant 100 (Integer 4 [])))] ())] Source Public Implementation () .false. .false.), elemental_trig_identity: (Subroutine (SymbolTable 37 {abs: (ExternalSymbol 37 abs 39 abs lpython_builtin [] abs Private), arraynd: (Variable 37 arraynd Local () () Default (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) Source Public Required .false.), eps: (Variable 37 eps Local () () Default (Real 4 []) Source Public Required .false.), i: (Variable 37 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 37 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 37 k Local () () Default (Integer 4 []) Source Public Required .false.), l: (Variable 37 l Local () () Default (Integer 4 []) Source Public Required .false.), newshape: (Variable 37 newshape Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 1 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 1 (Integer 4 []))))]) Source Public Required .false.), observed: (Variable 37 observed Local () () Default (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) Source Public Required .false.), observed1d: (Variable 37 observed1d Local () () Default (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 65536 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 65535 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 65536 (Integer 4 []))))]) Source Public Required .false.)}) elemental_trig_identity [] [(= (Var 37 eps) (Cast (RealConstant 9.99999999999999955e-07 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 9.99999999999999955e-07 (Real 4 []))) ()) (DoLoop ((Var 37 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 37 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 37 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 37 l) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 37 arraynd) [(() (Var 37 i) ()) (() (Var 37 j) ()) (() (Var 37 k) ()) (() (Var 37 l) ())] (Real 4 []) ()) (Cast (Cast (IntegerBinOp (IntegerBinOp (IntegerBinOp (Var 37 i) Add (Var 37 j) (Integer 4 []) ()) Add (Var 37 k) (Integer 4 []) ()) Add (Var 37 l) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) RealToReal (Real 4 []) ()) ())])])])]) (= (Var 37 observed) (RealBinOp (RealBinOp (FunctionCall 1 sin@__lpython_overloaded_1__sin 1 sin [((Var 37 arraynd))] (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) ()) (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) ()) Add (RealBinOp (FunctionCall 1 cos@__lpython_overloaded_1__cos 1 cos [((Var 37 arraynd))] (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) ()) (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) ()) (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) ()) ()) (= (ArrayItem (Var 37 newshape) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 65536 (Integer 4 [])) ()) (= (Var 37 observed1d) (ArrayReshape (Var 37 observed) (Var 37 newshape) (Real 4 [(() ())]) ()) ()) (DoLoop ((Var 37 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 65536 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 65535 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 37 abs [((RealBinOp (Cast (ArrayItem (Var 37 observed1d) [(() (Var 37 i) ())] (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealConstant 1.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Cast (Var 37 eps) RealToReal (Real 8 []) ()) (Logical 4 []) ()) ())])] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 110 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), numpy: (Module (SymbolTable 3 {__lpython_overloaded_0__cos: (Function (SymbolTable 9 {_lpython_return_variable: (Variable 9 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 9 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__cos [(Var 9 x)] [(= (Var 9 _lpython_return_variable) (FunctionCall 3 _lfortran_dcos () [((Var 9 x))] (Real 8 []) () ()) ()) (Return)] (Var 9 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log: (Function (SymbolTable 19 {_lpython_return_variable: (Variable 19 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 19 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log [(Var 19 x)] [(= (Var 19 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog () [((Var 19 x))] (Real 8 []) () ()) ()) (Return)] (Var 19 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log10: (Function (SymbolTable 23 {_lpython_return_variable: (Variable 23 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 23 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log10 [(Var 23 x)] [(= (Var 23 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog10 () [((Var 23 x))] (Real 8 []) () ()) ()) (Return)] (Var 23 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log2: (Function (SymbolTable 26 {_lpython_return_variable: (Variable 26 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 26 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log2 [(Var 26 x)] [(= (Var 26 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_dlog () [((Var 26 x))] (Real 8 []) () ()) Div (FunctionCall 3 _lfortran_dlog () [((RealConstant 2.00000000000000000e+00 (Real 8 [])))] (Real 8 []) () ()) (Real 8 []) ()) ()) (Return)] (Var 26 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sin: (Function (SymbolTable 5 {_lpython_return_variable: (Variable 5 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 5 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sin [(Var 5 x)] [(= (Var 5 _lpython_return_variable) (FunctionCall 3 _lfortran_dsin () [((Var 5 x))] (Real 8 []) () ()) ()) (Return)] (Var 5 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sqrt: (Function (SymbolTable 12 {_lpython_return_variable: (Variable 12 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 12 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sqrt [(Var 12 x)] [(= (Var 12 _lpython_return_variable) (RealBinOp (Var 12 x) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) ()) (Return)] (Var 12 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__tan: (Function (SymbolTable 15 {_lpython_return_variable: (Variable 15 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 15 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__tan [(Var 15 x)] [(= (Var 15 _lpython_return_variable) (FunctionCall 3 _lfortran_dtan () [((Var 15 x))] (Real 8 []) () ()) ()) (Return)] (Var 15 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__cos: (Function (SymbolTable 11 {_lpython_return_variable: (Variable 11 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 11 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__cos [(Var 11 x)] [(= (Var 11 _lpython_return_variable) (FunctionCall 3 _lfortran_scos () [((Var 11 x))] (Real 4 []) () ()) ()) (Return)] (Var 11 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log: (Function (SymbolTable 21 {_lpython_return_variable: (Variable 21 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 21 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log [(Var 21 x)] [(= (Var 21 _lpython_return_variable) (FunctionCall 3 _lfortran_slog () [((Var 21 x))] (Real 4 []) () ()) ()) (Return)] (Var 21 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log10: (Function (SymbolTable 25 {_lpython_return_variable: (Variable 25 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 25 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log10 [(Var 25 x)] [(= (Var 25 _lpython_return_variable) (FunctionCall 3 _lfortran_slog10 () [((Var 25 x))] (Real 4 []) () ()) ()) (Return)] (Var 25 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log2: (Function (SymbolTable 27 {_lpython_return_variable: (Variable 27 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 27 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log2 [(Var 27 x)] [(= (Var 27 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_slog () [((Var 27 x))] (Real 4 []) () ()) Div (FunctionCall 3 _lfortran_slog () [((Cast (RealConstant 2.00000000000000000e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 2.00000000000000000e+00 (Real 4 []))))] (Real 4 []) () ()) (Real 4 []) ()) ()) (Return)] (Var 27 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sin: (Function (SymbolTable 7 {_lpython_return_variable: (Variable 7 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 7 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sin [(Var 7 x)] [(= (Var 7 _lpython_return_variable) (FunctionCall 3 _lfortran_ssin () [((Var 7 x))] (Real 4 []) () ()) ()) (Return)] (Var 7 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sqrt: (Function (SymbolTable 13 {_lpython_return_variable: (Variable 13 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), result: (Variable 13 result Local () () Default (Real 4 []) Source Public Required .false.), x: (Variable 13 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sqrt [(Var 13 x)] [(= (Var 13 result) (Cast (RealBinOp (Cast (Var 13 x) RealToReal (Real 8 []) ()) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) RealToReal (Real 4 []) ()) ()) (= (Var 13 _lpython_return_variable) (Var 13 result) ()) (Return)] (Var 13 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__tan: (Function (SymbolTable 17 {_lpython_return_variable: (Variable 17 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 17 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__tan [(Var 17 x)] [(= (Var 17 _lpython_return_variable) (FunctionCall 3 _lfortran_stan () [((Var 17 x))] (Real 4 []) () ()) ()) (Return)] (Var 17 _lpython_return_variable) Source Public Implementation .true. ()), _lfortran_dcos: (Function (SymbolTable 8 {_lpython_return_variable: (Variable 8 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 8 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dcos [(Var 8 x)] [] (Var 8 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog: (Function (SymbolTable 18 {_lpython_return_variable: (Variable 18 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 18 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog [(Var 18 x)] [] (Var 18 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog10: (Function (SymbolTable 22 {_lpython_return_variable: (Variable 22 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 22 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog10 [(Var 22 x)] [] (Var 22 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dsin: (Function (SymbolTable 4 {_lpython_return_variable: (Variable 4 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 4 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dsin [(Var 4 x)] [] (Var 4 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dtan: (Function (SymbolTable 14 {_lpython_return_variable: (Variable 14 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 14 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dtan [(Var 14 x)] [] (Var 14 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_scos: (Function (SymbolTable 10 {_lpython_return_variable: (Variable 10 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 10 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_scos [(Var 10 x)] [] (Var 10 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog: (Function (SymbolTable 20 {_lpython_return_variable: (Variable 20 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 20 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog [(Var 20 x)] [] (Var 20 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog10: (Function (SymbolTable 24 {_lpython_return_variable: (Variable 24 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 24 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog10 [(Var 24 x)] [] (Var 24 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_ssin: (Function (SymbolTable 6 {_lpython_return_variable: (Variable 6 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 6 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_ssin [(Var 6 x)] [] (Var 6 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_stan: (Function (SymbolTable 16 {_lpython_return_variable: (Variable 16 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 16 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_stan [(Var 16 x)] [] (Var 16 _lpython_return_variable) BindC Public Interface .false. ()), cos: (GenericProcedure 3 cos [3 __lpython_overloaded_0__cos 3 __lpython_overloaded_1__cos] Public), log: (GenericProcedure 3 log [3 __lpython_overloaded_0__log 3 __lpython_overloaded_1__log] Public), log10: (GenericProcedure 3 log10 [3 __lpython_overloaded_0__log10 3 __lpython_overloaded_1__log10] Public), log2: (GenericProcedure 3 log2 [3 __lpython_overloaded_0__log2 3 __lpython_overloaded_1__log2] Public), sin: (GenericProcedure 3 sin [3 __lpython_overloaded_0__sin 3 __lpython_overloaded_1__sin] Public), sqrt: (GenericProcedure 3 sqrt [3 __lpython_overloaded_0__sqrt 3 __lpython_overloaded_1__sqrt] Public), tan: (GenericProcedure 3 tan [3 __lpython_overloaded_0__tan 3 __lpython_overloaded_1__tan] Public)}) numpy [] .false. .false.), sin: (ExternalSymbol 1 sin 3 sin numpy [] sin Public), sin@__lpython_overloaded_0__sin: (ExternalSymbol 1 sin@__lpython_overloaded_0__sin 3 __lpython_overloaded_0__sin numpy [] __lpython_overloaded_0__sin Public), sin@__lpython_overloaded_1__sin: (ExternalSymbol 1 sin@__lpython_overloaded_1__sin 3 __lpython_overloaded_1__sin numpy [] __lpython_overloaded_1__sin Public), verify1d: (Subroutine (SymbolTable 28 {abs: (ExternalSymbol 28 abs 39 abs lpython_builtin [] abs Private), array: (Variable 28 array InOut () () Default (Real 4 [(() ())]) Source Public Required .false.), eps: (Variable 28 eps Local () () Default (Real 4 []) Source Public Required .false.), i: (Variable 28 i Local () () Default (Integer 4 []) Source Public Required .false.), result: (Variable 28 result InOut () () Default (Real 4 [(() ())]) Source Public Required .false.), size: (Variable 28 size In () () Default (Integer 4 []) Source Public Required .false.)}) verify1d [(Var 28 array) (Var 28 result) (Var 28 size)] [(= (Var 28 eps) (Cast (RealConstant 9.99999999999999955e-07 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 9.99999999999999955e-07 (Real 4 []))) ()) (DoLoop ((Var 28 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 28 size) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_1__abs 28 abs [((RealBinOp (FunctionCall 1 sin@__lpython_overloaded_1__sin 1 sin [((FunctionCall 1 sin@__lpython_overloaded_1__sin 1 sin [((ArrayItem (Var 28 array) [(() (Var 28 i) ())] (Real 4 []) ()))] (Real 4 []) () ()))] (Real 4 []) () ()) Sub (ArrayItem (Var 28 result) [(() (Var 28 i) ())] (Real 4 []) ()) (Real 4 []) ()))] (Real 4 []) () ()) LtE (Var 28 eps) (Logical 4 []) ()) ())])] Source Public Implementation () .false. .false.), verify1d_mul: (Subroutine (SymbolTable 32 {abs: (ExternalSymbol 32 abs 39 abs lpython_builtin [] abs Private), array_a: (Variable 32 array_a InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), array_b: (Variable 32 array_b InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), eps: (Variable 32 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 32 i Local () () Default (Integer 4 []) Source Public Required .false.), result: (Variable 32 result InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), size: (Variable 32 size In () () Default (Integer 4 []) Source Public Required .false.)}) verify1d_mul [(Var 32 array_a) (Var 32 array_b) (Var 32 result) (Var 32 size)] [(= (Var 32 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (DoLoop ((Var 32 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 32 size) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 32 abs [((RealBinOp (RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 32 array_a) [(() (Var 32 i) ())] (Real 8 []) ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Mul (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Mul (RealBinOp (ArrayItem (Var 32 array_b) [(() (Var 32 i) ())] (Real 8 []) ()) Pow (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) Sub (ArrayItem (Var 32 result) [(() (Var 32 i) ())] (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 32 eps) (Logical 4 []) ()) ())])] Source Public Implementation () .false. .false.), verify1d_sum: (Subroutine (SymbolTable 31 {abs: (ExternalSymbol 31 abs 39 abs lpython_builtin [] abs Private), array_a: (Variable 31 array_a InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), array_b: (Variable 31 array_b InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), eps: (Variable 31 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 31 i Local () () Default (Integer 4 []) Source Public Required .false.), result: (Variable 31 result InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), size: (Variable 31 size In () () Default (Integer 4 []) Source Public Required .false.)}) verify1d_sum [(Var 31 array_a) (Var 31 array_b) (Var 31 result) (Var 31 size)] [(= (Var 31 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (DoLoop ((Var 31 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 31 size) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 31 abs [((RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 31 array_a) [(() (Var 31 i) ())] (Real 8 []) ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Add (RealBinOp (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Mul (RealBinOp (ArrayItem (Var 31 array_b) [(() (Var 31 i) ())] (Real 8 []) ()) Pow (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) Sub (ArrayItem (Var 31 result) [(() (Var 31 i) ())] (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 31 eps) (Logical 4 []) ()) ())])] Source Public Implementation () .false. .false.), verify2d: (Subroutine (SymbolTable 30 {abs: (ExternalSymbol 30 abs 39 abs lpython_builtin [] abs Private), array: (Variable 30 array InOut () () Default (Real 8 [(() ()) (() ())]) Source Public Required .false.), eps: (Variable 30 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 30 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 30 j Local () () Default (Integer 4 []) Source Public Required .false.), result: (Variable 30 result InOut () () Default (Real 8 [(() ()) (() ())]) Source Public Required .false.), size1: (Variable 30 size1 In () () Default (Integer 4 []) Source Public Required .false.), size2: (Variable 30 size2 In () () Default (Integer 4 []) Source Public Required .false.)}) verify2d [(Var 30 array) (Var 30 result) (Var 30 size1) (Var 30 size2)] [(= (Var 30 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (DoLoop ((Var 30 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 30 size1) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 30 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 30 size2) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 30 abs [((RealBinOp (RealBinOp (FunctionCall 1 cos@__lpython_overloaded_0__cos 1 cos [((ArrayItem (Var 30 array) [(() (Var 30 i) ()) (() (Var 30 j) ())] (Real 8 []) ()))] (Real 8 []) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (ArrayItem (Var 30 result) [(() (Var 30 i) ()) (() (Var 30 j) ())] (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 30 eps) (Logical 4 []) ()) ())])])] Source Public Implementation () .false. .false.), verifynd: (Subroutine (SymbolTable 29 {abs: (ExternalSymbol 29 abs 39 abs lpython_builtin [] abs Private), array: (Variable 29 array InOut () () Default (Real 8 [(() ()) (() ()) (() ())]) Source Public Required .false.), eps: (Variable 29 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 29 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 29 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 29 k Local () () Default (Integer 4 []) Source Public Required .false.), result: (Variable 29 result InOut () () Default (Real 8 [(() ()) (() ()) (() ())]) Source Public Required .false.), size1: (Variable 29 size1 In () () Default (Integer 4 []) Source Public Required .false.), size2: (Variable 29 size2 In () () Default (Integer 4 []) Source Public Required .false.), size3: (Variable 29 size3 In () () Default (Integer 4 []) Source Public Required .false.)}) verifynd [(Var 29 array) (Var 29 result) (Var 29 size1) (Var 29 size2) (Var 29 size3)] [(= (Var 29 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (DoLoop ((Var 29 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 29 size1) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 29 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 29 size2) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 29 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 29 size3) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 29 abs [((RealBinOp (RealBinOp (FunctionCall 1 sin@__lpython_overloaded_0__sin 1 sin [((ArrayItem (Var 29 array) [(() (Var 29 i) ()) (() (Var 29 j) ()) (() (Var 29 k) ())] (Real 8 []) ()))] (Real 8 []) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (ArrayItem (Var 29 result) [(() (Var 29 i) ()) (() (Var 29 j) ()) (() (Var 29 k) ())] (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 29 eps) (Logical 4 []) ()) ())])])])] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 117 {}) _lpython_main_program [] [(SubroutineCall 1 elemental_sin () [] ()) (SubroutineCall 1 elemental_cos () [] ()) (SubroutineCall 1 elemental_trig_identity () [] ()) (SubroutineCall 1 elemental_sum () [] ()) (SubroutineCall 1 elemental_mul () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 39 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_1__abs: (ExternalSymbol 1 abs@__lpython_overloaded_1__abs 39 __lpython_overloaded_1__abs lpython_builtin [] __lpython_overloaded_1__abs Public), cos: (ExternalSymbol 1 cos 3 cos numpy [] cos Public), cos@__lpython_overloaded_0__cos: (ExternalSymbol 1 cos@__lpython_overloaded_0__cos 3 __lpython_overloaded_0__cos numpy [] __lpython_overloaded_0__cos Public), cos@__lpython_overloaded_1__cos: (ExternalSymbol 1 cos@__lpython_overloaded_1__cos 3 __lpython_overloaded_1__cos numpy [] __lpython_overloaded_1__cos Public), elemental_cos: (Subroutine (SymbolTable 36 {array2d: (Variable 36 array2d Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 []))))]) Source Public Required .false.), cos2d: (Variable 36 cos2d Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 []))))]) Source Public Required .false.), i: (Variable 36 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 36 j Local () () Default (Integer 4 []) Source Public Required .false.)}) elemental_cos [] [(DoLoop ((Var 36 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 36 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 36 array2d) [(() (Var 36 i) ()) (() (Var 36 j) ())] (Real 8 []) ()) (Cast (IntegerBinOp (Var 36 i) Add (Var 36 j) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) ())])]) (= (Var 36 cos2d) (RealBinOp (FunctionCall 1 cos@__lpython_overloaded_0__cos 1 cos [((Var 36 array2d))] (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 []))))]) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 []))))]) ()) ()) (SubroutineCall 1 verify2d () [((Var 36 array2d)) ((Var 36 cos2d)) ((IntegerConstant 256 (Integer 4 []))) ((IntegerConstant 64 (Integer 4 [])))] ())] Source Public Implementation () .false. .false.), elemental_mul: (Subroutine (SymbolTable 34 {array_a: (Variable 34 array_a Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), array_b: (Variable 34 array_b Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), array_c: (Variable 34 array_c Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), i: (Variable 34 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 34 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 34 k Local () () Default (Integer 4 []) Source Public Required .false.)}) elemental_mul [] [(DoLoop ((Var 34 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 34 array_a) [(() (Var 34 i) ())] (Real 8 []) ()) (Cast (Var 34 i) IntegerToReal (Real 8 []) ()) ())]) (DoLoop ((Var 34 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 34 array_b) [(() (Var 34 j) ())] (Real 8 []) ()) (Cast (IntegerBinOp (Var 34 j) Add (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) ())]) (= (Var 34 array_c) (RealBinOp (RealBinOp (RealBinOp (Var 34 array_a) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) Mul (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) Mul (RealBinOp (Var 34 array_b) Pow (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) ()) (SubroutineCall 1 verify1d_mul () [((Var 34 array_a)) ((Var 34 array_b)) ((Var 34 array_c)) ((IntegerConstant 100 (Integer 4 [])))] ())] Source Public Implementation () .false. .false.), elemental_sin: (Subroutine (SymbolTable 35 {array1d: (Variable 35 array1d Local () () Default (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) Source Public Required .false.), arraynd: (Variable 35 arraynd Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.), i: (Variable 35 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 35 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 35 k Local () () Default (Integer 4 []) Source Public Required .false.), sin1d: (Variable 35 sin1d Local () () Default (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) Source Public Required .false.), sinnd: (Variable 35 sinnd Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.)}) elemental_sin [] [(DoLoop ((Var 35 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 35 array1d) [(() (Var 35 i) ())] (Real 4 []) ()) (Cast (Cast (Var 35 i) IntegerToReal (Real 8 []) ()) RealToReal (Real 4 []) ()) ())]) (= (Var 35 sin1d) (FunctionCall 1 sin@__lpython_overloaded_1__sin 1 sin [((FunctionCall 1 sin@__lpython_overloaded_1__sin 1 sin [((Var 35 array1d))] (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) () ()))] (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) () ()) ()) (SubroutineCall 1 verify1d () [((Var 35 array1d)) ((Var 35 sin1d)) ((IntegerConstant 256 (Integer 4 [])))] ()) (DoLoop ((Var 35 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 35 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 35 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 35 arraynd) [(() (Var 35 i) ()) (() (Var 35 j) ()) (() (Var 35 k) ())] (Real 8 []) ()) (Cast (IntegerBinOp (IntegerBinOp (Var 35 i) Add (Var 35 j) (Integer 4 []) ()) Add (Var 35 k) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) ())])])]) (= (Var 35 sinnd) (RealBinOp (FunctionCall 1 sin@__lpython_overloaded_0__sin 1 sin [((Var 35 arraynd))] (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) ()) ()) (SubroutineCall 1 verifynd () [((Var 35 arraynd)) ((Var 35 sinnd)) ((IntegerConstant 256 (Integer 4 []))) ((IntegerConstant 64 (Integer 4 []))) ((IntegerConstant 16 (Integer 4 [])))] ())] Source Public Implementation () .false. .false.), elemental_sum: (Subroutine (SymbolTable 33 {array_a: (Variable 33 array_a Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), array_b: (Variable 33 array_b Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), array_c: (Variable 33 array_c Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) Source Public Required .false.), i: (Variable 33 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 33 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 33 k Local () () Default (Integer 4 []) Source Public Required .false.)}) elemental_sum [] [(DoLoop ((Var 33 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 33 array_a) [(() (Var 33 i) ())] (Real 8 []) ()) (Cast (Var 33 i) IntegerToReal (Real 8 []) ()) ())]) (DoLoop ((Var 33 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 33 array_b) [(() (Var 33 j) ())] (Real 8 []) ()) (Cast (IntegerBinOp (Var 33 j) Add (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) ())]) (= (Var 33 array_c) (RealBinOp (RealBinOp (Var 33 array_a) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) Add (RealBinOp (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) Mul (RealBinOp (Var 33 array_b) Pow (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToReal (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 100 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 99 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 100 (Integer 4 []))))]) ()) ()) (SubroutineCall 1 verify1d_sum () [((Var 33 array_a)) ((Var 33 array_b)) ((Var 33 array_c)) ((IntegerConstant 100 (Integer 4 [])))] ())] Source Public Implementation () .false. .false.), elemental_trig_identity: (Subroutine (SymbolTable 37 {abs: (ExternalSymbol 37 abs 39 abs lpython_builtin [] abs Private), arraynd: (Variable 37 arraynd Local () () Default (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) Source Public Required .false.), eps: (Variable 37 eps Local () () Default (Real 4 []) Source Public Required .false.), i: (Variable 37 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 37 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 37 k Local () () Default (Integer 4 []) Source Public Required .false.), l: (Variable 37 l Local () () Default (Integer 4 []) Source Public Required .false.), newshape: (Variable 37 newshape Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 1 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 1 (Integer 4 []))))]) Source Public Required .false.), observed: (Variable 37 observed Local () () Default (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) Source Public Required .false.), observed1d: (Variable 37 observed1d Local () () Default (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 65536 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 65535 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 65536 (Integer 4 []))))]) Source Public Required .false.)}) elemental_trig_identity [] [(= (Var 37 eps) (Cast (RealConstant 9.99999999999999955e-07 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 9.99999999999999955e-07 (Real 4 []))) ()) (DoLoop ((Var 37 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 37 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 37 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 37 l) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 37 arraynd) [(() (Var 37 i) ()) (() (Var 37 j) ()) (() (Var 37 k) ()) (() (Var 37 l) ())] (Real 4 []) ()) (Cast (Cast (IntegerBinOp (IntegerBinOp (IntegerBinOp (Var 37 i) Add (Var 37 j) (Integer 4 []) ()) Add (Var 37 k) (Integer 4 []) ()) Add (Var 37 l) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) RealToReal (Real 4 []) ()) ())])])])]) (= (Var 37 observed) (RealBinOp (RealBinOp (FunctionCall 1 sin@__lpython_overloaded_1__sin 1 sin [((Var 37 arraynd))] (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) ()) (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) ()) Add (RealBinOp (FunctionCall 1 cos@__lpython_overloaded_1__cos 1 cos [((Var 37 arraynd))] (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) ()) (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) ()) (Real 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 64 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 63 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 64 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 32 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 31 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 32 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 8 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 7 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 []))))]) ()) ()) (= (ArrayItem (Var 37 newshape) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 65536 (Integer 4 [])) ()) (= (Var 37 observed1d) (ArrayReshape (Var 37 observed) (Var 37 newshape) (Real 4 [(() ())]) ()) ()) (DoLoop ((Var 37 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 65536 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 65535 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 37 abs [((RealBinOp (Cast (ArrayItem (Var 37 observed1d) [(() (Var 37 i) ())] (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealConstant 1.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Cast (Var 37 eps) RealToReal (Real 8 []) ()) (Logical 4 []) ()) ())])] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 116 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), numpy: (Module (SymbolTable 3 {__lpython_overloaded_0__cos: (Function (SymbolTable 9 {_lpython_return_variable: (Variable 9 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 9 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__cos [(Var 9 x)] [(= (Var 9 _lpython_return_variable) (FunctionCall 3 _lfortran_dcos () [((Var 9 x))] (Real 8 []) () ()) ()) (Return)] (Var 9 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log: (Function (SymbolTable 19 {_lpython_return_variable: (Variable 19 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 19 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log [(Var 19 x)] [(= (Var 19 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog () [((Var 19 x))] (Real 8 []) () ()) ()) (Return)] (Var 19 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log10: (Function (SymbolTable 23 {_lpython_return_variable: (Variable 23 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 23 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log10 [(Var 23 x)] [(= (Var 23 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog10 () [((Var 23 x))] (Real 8 []) () ()) ()) (Return)] (Var 23 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log2: (Function (SymbolTable 26 {_lpython_return_variable: (Variable 26 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 26 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log2 [(Var 26 x)] [(= (Var 26 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_dlog () [((Var 26 x))] (Real 8 []) () ()) Div (FunctionCall 3 _lfortran_dlog () [((RealConstant 2.00000000000000000e+00 (Real 8 [])))] (Real 8 []) () ()) (Real 8 []) ()) ()) (Return)] (Var 26 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sin: (Function (SymbolTable 5 {_lpython_return_variable: (Variable 5 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 5 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sin [(Var 5 x)] [(= (Var 5 _lpython_return_variable) (FunctionCall 3 _lfortran_dsin () [((Var 5 x))] (Real 8 []) () ()) ()) (Return)] (Var 5 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sqrt: (Function (SymbolTable 12 {_lpython_return_variable: (Variable 12 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 12 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sqrt [(Var 12 x)] [(= (Var 12 _lpython_return_variable) (RealBinOp (Var 12 x) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) ()) (Return)] (Var 12 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__tan: (Function (SymbolTable 15 {_lpython_return_variable: (Variable 15 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 15 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__tan [(Var 15 x)] [(= (Var 15 _lpython_return_variable) (FunctionCall 3 _lfortran_dtan () [((Var 15 x))] (Real 8 []) () ()) ()) (Return)] (Var 15 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__cos: (Function (SymbolTable 11 {_lpython_return_variable: (Variable 11 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 11 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__cos [(Var 11 x)] [(= (Var 11 _lpython_return_variable) (FunctionCall 3 _lfortran_scos () [((Var 11 x))] (Real 4 []) () ()) ()) (Return)] (Var 11 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log: (Function (SymbolTable 21 {_lpython_return_variable: (Variable 21 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 21 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log [(Var 21 x)] [(= (Var 21 _lpython_return_variable) (FunctionCall 3 _lfortran_slog () [((Var 21 x))] (Real 4 []) () ()) ()) (Return)] (Var 21 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log10: (Function (SymbolTable 25 {_lpython_return_variable: (Variable 25 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 25 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log10 [(Var 25 x)] [(= (Var 25 _lpython_return_variable) (FunctionCall 3 _lfortran_slog10 () [((Var 25 x))] (Real 4 []) () ()) ()) (Return)] (Var 25 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log2: (Function (SymbolTable 27 {_lpython_return_variable: (Variable 27 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 27 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log2 [(Var 27 x)] [(= (Var 27 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_slog () [((Var 27 x))] (Real 4 []) () ()) Div (FunctionCall 3 _lfortran_slog () [((Cast (RealConstant 2.00000000000000000e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 2.00000000000000000e+00 (Real 4 []))))] (Real 4 []) () ()) (Real 4 []) ()) ()) (Return)] (Var 27 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sin: (Function (SymbolTable 7 {_lpython_return_variable: (Variable 7 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 7 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sin [(Var 7 x)] [(= (Var 7 _lpython_return_variable) (FunctionCall 3 _lfortran_ssin () [((Var 7 x))] (Real 4 []) () ()) ()) (Return)] (Var 7 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sqrt: (Function (SymbolTable 13 {_lpython_return_variable: (Variable 13 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), result: (Variable 13 result Local () () Default (Real 4 []) Source Public Required .false.), x: (Variable 13 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sqrt [(Var 13 x)] [(= (Var 13 result) (Cast (RealBinOp (Cast (Var 13 x) RealToReal (Real 8 []) ()) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) RealToReal (Real 4 []) ()) ()) (= (Var 13 _lpython_return_variable) (Var 13 result) ()) (Return)] (Var 13 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__tan: (Function (SymbolTable 17 {_lpython_return_variable: (Variable 17 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 17 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__tan [(Var 17 x)] [(= (Var 17 _lpython_return_variable) (FunctionCall 3 _lfortran_stan () [((Var 17 x))] (Real 4 []) () ()) ()) (Return)] (Var 17 _lpython_return_variable) Source Public Implementation .true. ()), _lfortran_dcos: (Function (SymbolTable 8 {_lpython_return_variable: (Variable 8 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 8 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dcos [(Var 8 x)] [] (Var 8 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog: (Function (SymbolTable 18 {_lpython_return_variable: (Variable 18 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 18 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog [(Var 18 x)] [] (Var 18 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog10: (Function (SymbolTable 22 {_lpython_return_variable: (Variable 22 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 22 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog10 [(Var 22 x)] [] (Var 22 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dsin: (Function (SymbolTable 4 {_lpython_return_variable: (Variable 4 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 4 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dsin [(Var 4 x)] [] (Var 4 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dtan: (Function (SymbolTable 14 {_lpython_return_variable: (Variable 14 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 14 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dtan [(Var 14 x)] [] (Var 14 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_scos: (Function (SymbolTable 10 {_lpython_return_variable: (Variable 10 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 10 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_scos [(Var 10 x)] [] (Var 10 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog: (Function (SymbolTable 20 {_lpython_return_variable: (Variable 20 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 20 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog [(Var 20 x)] [] (Var 20 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog10: (Function (SymbolTable 24 {_lpython_return_variable: (Variable 24 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 24 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog10 [(Var 24 x)] [] (Var 24 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_ssin: (Function (SymbolTable 6 {_lpython_return_variable: (Variable 6 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 6 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_ssin [(Var 6 x)] [] (Var 6 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_stan: (Function (SymbolTable 16 {_lpython_return_variable: (Variable 16 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 16 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_stan [(Var 16 x)] [] (Var 16 _lpython_return_variable) BindC Public Interface .false. ()), cos: (GenericProcedure 3 cos [3 __lpython_overloaded_0__cos 3 __lpython_overloaded_1__cos] Public), log: (GenericProcedure 3 log [3 __lpython_overloaded_0__log 3 __lpython_overloaded_1__log] Public), log10: (GenericProcedure 3 log10 [3 __lpython_overloaded_0__log10 3 __lpython_overloaded_1__log10] Public), log2: (GenericProcedure 3 log2 [3 __lpython_overloaded_0__log2 3 __lpython_overloaded_1__log2] Public), sin: (GenericProcedure 3 sin [3 __lpython_overloaded_0__sin 3 __lpython_overloaded_1__sin] Public), sqrt: (GenericProcedure 3 sqrt [3 __lpython_overloaded_0__sqrt 3 __lpython_overloaded_1__sqrt] Public), tan: (GenericProcedure 3 tan [3 __lpython_overloaded_0__tan 3 __lpython_overloaded_1__tan] Public)}) numpy [] .false. .false.), sin: (ExternalSymbol 1 sin 3 sin numpy [] sin Public), sin@__lpython_overloaded_0__sin: (ExternalSymbol 1 sin@__lpython_overloaded_0__sin 3 __lpython_overloaded_0__sin numpy [] __lpython_overloaded_0__sin Public), sin@__lpython_overloaded_1__sin: (ExternalSymbol 1 sin@__lpython_overloaded_1__sin 3 __lpython_overloaded_1__sin numpy [] __lpython_overloaded_1__sin Public), verify1d: (Subroutine (SymbolTable 28 {abs: (ExternalSymbol 28 abs 39 abs lpython_builtin [] abs Private), array: (Variable 28 array InOut () () Default (Real 4 [(() ())]) Source Public Required .false.), eps: (Variable 28 eps Local () () Default (Real 4 []) Source Public Required .false.), i: (Variable 28 i Local () () Default (Integer 4 []) Source Public Required .false.), result: (Variable 28 result InOut () () Default (Real 4 [(() ())]) Source Public Required .false.), size: (Variable 28 size In () () Default (Integer 4 []) Source Public Required .false.)}) verify1d [(Var 28 array) (Var 28 result) (Var 28 size)] [(= (Var 28 eps) (Cast (RealConstant 9.99999999999999955e-07 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 9.99999999999999955e-07 (Real 4 []))) ()) (DoLoop ((Var 28 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 28 size) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_1__abs 28 abs [((RealBinOp (FunctionCall 1 sin@__lpython_overloaded_1__sin 1 sin [((FunctionCall 1 sin@__lpython_overloaded_1__sin 1 sin [((ArrayItem (Var 28 array) [(() (Var 28 i) ())] (Real 4 []) ()))] (Real 4 []) () ()))] (Real 4 []) () ()) Sub (ArrayItem (Var 28 result) [(() (Var 28 i) ())] (Real 4 []) ()) (Real 4 []) ()))] (Real 4 []) () ()) LtE (Var 28 eps) (Logical 4 []) ()) ())])] Source Public Implementation () .false. .false.), verify1d_mul: (Subroutine (SymbolTable 32 {abs: (ExternalSymbol 32 abs 39 abs lpython_builtin [] abs Private), array_a: (Variable 32 array_a InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), array_b: (Variable 32 array_b InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), eps: (Variable 32 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 32 i Local () () Default (Integer 4 []) Source Public Required .false.), result: (Variable 32 result InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), size: (Variable 32 size In () () Default (Integer 4 []) Source Public Required .false.)}) verify1d_mul [(Var 32 array_a) (Var 32 array_b) (Var 32 result) (Var 32 size)] [(= (Var 32 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (DoLoop ((Var 32 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 32 size) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 32 abs [((RealBinOp (RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 32 array_a) [(() (Var 32 i) ())] (Real 8 []) ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Mul (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Mul (RealBinOp (ArrayItem (Var 32 array_b) [(() (Var 32 i) ())] (Real 8 []) ()) Pow (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) Sub (ArrayItem (Var 32 result) [(() (Var 32 i) ())] (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 32 eps) (Logical 4 []) ()) ())])] Source Public Implementation () .false. .false.), verify1d_sum: (Subroutine (SymbolTable 31 {abs: (ExternalSymbol 31 abs 39 abs lpython_builtin [] abs Private), array_a: (Variable 31 array_a InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), array_b: (Variable 31 array_b InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), eps: (Variable 31 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 31 i Local () () Default (Integer 4 []) Source Public Required .false.), result: (Variable 31 result InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), size: (Variable 31 size In () () Default (Integer 4 []) Source Public Required .false.)}) verify1d_sum [(Var 31 array_a) (Var 31 array_b) (Var 31 result) (Var 31 size)] [(= (Var 31 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (DoLoop ((Var 31 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 31 size) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 31 abs [((RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 31 array_a) [(() (Var 31 i) ())] (Real 8 []) ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Add (RealBinOp (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Mul (RealBinOp (ArrayItem (Var 31 array_b) [(() (Var 31 i) ())] (Real 8 []) ()) Pow (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) Sub (ArrayItem (Var 31 result) [(() (Var 31 i) ())] (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 31 eps) (Logical 4 []) ()) ())])] Source Public Implementation () .false. .false.), verify2d: (Subroutine (SymbolTable 30 {abs: (ExternalSymbol 30 abs 39 abs lpython_builtin [] abs Private), array: (Variable 30 array InOut () () Default (Real 8 [(() ()) (() ())]) Source Public Required .false.), eps: (Variable 30 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 30 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 30 j Local () () Default (Integer 4 []) Source Public Required .false.), result: (Variable 30 result InOut () () Default (Real 8 [(() ()) (() ())]) Source Public Required .false.), size1: (Variable 30 size1 In () () Default (Integer 4 []) Source Public Required .false.), size2: (Variable 30 size2 In () () Default (Integer 4 []) Source Public Required .false.)}) verify2d [(Var 30 array) (Var 30 result) (Var 30 size1) (Var 30 size2)] [(= (Var 30 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (DoLoop ((Var 30 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 30 size1) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 30 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 30 size2) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 30 abs [((RealBinOp (RealBinOp (FunctionCall 1 cos@__lpython_overloaded_0__cos 1 cos [((ArrayItem (Var 30 array) [(() (Var 30 i) ()) (() (Var 30 j) ())] (Real 8 []) ()))] (Real 8 []) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (ArrayItem (Var 30 result) [(() (Var 30 i) ()) (() (Var 30 j) ())] (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 30 eps) (Logical 4 []) ()) ())])])] Source Public Implementation () .false. .false.), verifynd: (Subroutine (SymbolTable 29 {abs: (ExternalSymbol 29 abs 39 abs lpython_builtin [] abs Private), array: (Variable 29 array InOut () () Default (Real 8 [(() ()) (() ()) (() ())]) Source Public Required .false.), eps: (Variable 29 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 29 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 29 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 29 k Local () () Default (Integer 4 []) Source Public Required .false.), result: (Variable 29 result InOut () () Default (Real 8 [(() ()) (() ()) (() ())]) Source Public Required .false.), size1: (Variable 29 size1 In () () Default (Integer 4 []) Source Public Required .false.), size2: (Variable 29 size2 In () () Default (Integer 4 []) Source Public Required .false.), size3: (Variable 29 size3 In () () Default (Integer 4 []) Source Public Required .false.)}) verifynd [(Var 29 array) (Var 29 result) (Var 29 size1) (Var 29 size2) (Var 29 size3)] [(= (Var 29 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (DoLoop ((Var 29 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 29 size1) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 29 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 29 size2) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 29 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (Var 29 size3) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 29 abs [((RealBinOp (RealBinOp (FunctionCall 1 sin@__lpython_overloaded_0__sin 1 sin [((ArrayItem (Var 29 array) [(() (Var 29 i) ()) (() (Var 29 j) ()) (() (Var 29 k) ())] (Real 8 []) ()))] (Real 8 []) () ()) Pow (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (ArrayItem (Var 29 result) [(() (Var 29 i) ()) (() (Var 29 j) ()) (() (Var 29 k) ())] (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 29 eps) (Logical 4 []) ()) ())])])])] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-expr10-efcbb1b.json b/tests/reference/asr-expr10-efcbb1b.json index fae1c29f05..2e139606e1 100644 --- a/tests/reference/asr-expr10-efcbb1b.json +++ b/tests/reference/asr-expr10-efcbb1b.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-expr10-efcbb1b.stdout", - "stdout_hash": "f7a29a22601c5455d7900da733b156ebd02b8cc3b74d8c3e112ec8c2", + "stdout_hash": "9fff0e599599a527bebbb1bb6c4a1e8465db464704e5b03f1d8450fb", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-expr10-efcbb1b.stdout b/tests/reference/asr-expr10-efcbb1b.stdout index 912992ca63..316e613426 100644 --- a/tests/reference/asr-expr10-efcbb1b.stdout +++ b/tests/reference/asr-expr10-efcbb1b.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {complex@__lpython_overloaded_13__complex: (ExternalSymbol 1 complex@__lpython_overloaded_13__complex 4 __lpython_overloaded_13__complex lpython_builtin [] __lpython_overloaded_13__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 4 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] []), test_UnaryOp: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 2 b Local () () Default (Logical 4 []) Source Public Required .false.), b1: (Variable 2 b1 Local () () Default (Logical 4 []) Source Public Required .false.), b2: (Variable 2 b2 Local () () Default (Logical 4 []) Source Public Required .false.), b3: (Variable 2 b3 Local () () Default (Logical 4 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 4 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 4 complex lpython_builtin [] complex Private), f: (Variable 2 f Local () () Default (Real 4 []) Source Public Required .false.)}) test_UnaryOp [] [(= (Var 2 a) (IntegerConstant 4 (Integer 4 [])) ()) (= (Var 2 a) (IntegerUnaryMinus (IntegerConstant 500 (Integer 4 [])) (Integer 4 []) (IntegerConstant -500 (Integer 4 []))) ()) (= (Var 2 a) (IntegerBitNot (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -6 (Integer 4 []))) ()) (= (Var 2 b) (LogicalNot (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 b) (LogicalNot (Cast (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) IntegerToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 b) (LogicalNot (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 f) (Cast (RealConstant 1.00000000000000000e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 1.00000000000000000e+00 (Real 4 []))) ()) (= (Var 2 f) (Cast (RealUnaryMinus (RealConstant 1.83745534000000014e+05 (Real 8 [])) (Real 8 []) (RealConstant -1.83745534000000014e+05 (Real 8 []))) RealToReal (Real 4 []) (RealConstant -1.83745534000000014e+05 (Real 4 []))) ()) (= (Var 2 b1) (LogicalConstant .true. (Logical 4 [])) ()) (= (Var 2 b2) (LogicalNot (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 b3) (LogicalNot (Var 2 b2) (Logical 4 []) ()) ()) (= (Var 2 a) (IntegerConstant 1 (Integer 4 [])) ()) (= (Var 2 a) (IntegerUnaryMinus (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) ()) (= (Var 2 a) (IntegerBitNot (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) (IntegerConstant -2 (Integer 4 []))) (Integer 4 []) (IntegerConstant -2 (Integer 4 []))) ()) (= (Var 2 c) (Cast (ComplexConstant 1.00000000000000000e+00 2.00000000000000000e+00 (Complex 8 [])) ComplexToComplex (Complex 4 []) (ComplexConstant 1.00000000000000000e+00 2.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c) (Cast (ComplexUnaryMinus (FunctionCall 1 complex@__lpython_overloaded_13__complex 2 complex [((IntegerConstant 3 (Integer 4 []))) ((RealConstant 6.50000000000000000e+01 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 6.50000000000000000e+01 (Complex 8 [])) ()) (Complex 8 []) (ComplexConstant -3.00000000000000000e+00 -6.50000000000000000e+01 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant -3.00000000000000000e+00 -6.50000000000000000e+01 (Complex 4 []))) ()) (= (Var 2 b1) (LogicalConstant .false. (Logical 4 [])) ()) (= (Var 2 b2) (LogicalConstant .true. (Logical 4 [])) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {complex@__lpython_overloaded_13__complex: (ExternalSymbol 1 complex@__lpython_overloaded_13__complex 4 __lpython_overloaded_13__complex lpython_builtin [] __lpython_overloaded_13__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 4 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] []), test_UnaryOp: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 2 b Local () () Default (Logical 4 []) Source Public Required .false.), b1: (Variable 2 b1 Local () () Default (Logical 4 []) Source Public Required .false.), b2: (Variable 2 b2 Local () () Default (Logical 4 []) Source Public Required .false.), b3: (Variable 2 b3 Local () () Default (Logical 4 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 4 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 4 complex lpython_builtin [] complex Private), f: (Variable 2 f Local () () Default (Real 4 []) Source Public Required .false.)}) test_UnaryOp [] [(= (Var 2 a) (IntegerConstant 4 (Integer 4 [])) ()) (= (Var 2 a) (IntegerUnaryMinus (IntegerConstant 500 (Integer 4 [])) (Integer 4 []) (IntegerConstant -500 (Integer 4 []))) ()) (= (Var 2 a) (IntegerBitNot (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -6 (Integer 4 []))) ()) (= (Var 2 b) (LogicalNot (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 b) (LogicalNot (Cast (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) IntegerToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 b) (LogicalNot (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 f) (Cast (RealConstant 1.00000000000000000e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 1.00000000000000000e+00 (Real 4 []))) ()) (= (Var 2 f) (Cast (RealUnaryMinus (RealConstant 1.83745534000000014e+05 (Real 8 [])) (Real 8 []) (RealConstant -1.83745534000000014e+05 (Real 8 []))) RealToReal (Real 4 []) (RealConstant -1.83745534000000014e+05 (Real 4 []))) ()) (= (Var 2 b1) (LogicalConstant .true. (Logical 4 [])) ()) (= (Var 2 b2) (LogicalNot (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 b3) (LogicalNot (Var 2 b2) (Logical 4 []) ()) ()) (= (Var 2 a) (IntegerConstant 1 (Integer 4 [])) ()) (= (Var 2 a) (IntegerUnaryMinus (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) ()) (= (Var 2 a) (IntegerBitNot (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) (IntegerConstant -2 (Integer 4 []))) (Integer 4 []) (IntegerConstant -2 (Integer 4 []))) ()) (= (Var 2 c) (Cast (ComplexConstant 1.00000000000000000e+00 2.00000000000000000e+00 (Complex 8 [])) ComplexToComplex (Complex 4 []) (ComplexConstant 1.00000000000000000e+00 2.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c) (Cast (ComplexUnaryMinus (FunctionCall 1 complex@__lpython_overloaded_13__complex 2 complex [((IntegerConstant 3 (Integer 4 []))) ((RealConstant 6.50000000000000000e+01 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 6.50000000000000000e+01 (Complex 8 [])) ()) (Complex 8 []) (ComplexConstant -3.00000000000000000e+00 -6.50000000000000000e+01 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant -3.00000000000000000e+00 -6.50000000000000000e+01 (Complex 4 []))) ()) (= (Var 2 b1) (LogicalConstant .false. (Logical 4 [])) ()) (= (Var 2 b2) (LogicalConstant .true. (Logical 4 [])) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-expr13-81bdb5a.json b/tests/reference/asr-expr13-81bdb5a.json index 377772c00b..3e18391bd1 100644 --- a/tests/reference/asr-expr13-81bdb5a.json +++ b/tests/reference/asr-expr13-81bdb5a.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-expr13-81bdb5a.stdout", - "stdout_hash": "8404ff452194d6b7f12ddd016ebf75253391cc020712ddee2624e001", + "stdout_hash": "577c708474fbfeda9c09f83756b7d22929c0644397b578eff508ad32", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-expr13-81bdb5a.stdout b/tests/reference/asr-expr13-81bdb5a.stdout index c101178b7c..2e46fbd2a6 100644 --- a/tests/reference/asr-expr13-81bdb5a.stdout +++ b/tests/reference/asr-expr13-81bdb5a.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {complex@__lpython_overloaded_5__complex: (ExternalSymbol 1 complex@__lpython_overloaded_5__complex 4 __lpython_overloaded_5__complex lpython_builtin [] __lpython_overloaded_5__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 4 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] []), test_Compare: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Logical 4 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 4 complex lpython_builtin [] complex Private)}) test_Compare [] [(= (Var 2 a) (IntegerCompare (IntegerConstant 5 (Integer 4 [])) Gt (IntegerConstant 4 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (IntegerCompare (IntegerConstant 5 (Integer 4 [])) LtE (IntegerConstant 4 (Integer 4 [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 a) (IntegerCompare (IntegerConstant 5 (Integer 4 [])) Lt (IntegerConstant 4 (Integer 4 [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 a) (RealCompare (RealConstant 5.59999999999999964e+00 (Real 8 [])) GtE (RealConstant 5.59999000000000002e+00 (Real 8 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (RealCompare (RealConstant 3.29999999999999982e+00 (Real 8 [])) Eq (RealConstant 3.29999999999999982e+00 (Real 8 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (RealCompare (RealConstant 3.29999999999999982e+00 (Real 8 [])) NotEq (RealConstant 3.39999999999999991e+00 (Real 8 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (ComplexCompare (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) Eq (FunctionCall 1 complex@__lpython_overloaded_5__complex 2 complex [((RealConstant 3.00000000000000000e+00 (Real 8 []))) ((RealConstant 4.00000000000000000e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "abc" (Character 1 3 () [])) Gt (StringConstant "abd" (Character 1 3 () [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "" (Character 1 0 () [])) Lt (StringConstant "s" (Character 1 1 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "-abs" (Character 1 4 () [])) GtE (StringConstant "abs" (Character 1 3 () [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "abcd" (Character 1 4 () [])) LtE (StringConstant "abcde" (Character 1 5 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "abc" (Character 1 3 () [])) Eq (StringConstant "abc" (Character 1 3 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "abc" (Character 1 3 () [])) NotEq (StringConstant "abd" (Character 1 3 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "" (Character 1 0 () [])) Eq (StringConstant "+" (Character 1 1 () [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 a) (LogicalCompare (LogicalConstant .true. (Logical 4 [])) Gt (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (LogicalCompare (LogicalConstant .true. (Logical 4 [])) Eq (LogicalConstant .true. (Logical 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (LogicalCompare (LogicalConstant .false. (Logical 4 [])) NotEq (LogicalConstant .true. (Logical 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (LogicalCompare (LogicalConstant .false. (Logical 4 [])) GtE (LogicalConstant .true. (Logical 4 [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {complex@__lpython_overloaded_5__complex: (ExternalSymbol 1 complex@__lpython_overloaded_5__complex 4 __lpython_overloaded_5__complex lpython_builtin [] __lpython_overloaded_5__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 4 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] []), test_Compare: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Logical 4 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 4 complex lpython_builtin [] complex Private)}) test_Compare [] [(= (Var 2 a) (IntegerCompare (IntegerConstant 5 (Integer 4 [])) Gt (IntegerConstant 4 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (IntegerCompare (IntegerConstant 5 (Integer 4 [])) LtE (IntegerConstant 4 (Integer 4 [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 a) (IntegerCompare (IntegerConstant 5 (Integer 4 [])) Lt (IntegerConstant 4 (Integer 4 [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 a) (RealCompare (RealConstant 5.59999999999999964e+00 (Real 8 [])) GtE (RealConstant 5.59999000000000002e+00 (Real 8 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (RealCompare (RealConstant 3.29999999999999982e+00 (Real 8 [])) Eq (RealConstant 3.29999999999999982e+00 (Real 8 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (RealCompare (RealConstant 3.29999999999999982e+00 (Real 8 [])) NotEq (RealConstant 3.39999999999999991e+00 (Real 8 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (ComplexCompare (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) Eq (FunctionCall 1 complex@__lpython_overloaded_5__complex 2 complex [((RealConstant 3.00000000000000000e+00 (Real 8 []))) ((RealConstant 4.00000000000000000e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "abc" (Character 1 3 () [])) Gt (StringConstant "abd" (Character 1 3 () [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "" (Character 1 0 () [])) Lt (StringConstant "s" (Character 1 1 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "-abs" (Character 1 4 () [])) GtE (StringConstant "abs" (Character 1 3 () [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "abcd" (Character 1 4 () [])) LtE (StringConstant "abcde" (Character 1 5 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "abc" (Character 1 3 () [])) Eq (StringConstant "abc" (Character 1 3 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "abc" (Character 1 3 () [])) NotEq (StringConstant "abd" (Character 1 3 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (StringCompare (StringConstant "" (Character 1 0 () [])) Eq (StringConstant "+" (Character 1 1 () [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ()) (= (Var 2 a) (LogicalCompare (LogicalConstant .true. (Logical 4 [])) Gt (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (LogicalCompare (LogicalConstant .true. (Logical 4 [])) Eq (LogicalConstant .true. (Logical 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (LogicalCompare (LogicalConstant .false. (Logical 4 [])) NotEq (LogicalConstant .true. (Logical 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a) (LogicalCompare (LogicalConstant .false. (Logical 4 [])) GtE (LogicalConstant .true. (Logical 4 [])) (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-expr7-480ba2f.json b/tests/reference/asr-expr7-480ba2f.json index 0ed12dcc2f..e3719786b8 100644 --- a/tests/reference/asr-expr7-480ba2f.json +++ b/tests/reference/asr-expr7-480ba2f.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-expr7-480ba2f.stdout", - "stdout_hash": "8601b97164c418ad5dfaeffb16e5a365793d6a569de23d5505f46667", + "stdout_hash": "360789409348f04983f81a236d83acf191ddebe4896ab475600fcdd6", "stderr": "asr-expr7-480ba2f.stderr", "stderr_hash": "28509dd59a386eebd632340a550d14299cd2a921ef6dc3ac7dbe7fe9", "returncode": 0 diff --git a/tests/reference/asr-expr7-480ba2f.stdout b/tests/reference/asr-expr7-480ba2f.stdout index 1c9d3e64a4..83446fa479 100644 --- a/tests/reference/asr-expr7-480ba2f.stdout +++ b/tests/reference/asr-expr7-480ba2f.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 78 {}) _lpython_main_program [] [(SubroutineCall 1 main0 () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main0: (Subroutine (SymbolTable 4 {c: (Variable 4 c Local () () Default (Integer 4 []) Source Public Required .false.)}) main0 [] [(SubroutineCall 1 test_pow () [] ()) (= (Var 4 c) (FunctionCall 1 test_pow_1 () [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Integer 4 []) () ()) ())] Source Public Implementation () .false. .false.), main_program: (Program (SymbolTable 77 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), pow@__lpython_overloaded_0__pow: (ExternalSymbol 1 pow@__lpython_overloaded_0__pow 6 __lpython_overloaded_0__pow lpython_builtin [] __lpython_overloaded_0__pow Public), test_pow: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), pow: (ExternalSymbol 2 pow 6 pow lpython_builtin [] pow Private)}) test_pow [] [(= (Var 2 a) (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 2 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 4 (Integer 4 [])) ()) ())] Source Public Implementation () .false. .false.), test_pow_1: (Function (SymbolTable 3 {_lpython_return_variable: (Variable 3 _lpython_return_variable ReturnVar () () Default (Integer 4 []) Source Public Required .false.), a: (Variable 3 a In () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 3 b In () () Default (Integer 4 []) Source Public Required .false.), pow: (ExternalSymbol 3 pow 6 pow lpython_builtin [] pow Private), res: (Variable 3 res Local () () Default (Integer 4 []) Source Public Required .false.)}) test_pow_1 [(Var 3 a) (Var 3 b)] [(= (Var 3 res) (FunctionCall 1 pow@__lpython_overloaded_0__pow 3 pow [((Var 3 a)) ((Var 3 b))] (Integer 4 []) () ()) ()) (= (Var 3 _lpython_return_variable) (Var 3 res) ()) (Return)] (Var 3 _lpython_return_variable) Source Public Implementation .false. ())}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 84 {}) _lpython_main_program [] [(SubroutineCall 1 main0 () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main0: (Subroutine (SymbolTable 4 {c: (Variable 4 c Local () () Default (Integer 4 []) Source Public Required .false.)}) main0 [] [(SubroutineCall 1 test_pow () [] ()) (= (Var 4 c) (FunctionCall 1 test_pow_1 () [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Integer 4 []) () ()) ())] Source Public Implementation () .false. .false.), main_program: (Program (SymbolTable 83 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), pow@__lpython_overloaded_0__pow: (ExternalSymbol 1 pow@__lpython_overloaded_0__pow 6 __lpython_overloaded_0__pow lpython_builtin [] __lpython_overloaded_0__pow Public), test_pow: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), pow: (ExternalSymbol 2 pow 6 pow lpython_builtin [] pow Private)}) test_pow [] [(= (Var 2 a) (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 2 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 4 (Integer 4 [])) ()) ())] Source Public Implementation () .false. .false.), test_pow_1: (Function (SymbolTable 3 {_lpython_return_variable: (Variable 3 _lpython_return_variable ReturnVar () () Default (Integer 4 []) Source Public Required .false.), a: (Variable 3 a In () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 3 b In () () Default (Integer 4 []) Source Public Required .false.), pow: (ExternalSymbol 3 pow 6 pow lpython_builtin [] pow Private), res: (Variable 3 res Local () () Default (Integer 4 []) Source Public Required .false.)}) test_pow_1 [(Var 3 a) (Var 3 b)] [(= (Var 3 res) (FunctionCall 1 pow@__lpython_overloaded_0__pow 3 pow [((Var 3 a)) ((Var 3 b))] (Integer 4 []) () ()) ()) (= (Var 3 _lpython_return_variable) (Var 3 res) ()) (Return)] (Var 3 _lpython_return_variable) Source Public Implementation .false. ())}) []) diff --git a/tests/reference/asr-expr8-6beda60.json b/tests/reference/asr-expr8-6beda60.json index eb99b02557..f01376cd7c 100644 --- a/tests/reference/asr-expr8-6beda60.json +++ b/tests/reference/asr-expr8-6beda60.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-expr8-6beda60.stdout", - "stdout_hash": "c090778aaf298e60d1cf4bbb8f7650508e77b6282395492abb332fb3", + "stdout_hash": "130b9bd1cc2560ae3c136572689d655c4380ee27972a3879d25c18aa", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-expr8-6beda60.stdout b/tests/reference/asr-expr8-6beda60.stdout index 5d01e50311..5ab9bb0cb8 100644 --- a/tests/reference/asr-expr8-6beda60.stdout +++ b/tests/reference/asr-expr8-6beda60.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_floordiv@__lpython_overloaded_2___lpython_floordiv: (ExternalSymbol 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 4 __lpython_overloaded_2___lpython_floordiv lpython_builtin [] __lpython_overloaded_2___lpython_floordiv Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] []), test_binop: (Subroutine (SymbolTable 2 {_lpython_floordiv: (ExternalSymbol 2 _lpython_floordiv 4 _lpython_floordiv lpython_builtin [] _lpython_floordiv Private), b1: (Variable 2 b1 Local () () Default (Logical 4 []) Source Public Required .false.), b2: (Variable 2 b2 Local () () Default (Logical 4 []) Source Public Required .false.), x: (Variable 2 x Local () () Default (Integer 4 []) Source Public Required .false.), x2: (Variable 2 x2 Local () () Default (Real 4 []) Source Public Required .false.)}) test_binop [] [(= (Var 2 x) (IntegerBinOp (IntegerConstant 2 (Integer 4 [])) Pow (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 []))) ()) (= (Var 2 x2) (Cast (RealBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Pow (RealConstant 3.50000000000000000e+00 (Real 8 [])) (Real 8 []) ()) RealToReal (Real 4 []) ()) ()) (= (Var 2 x) (IntegerBinOp (IntegerConstant 54 (Integer 4 [])) Sub (IntegerConstant 100 (Integer 4 [])) (Integer 4 []) (IntegerConstant -46 (Integer 4 []))) ()) (= (Var 2 x2) (Cast (RealBinOp (RealBinOp (RealConstant 3.45400000000000018e+00 (Real 8 [])) Sub (RealConstant 7.65429999999999950e+02 (Real 8 [])) (Real 8 []) (RealConstant -7.61975999999999999e+02 (Real 8 []))) Add (RealConstant 5.34600000000000023e+02 (Real 8 [])) (Real 8 []) (RealConstant -2.27375999999999976e+02 (Real 8 []))) RealToReal (Real 4 []) (RealConstant -2.27375999999999976e+02 (Real 4 []))) ()) (= (Var 2 x2) (Cast (RealBinOp (RealConstant 5.34656499999999960e+03 (Real 8 [])) Mul (RealConstant 3.45000000000000018e+00 (Real 8 [])) (Real 8 []) (RealConstant 1.84456492499999986e+04 (Real 8 []))) RealToReal (Real 4 []) (RealConstant 1.84456492499999986e+04 (Real 4 []))) ()) (= (Var 2 x2) (Cast (RealBinOp (RealConstant 5.34656499999999960e+03 (Real 8 [])) Pow (RealConstant 3.45000000000000018e+00 (Real 8 [])) (Real 8 []) (RealConstant 7.27542278992521777e+12 (Real 8 []))) RealToReal (Real 4 []) (RealConstant 7.27542278992521777e+12 (Real 4 []))) ()) (= (Var 2 x) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Add (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (Var 2 x) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Sub (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (Var 2 x) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Mul (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (Var 2 x) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Pow (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (Var 2 b1) (LogicalConstant .true. (Logical 4 [])) ()) (= (Var 2 b2) (LogicalConstant .false. (Logical 4 [])) ()) (= (Var 2 x) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 2 _lpython_floordiv [((Cast (Var 2 b1) LogicalToInteger (Integer 4 []) ())) ((Cast (Var 2 b1) LogicalToInteger (Integer 4 []) ()))] (Integer 4 []) () ()) ()) (= (Var 2 x) (IntegerBinOp (Cast (Var 2 b1) LogicalToInteger (Integer 4 []) ()) Pow (Cast (Var 2 b2) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_floordiv@__lpython_overloaded_2___lpython_floordiv: (ExternalSymbol 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 4 __lpython_overloaded_2___lpython_floordiv lpython_builtin [] __lpython_overloaded_2___lpython_floordiv Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] []), test_binop: (Subroutine (SymbolTable 2 {_lpython_floordiv: (ExternalSymbol 2 _lpython_floordiv 4 _lpython_floordiv lpython_builtin [] _lpython_floordiv Private), b1: (Variable 2 b1 Local () () Default (Logical 4 []) Source Public Required .false.), b2: (Variable 2 b2 Local () () Default (Logical 4 []) Source Public Required .false.), x: (Variable 2 x Local () () Default (Integer 4 []) Source Public Required .false.), x2: (Variable 2 x2 Local () () Default (Real 4 []) Source Public Required .false.)}) test_binop [] [(= (Var 2 x) (IntegerBinOp (IntegerConstant 2 (Integer 4 [])) Pow (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) (IntegerConstant 8 (Integer 4 []))) ()) (= (Var 2 x2) (Cast (RealBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Pow (RealConstant 3.50000000000000000e+00 (Real 8 [])) (Real 8 []) ()) RealToReal (Real 4 []) ()) ()) (= (Var 2 x) (IntegerBinOp (IntegerConstant 54 (Integer 4 [])) Sub (IntegerConstant 100 (Integer 4 [])) (Integer 4 []) (IntegerConstant -46 (Integer 4 []))) ()) (= (Var 2 x2) (Cast (RealBinOp (RealBinOp (RealConstant 3.45400000000000018e+00 (Real 8 [])) Sub (RealConstant 7.65429999999999950e+02 (Real 8 [])) (Real 8 []) (RealConstant -7.61975999999999999e+02 (Real 8 []))) Add (RealConstant 5.34600000000000023e+02 (Real 8 [])) (Real 8 []) (RealConstant -2.27375999999999976e+02 (Real 8 []))) RealToReal (Real 4 []) (RealConstant -2.27375999999999976e+02 (Real 4 []))) ()) (= (Var 2 x2) (Cast (RealBinOp (RealConstant 5.34656499999999960e+03 (Real 8 [])) Mul (RealConstant 3.45000000000000018e+00 (Real 8 [])) (Real 8 []) (RealConstant 1.84456492499999986e+04 (Real 8 []))) RealToReal (Real 4 []) (RealConstant 1.84456492499999986e+04 (Real 4 []))) ()) (= (Var 2 x2) (Cast (RealBinOp (RealConstant 5.34656499999999960e+03 (Real 8 [])) Pow (RealConstant 3.45000000000000018e+00 (Real 8 [])) (Real 8 []) (RealConstant 7.27542278992521777e+12 (Real 8 []))) RealToReal (Real 4 []) (RealConstant 7.27542278992521777e+12 (Real 4 []))) ()) (= (Var 2 x) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Add (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (Var 2 x) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Sub (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (Var 2 x) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Mul (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (Var 2 x) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Pow (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (Var 2 b1) (LogicalConstant .true. (Logical 4 [])) ()) (= (Var 2 b2) (LogicalConstant .false. (Logical 4 [])) ()) (= (Var 2 x) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 2 _lpython_floordiv [((Cast (Var 2 b1) LogicalToInteger (Integer 4 []) ())) ((Cast (Var 2 b1) LogicalToInteger (Integer 4 []) ()))] (Integer 4 []) () ()) ()) (= (Var 2 x) (IntegerBinOp (Cast (Var 2 b1) LogicalToInteger (Integer 4 []) ()) Pow (Cast (Var 2 b2) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-expr_05-3a37324.json b/tests/reference/asr-expr_05-3a37324.json index 0206da3c96..b7e98204a2 100644 --- a/tests/reference/asr-expr_05-3a37324.json +++ b/tests/reference/asr-expr_05-3a37324.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-expr_05-3a37324.stdout", - "stdout_hash": "dbf6fe8cec7a1660cd93f85427bc3cd1b0b7312a51870e5d741152f0", + "stdout_hash": "fe81f3d6642feb49ea64c75f2cb82f4cb88f5ac9829c22f43e5d92bc", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-expr_05-3a37324.stdout b/tests/reference/asr-expr_05-3a37324.stdout index da7c2ec60b..93ae70faf8 100644 --- a/tests/reference/asr-expr_05-3a37324.stdout +++ b/tests/reference/asr-expr_05-3a37324.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 78 {}) _lpython_main_program [] [(SubroutineCall 1 main0 () [] ())] Source Public Implementation () .false. .false.), _mod@__lpython_overloaded_0___mod: (ExternalSymbol 1 _mod@__lpython_overloaded_0___mod 6 __lpython_overloaded_0___mod lpython_builtin [] __lpython_overloaded_0___mod Public), lpython_builtin: (IntrinsicModule lpython_builtin), main0: (Subroutine (SymbolTable 4 {_mod: (ExternalSymbol 4 _mod 6 _mod lpython_builtin [] _mod Private), a: (Variable 4 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 4 b Local () () Default (Integer 4 []) Source Public Required .false.), i: (Variable 4 i Local () () Default (Integer 8 []) Source Public Required .false.), i1: (Variable 4 i1 Local () () Default (Integer 4 []) Source Public Required .false.), i2: (Variable 4 i2 Local () () Default (Integer 4 []) Source Public Required .false.), i3: (Variable 4 i3 Local () () Default (Integer 4 []) Source Public Required .false.), i4: (Variable 4 i4 Local () () Default (Integer 4 []) Source Public Required .false.)}) main0 [] [(= (Var 4 a) (IntegerConstant 10 (Integer 4 [])) ()) (= (Var 4 b) (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 test_multiply () [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (IntegerUnaryMinus (IntegerConstant 50 (Integer 4 [])) (Integer 4 []) (IntegerConstant -50 (Integer 4 []))) (Logical 4 []) ()) ()) (= (Var 4 i) (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 4 i) (IntegerBinOp (Var 4 i) Add (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Integer 8 []) ()) ()) (Assert (IntegerCompare (Var 4 i) Eq (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Logical 4 []) ()) ()) (= (Var 4 a) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 4 b) (IntegerConstant 5 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 test_mod () [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (IntegerConstant 2 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 test_mod () [((IntegerConstant 23 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Integer 4 []) () ()) Eq (IntegerConstant 2 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 4 a) (IntegerConstant 123282374 (Integer 4 [])) ()) (= (Var 4 b) (IntegerConstant 32771 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 test_mod () [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (IntegerConstant 30643 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 4 a) (IntegerUnaryMinus (IntegerConstant 5345 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5345 (Integer 4 []))) ()) (= (Var 4 b) (IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 _mod@__lpython_overloaded_0___mod 4 _mod [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) (Logical 4 []) ()) ()) (= (Var 4 a) (IntegerUnaryMinus (IntegerConstant 123282374 (Integer 4 [])) (Integer 4 []) (IntegerConstant -123282374 (Integer 4 []))) ()) (= (Var 4 b) (IntegerConstant 32771 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 test_mod () [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (IntegerConstant 2128 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerConstant 10 (Integer 4 [])) BitOr (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant 14 (Integer 4 []))) Eq (IntegerConstant 14 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (IntegerConstant 105346 (Integer 4 [])) (Integer 4 []) (IntegerConstant -105346 (Integer 4 []))) BitOr (IntegerUnaryMinus (IntegerConstant 32771 (Integer 4 [])) (Integer 4 []) (IntegerConstant -32771 (Integer 4 []))) (Integer 4 []) (IntegerConstant -32769 (Integer 4 []))) Eq (IntegerUnaryMinus (IntegerConstant 32769 (Integer 4 [])) (Integer 4 []) (IntegerConstant -32769 (Integer 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerConstant 10 (Integer 4 [])) BitAnd (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (IntegerConstant 105346 (Integer 4 [])) (Integer 4 []) (IntegerConstant -105346 (Integer 4 []))) BitAnd (IntegerUnaryMinus (IntegerConstant 32771 (Integer 4 [])) (Integer 4 []) (IntegerConstant -32771 (Integer 4 []))) (Integer 4 []) (IntegerConstant -105348 (Integer 4 []))) Eq (IntegerUnaryMinus (IntegerConstant 105348 (Integer 4 [])) (Integer 4 []) (IntegerConstant -105348 (Integer 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerConstant 10 (Integer 4 [])) BitXor (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant 14 (Integer 4 []))) Eq (IntegerConstant 14 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (IntegerConstant 105346 (Integer 4 [])) (Integer 4 []) (IntegerConstant -105346 (Integer 4 []))) BitXor (IntegerUnaryMinus (IntegerConstant 32771 (Integer 4 [])) (Integer 4 []) (IntegerConstant -32771 (Integer 4 []))) (Integer 4 []) (IntegerConstant 72579 (Integer 4 []))) Eq (IntegerConstant 72579 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerConstant 10 (Integer 4 [])) BitRShift (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 5 (Integer 4 []))) Eq (IntegerConstant 5 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerConstant 5 (Integer 4 [])) BitLShift (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 10 (Integer 4 []))) Eq (IntegerConstant 10 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 4 i1) (IntegerConstant 10 (Integer 4 [])) ()) (= (Var 4 i2) (IntegerConstant 4 (Integer 4 [])) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i1) BitLShift (Var 4 i2) (Integer 4 []) ()) Eq (IntegerConstant 160 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i1) BitRShift (Var 4 i2) (Integer 4 []) ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i1) BitAnd (Var 4 i2) (Integer 4 []) ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i1) BitOr (Var 4 i2) (Integer 4 []) ()) Eq (IntegerConstant 14 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i1) BitXor (Var 4 i2) (Integer 4 []) ()) Eq (IntegerConstant 14 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (Var 4 i1) (Integer 4 []) ()) BitXor (IntegerUnaryMinus (Var 4 i2) (Integer 4 []) ()) (Integer 4 []) ()) Eq (IntegerConstant 10 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 4 i3) (IntegerConstant 432534534 (Integer 4 [])) ()) (= (Var 4 i4) (IntegerUnaryMinus (IntegerConstant 4325 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4325 (Integer 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i3) BitOr (Var 4 i4) (Integer 4 []) ()) Eq (IntegerUnaryMinus (IntegerConstant 225 (Integer 4 [])) (Integer 4 []) (IntegerConstant -225 (Integer 4 []))) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i4) BitRShift (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) ()) Eq (IntegerUnaryMinus (IntegerConstant 541 (Integer 4 [])) (Integer 4 []) (IntegerConstant -541 (Integer 4 []))) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (Var 4 i3) (Integer 4 []) ()) BitAnd (Var 4 i4) (Integer 4 []) ()) Eq (IntegerUnaryMinus (IntegerConstant 432534758 (Integer 4 [])) (Integer 4 []) (IntegerConstant -432534758 (Integer 4 []))) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (Var 4 i3) (Integer 4 []) ()) BitXor (Var 4 i4) (Integer 4 []) ()) Eq (IntegerConstant 432530657 (Integer 4 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), main_program: (Program (SymbolTable 77 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_mod: (Function (SymbolTable 3 {_lpython_return_variable: (Variable 3 _lpython_return_variable ReturnVar () () Default (Integer 4 []) Source Public Required .false.), _mod: (ExternalSymbol 3 _mod 6 _mod lpython_builtin [] _mod Private), a: (Variable 3 a In () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 3 b In () () Default (Integer 4 []) Source Public Required .false.)}) test_mod [(Var 3 a) (Var 3 b)] [(= (Var 3 _lpython_return_variable) (FunctionCall 1 _mod@__lpython_overloaded_0___mod 3 _mod [((Var 3 a)) ((Var 3 b))] (Integer 4 []) () ()) ()) (Return)] (Var 3 _lpython_return_variable) Source Public Implementation .false. ()), test_multiply: (Function (SymbolTable 2 {_lpython_return_variable: (Variable 2 _lpython_return_variable ReturnVar () () Default (Integer 4 []) Source Public Required .false.), a: (Variable 2 a In () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 2 b In () () Default (Integer 4 []) Source Public Required .false.)}) test_multiply [(Var 2 a) (Var 2 b)] [(= (Var 2 _lpython_return_variable) (IntegerBinOp (Var 2 a) Mul (Var 2 b) (Integer 4 []) ()) ()) (Return)] (Var 2 _lpython_return_variable) Source Public Implementation .false. ())}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 84 {}) _lpython_main_program [] [(SubroutineCall 1 main0 () [] ())] Source Public Implementation () .false. .false.), _mod@__lpython_overloaded_0___mod: (ExternalSymbol 1 _mod@__lpython_overloaded_0___mod 6 __lpython_overloaded_0___mod lpython_builtin [] __lpython_overloaded_0___mod Public), lpython_builtin: (IntrinsicModule lpython_builtin), main0: (Subroutine (SymbolTable 4 {_mod: (ExternalSymbol 4 _mod 6 _mod lpython_builtin [] _mod Private), a: (Variable 4 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 4 b Local () () Default (Integer 4 []) Source Public Required .false.), i: (Variable 4 i Local () () Default (Integer 8 []) Source Public Required .false.), i1: (Variable 4 i1 Local () () Default (Integer 4 []) Source Public Required .false.), i2: (Variable 4 i2 Local () () Default (Integer 4 []) Source Public Required .false.), i3: (Variable 4 i3 Local () () Default (Integer 4 []) Source Public Required .false.), i4: (Variable 4 i4 Local () () Default (Integer 4 []) Source Public Required .false.)}) main0 [] [(= (Var 4 a) (IntegerConstant 10 (Integer 4 [])) ()) (= (Var 4 b) (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 test_multiply () [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (IntegerUnaryMinus (IntegerConstant 50 (Integer 4 [])) (Integer 4 []) (IntegerConstant -50 (Integer 4 []))) (Logical 4 []) ()) ()) (= (Var 4 i) (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 4 i) (IntegerBinOp (Var 4 i) Add (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Integer 8 []) ()) ()) (Assert (IntegerCompare (Var 4 i) Eq (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Logical 4 []) ()) ()) (= (Var 4 a) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 4 b) (IntegerConstant 5 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 test_mod () [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (IntegerConstant 2 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 test_mod () [((IntegerConstant 23 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Integer 4 []) () ()) Eq (IntegerConstant 2 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 4 a) (IntegerConstant 123282374 (Integer 4 [])) ()) (= (Var 4 b) (IntegerConstant 32771 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 test_mod () [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (IntegerConstant 30643 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 4 a) (IntegerUnaryMinus (IntegerConstant 5345 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5345 (Integer 4 []))) ()) (= (Var 4 b) (IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 _mod@__lpython_overloaded_0___mod 4 _mod [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) (Logical 4 []) ()) ()) (= (Var 4 a) (IntegerUnaryMinus (IntegerConstant 123282374 (Integer 4 [])) (Integer 4 []) (IntegerConstant -123282374 (Integer 4 []))) ()) (= (Var 4 b) (IntegerConstant 32771 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 test_mod () [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (IntegerConstant 2128 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerConstant 10 (Integer 4 [])) BitOr (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant 14 (Integer 4 []))) Eq (IntegerConstant 14 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (IntegerConstant 105346 (Integer 4 [])) (Integer 4 []) (IntegerConstant -105346 (Integer 4 []))) BitOr (IntegerUnaryMinus (IntegerConstant 32771 (Integer 4 [])) (Integer 4 []) (IntegerConstant -32771 (Integer 4 []))) (Integer 4 []) (IntegerConstant -32769 (Integer 4 []))) Eq (IntegerUnaryMinus (IntegerConstant 32769 (Integer 4 [])) (Integer 4 []) (IntegerConstant -32769 (Integer 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerConstant 10 (Integer 4 [])) BitAnd (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (IntegerConstant 105346 (Integer 4 [])) (Integer 4 []) (IntegerConstant -105346 (Integer 4 []))) BitAnd (IntegerUnaryMinus (IntegerConstant 32771 (Integer 4 [])) (Integer 4 []) (IntegerConstant -32771 (Integer 4 []))) (Integer 4 []) (IntegerConstant -105348 (Integer 4 []))) Eq (IntegerUnaryMinus (IntegerConstant 105348 (Integer 4 [])) (Integer 4 []) (IntegerConstant -105348 (Integer 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerConstant 10 (Integer 4 [])) BitXor (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant 14 (Integer 4 []))) Eq (IntegerConstant 14 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (IntegerConstant 105346 (Integer 4 [])) (Integer 4 []) (IntegerConstant -105346 (Integer 4 []))) BitXor (IntegerUnaryMinus (IntegerConstant 32771 (Integer 4 [])) (Integer 4 []) (IntegerConstant -32771 (Integer 4 []))) (Integer 4 []) (IntegerConstant 72579 (Integer 4 []))) Eq (IntegerConstant 72579 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerConstant 10 (Integer 4 [])) BitRShift (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 5 (Integer 4 []))) Eq (IntegerConstant 5 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerConstant 5 (Integer 4 [])) BitLShift (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 10 (Integer 4 []))) Eq (IntegerConstant 10 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 4 i1) (IntegerConstant 10 (Integer 4 [])) ()) (= (Var 4 i2) (IntegerConstant 4 (Integer 4 [])) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i1) BitLShift (Var 4 i2) (Integer 4 []) ()) Eq (IntegerConstant 160 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i1) BitRShift (Var 4 i2) (Integer 4 []) ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i1) BitAnd (Var 4 i2) (Integer 4 []) ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i1) BitOr (Var 4 i2) (Integer 4 []) ()) Eq (IntegerConstant 14 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i1) BitXor (Var 4 i2) (Integer 4 []) ()) Eq (IntegerConstant 14 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (Var 4 i1) (Integer 4 []) ()) BitXor (IntegerUnaryMinus (Var 4 i2) (Integer 4 []) ()) (Integer 4 []) ()) Eq (IntegerConstant 10 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 4 i3) (IntegerConstant 432534534 (Integer 4 [])) ()) (= (Var 4 i4) (IntegerUnaryMinus (IntegerConstant 4325 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4325 (Integer 4 []))) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i3) BitOr (Var 4 i4) (Integer 4 []) ()) Eq (IntegerUnaryMinus (IntegerConstant 225 (Integer 4 [])) (Integer 4 []) (IntegerConstant -225 (Integer 4 []))) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (Var 4 i4) BitRShift (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) ()) Eq (IntegerUnaryMinus (IntegerConstant 541 (Integer 4 [])) (Integer 4 []) (IntegerConstant -541 (Integer 4 []))) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (Var 4 i3) (Integer 4 []) ()) BitAnd (Var 4 i4) (Integer 4 []) ()) Eq (IntegerUnaryMinus (IntegerConstant 432534758 (Integer 4 [])) (Integer 4 []) (IntegerConstant -432534758 (Integer 4 []))) (Logical 4 []) ()) ()) (Assert (IntegerCompare (IntegerBinOp (IntegerUnaryMinus (Var 4 i3) (Integer 4 []) ()) BitXor (Var 4 i4) (Integer 4 []) ()) Eq (IntegerConstant 432530657 (Integer 4 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), main_program: (Program (SymbolTable 83 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_mod: (Function (SymbolTable 3 {_lpython_return_variable: (Variable 3 _lpython_return_variable ReturnVar () () Default (Integer 4 []) Source Public Required .false.), _mod: (ExternalSymbol 3 _mod 6 _mod lpython_builtin [] _mod Private), a: (Variable 3 a In () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 3 b In () () Default (Integer 4 []) Source Public Required .false.)}) test_mod [(Var 3 a) (Var 3 b)] [(= (Var 3 _lpython_return_variable) (FunctionCall 1 _mod@__lpython_overloaded_0___mod 3 _mod [((Var 3 a)) ((Var 3 b))] (Integer 4 []) () ()) ()) (Return)] (Var 3 _lpython_return_variable) Source Public Implementation .false. ()), test_multiply: (Function (SymbolTable 2 {_lpython_return_variable: (Variable 2 _lpython_return_variable ReturnVar () () Default (Integer 4 []) Source Public Required .false.), a: (Variable 2 a In () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 2 b In () () Default (Integer 4 []) Source Public Required .false.)}) test_multiply [(Var 2 a) (Var 2 b)] [(= (Var 2 _lpython_return_variable) (IntegerBinOp (Var 2 a) Mul (Var 2 b) (Integer 4 []) ()) ()) (Return)] (Var 2 _lpython_return_variable) Source Public Implementation .false. ())}) []) diff --git a/tests/reference/asr-structs_05-fa98307.json b/tests/reference/asr-structs_05-fa98307.json index 5b7f714b96..1eed17d3c4 100644 --- a/tests/reference/asr-structs_05-fa98307.json +++ b/tests/reference/asr-structs_05-fa98307.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-structs_05-fa98307.stdout", - "stdout_hash": "e86c1c566afa63752732b59f793c8b32c86625d9488d1ca8e085738d", + "stdout_hash": "a39b52e1a8664dfce33aaf39acfe431d4fe8beb71671399e0f5ef904", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-structs_05-fa98307.stdout b/tests/reference/asr-structs_05-fa98307.stdout index 0b1fea2367..328fa1b3bf 100644 --- a/tests/reference/asr-structs_05-fa98307.stdout +++ b/tests/reference/asr-structs_05-fa98307.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {A: (DerivedType (SymbolTable 2 {x: (Variable 2 x Local () () Default (Integer 4 []) Source Public Required .false.), y: (Variable 2 y Local () () Default (Real 8 []) Source Public Required .false.)}) A [y x] Source Public ()), _lpython_main_program: (Subroutine (SymbolTable 80 {}) _lpython_main_program [] [(SubroutineCall 1 g () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 8 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), g: (Subroutine (SymbolTable 6 {y: (Variable 6 y Local () () Default (Derived 1 A [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 1 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))))]) Source Public Required .false.)}) g [] [(= (ArrayItem (Var 6 y) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()) (DerivedTypeConstructor 1 A [(RealConstant 1.10000000000000009e+00 (Real 8 [])) (IntegerConstant 1 (Integer 4 []))] (Derived 1 A []) ()) ()) (= (ArrayItem (Var 6 y) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) (DerivedTypeConstructor 1 A [(RealConstant 2.20000000000000018e+00 (Real 8 [])) (IntegerConstant 2 (Integer 4 []))] (Derived 1 A []) ()) ()) (SubroutineCall 1 verify () [((Var 6 y)) ((IntegerConstant 1 (Integer 4 []))) ((RealConstant 1.10000000000000009e+00 (Real 8 []))) ((IntegerConstant 2 (Integer 4 []))) ((RealConstant 2.20000000000000018e+00 (Real 8 [])))] ()) (SubroutineCall 1 update_1 () [((ArrayItem (Var 6 y) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()))] ()) (SubroutineCall 1 update_2 () [((Var 6 y))] ()) (SubroutineCall 1 verify () [((Var 6 y)) ((IntegerConstant 2 (Integer 4 []))) ((RealConstant 1.19999999999999996e+00 (Real 8 []))) ((IntegerConstant 3 (Integer 4 []))) ((RealConstant 2.29999999999999982e+00 (Real 8 [])))] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 79 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), update_1: (Subroutine (SymbolTable 4 {s: (Variable 4 s In () () Default (Derived 1 A []) Source Public Required .false.)}) update_1 [(Var 4 s)] [(= (DerivedRef (Var 4 s) 2 x (Integer 4 []) ()) (IntegerConstant 2 (Integer 4 [])) ()) (= (DerivedRef (Var 4 s) 2 y (Real 8 []) ()) (RealConstant 1.19999999999999996e+00 (Real 8 [])) ())] Source Public Implementation () .false. .false.), update_2: (Subroutine (SymbolTable 5 {s: (Variable 5 s InOut () () Default (Derived 1 A [(() ())]) Source Public Required .false.)}) update_2 [(Var 5 s)] [(= (DerivedRef (ArrayItem (Var 5 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 x (Integer 4 []) ()) (IntegerConstant 3 (Integer 4 [])) ()) (= (DerivedRef (ArrayItem (Var 5 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 y (Real 8 []) ()) (RealConstant 2.29999999999999982e+00 (Real 8 [])) ())] Source Public Implementation () .false. .false.), verify: (Subroutine (SymbolTable 3 {abs: (ExternalSymbol 3 abs 8 abs lpython_builtin [] abs Private), eps: (Variable 3 eps Local () () Default (Real 8 []) Source Public Required .false.), s: (Variable 3 s InOut () () Default (Derived 1 A [(() ())]) Source Public Required .false.), x1: (Variable 3 x1 In () () Default (Integer 4 []) Source Public Required .false.), x2: (Variable 3 x2 In () () Default (Integer 4 []) Source Public Required .false.), y1: (Variable 3 y1 In () () Default (Real 8 []) Source Public Required .false.), y2: (Variable 3 y2 In () () Default (Real 8 []) Source Public Required .false.)}) verify [(Var 3 s) (Var 3 x1) (Var 3 y1) (Var 3 x2) (Var 3 y2)] [(= (Var 3 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (Print () [(DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 x (Integer 4 []) ()) (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 y (Real 8 []) ())] () ()) (Assert (IntegerCompare (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 x (Integer 4 []) ()) Eq (Var 3 x1) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 y (Real 8 []) ()) Sub (Var 3 y1) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Print () [(DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 x (Integer 4 []) ()) (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 y (Real 8 []) ())] () ()) (Assert (IntegerCompare (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 x (Integer 4 []) ()) Eq (Var 3 x2) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 y (Real 8 []) ()) Sub (Var 3 y2) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {A: (DerivedType (SymbolTable 2 {x: (Variable 2 x Local () () Default (Integer 4 []) Source Public Required .false.), y: (Variable 2 y Local () () Default (Real 8 []) Source Public Required .false.)}) A [y x] Source Public ()), _lpython_main_program: (Subroutine (SymbolTable 86 {}) _lpython_main_program [] [(SubroutineCall 1 g () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 8 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), g: (Subroutine (SymbolTable 6 {y: (Variable 6 y Local () () Default (Derived 1 A [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 1 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))))]) Source Public Required .false.)}) g [] [(= (ArrayItem (Var 6 y) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()) (DerivedTypeConstructor 1 A [(RealConstant 1.10000000000000009e+00 (Real 8 [])) (IntegerConstant 1 (Integer 4 []))] (Derived 1 A []) ()) ()) (= (ArrayItem (Var 6 y) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) (DerivedTypeConstructor 1 A [(RealConstant 2.20000000000000018e+00 (Real 8 [])) (IntegerConstant 2 (Integer 4 []))] (Derived 1 A []) ()) ()) (SubroutineCall 1 verify () [((Var 6 y)) ((IntegerConstant 1 (Integer 4 []))) ((RealConstant 1.10000000000000009e+00 (Real 8 []))) ((IntegerConstant 2 (Integer 4 []))) ((RealConstant 2.20000000000000018e+00 (Real 8 [])))] ()) (SubroutineCall 1 update_1 () [((ArrayItem (Var 6 y) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()))] ()) (SubroutineCall 1 update_2 () [((Var 6 y))] ()) (SubroutineCall 1 verify () [((Var 6 y)) ((IntegerConstant 2 (Integer 4 []))) ((RealConstant 1.19999999999999996e+00 (Real 8 []))) ((IntegerConstant 3 (Integer 4 []))) ((RealConstant 2.29999999999999982e+00 (Real 8 [])))] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 85 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), update_1: (Subroutine (SymbolTable 4 {s: (Variable 4 s In () () Default (Derived 1 A []) Source Public Required .false.)}) update_1 [(Var 4 s)] [(= (DerivedRef (Var 4 s) 2 x (Integer 4 []) ()) (IntegerConstant 2 (Integer 4 [])) ()) (= (DerivedRef (Var 4 s) 2 y (Real 8 []) ()) (RealConstant 1.19999999999999996e+00 (Real 8 [])) ())] Source Public Implementation () .false. .false.), update_2: (Subroutine (SymbolTable 5 {s: (Variable 5 s InOut () () Default (Derived 1 A [(() ())]) Source Public Required .false.)}) update_2 [(Var 5 s)] [(= (DerivedRef (ArrayItem (Var 5 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 x (Integer 4 []) ()) (IntegerConstant 3 (Integer 4 [])) ()) (= (DerivedRef (ArrayItem (Var 5 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 y (Real 8 []) ()) (RealConstant 2.29999999999999982e+00 (Real 8 [])) ())] Source Public Implementation () .false. .false.), verify: (Subroutine (SymbolTable 3 {abs: (ExternalSymbol 3 abs 8 abs lpython_builtin [] abs Private), eps: (Variable 3 eps Local () () Default (Real 8 []) Source Public Required .false.), s: (Variable 3 s InOut () () Default (Derived 1 A [(() ())]) Source Public Required .false.), x1: (Variable 3 x1 In () () Default (Integer 4 []) Source Public Required .false.), x2: (Variable 3 x2 In () () Default (Integer 4 []) Source Public Required .false.), y1: (Variable 3 y1 In () () Default (Real 8 []) Source Public Required .false.), y2: (Variable 3 y2 In () () Default (Real 8 []) Source Public Required .false.)}) verify [(Var 3 s) (Var 3 x1) (Var 3 y1) (Var 3 x2) (Var 3 y2)] [(= (Var 3 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (Print () [(DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 x (Integer 4 []) ()) (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 y (Real 8 []) ())] () ()) (Assert (IntegerCompare (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 x (Integer 4 []) ()) Eq (Var 3 x1) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 y (Real 8 []) ()) Sub (Var 3 y1) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Print () [(DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 x (Integer 4 []) ()) (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 y (Real 8 []) ())] () ()) (Assert (IntegerCompare (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 x (Integer 4 []) ()) Eq (Var 3 x2) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (DerivedRef (ArrayItem (Var 3 s) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Derived 1 A []) ()) 2 y (Real 8 []) ()) Sub (Var 3 y2) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_bool_binop-f856ef0.json b/tests/reference/asr-test_bool_binop-f856ef0.json index ce799a991c..483ed65e64 100644 --- a/tests/reference/asr-test_bool_binop-f856ef0.json +++ b/tests/reference/asr-test_bool_binop-f856ef0.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_bool_binop-f856ef0.stdout", - "stdout_hash": "12591811ca5a08d4190cdc57e1ac951992b277b2863f949ce364750a", + "stdout_hash": "64cc247de87a4593734f940828afb7445158bd5dc96e2aa8b154a23a", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_bool_binop-f856ef0.stdout b/tests/reference/asr-test_bool_binop-f856ef0.stdout index a7cd177193..082578f5ea 100644 --- a/tests/reference/asr-test_bool_binop-f856ef0.stdout +++ b/tests/reference/asr-test_bool_binop-f856ef0.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_floordiv@__lpython_overloaded_2___lpython_floordiv: (ExternalSymbol 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 4 __lpython_overloaded_2___lpython_floordiv lpython_builtin [] __lpython_overloaded_2___lpython_floordiv Public), _lpython_main_program: (Subroutine (SymbolTable 76 {}) _lpython_main_program [] [(SubroutineCall 1 f () [] ())] Source Public Implementation () .false. .false.), f: (Subroutine (SymbolTable 2 {_lpython_floordiv: (ExternalSymbol 2 _lpython_floordiv 4 _lpython_floordiv lpython_builtin [] _lpython_floordiv Private), b1: (Variable 2 b1 Local () () Default (Logical 4 []) Source Public Required .false.), b2: (Variable 2 b2 Local () () Default (Logical 4 []) Source Public Required .false.), f: (Variable 2 f Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.)}) f [] [(= (Var 2 i) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Add (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 2 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Sub (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerBinOp (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Mul (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 2 _lpython_floordiv [((Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ())) ((Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()))] (Integer 4 []) () ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 2 _lpython_floordiv [((Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ())) ((Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()))] (Integer 4 []) () ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Pow (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 b1) (LogicalConstant .false. (Logical 4 [])) ()) (= (Var 2 b2) (LogicalConstant .true. (Logical 4 [])) ()) (= (Var 2 f) (RealBinOp (Cast (Cast (Var 2 b1) LogicalToInteger (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) Div (Cast (Cast (Var 2 b2) LogicalToInteger (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) ()) (Assert (RealCompare (Var 2 f) Eq (RealConstant 0.00000000000000000e+00 (Real 8 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())])}) []) +(TranslationUnit (SymbolTable 1 {_lpython_floordiv@__lpython_overloaded_2___lpython_floordiv: (ExternalSymbol 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 4 __lpython_overloaded_2___lpython_floordiv lpython_builtin [] __lpython_overloaded_2___lpython_floordiv Public), _lpython_main_program: (Subroutine (SymbolTable 82 {}) _lpython_main_program [] [(SubroutineCall 1 f () [] ())] Source Public Implementation () .false. .false.), f: (Subroutine (SymbolTable 2 {_lpython_floordiv: (ExternalSymbol 2 _lpython_floordiv 4 _lpython_floordiv lpython_builtin [] _lpython_floordiv Private), b1: (Variable 2 b1 Local () () Default (Logical 4 []) Source Public Required .false.), b2: (Variable 2 b2 Local () () Default (Logical 4 []) Source Public Required .false.), f: (Variable 2 f Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.)}) f [] [(= (Var 2 i) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Add (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 2 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Sub (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerBinOp (Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Mul (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 2 _lpython_floordiv [((Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ())) ((Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()))] (Integer 4 []) () ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 2 _lpython_floordiv [((Cast (LogicalConstant .false. (Logical 4 [])) LogicalToInteger (Integer 4 []) ())) ((Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()))] (Integer 4 []) () ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerBinOp (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) Pow (Cast (LogicalConstant .true. (Logical 4 [])) LogicalToInteger (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (IntegerCompare (Var 2 i) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 b1) (LogicalConstant .false. (Logical 4 [])) ()) (= (Var 2 b2) (LogicalConstant .true. (Logical 4 [])) ()) (= (Var 2 f) (RealBinOp (Cast (Cast (Var 2 b1) LogicalToInteger (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) Div (Cast (Cast (Var 2 b2) LogicalToInteger (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) ()) (Assert (RealCompare (Var 2 f) Eq (RealConstant 0.00000000000000000e+00 (Real 8 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())])}) []) diff --git a/tests/reference/asr-test_builtin_abs-c74d2c9.json b/tests/reference/asr-test_builtin_abs-c74d2c9.json index 292b7d8191..8183063152 100644 --- a/tests/reference/asr-test_builtin_abs-c74d2c9.json +++ b/tests/reference/asr-test_builtin_abs-c74d2c9.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_abs-c74d2c9.stdout", - "stdout_hash": "8e06dea5918b9b268b0a6cb4d36e8000a615f2c9af38c36954aee328", + "stdout_hash": "499137ff8d60b99f32a12766f2a9a8656f7f1226510b1dbaa4cf013a", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_abs-c74d2c9.stdout b/tests/reference/asr-test_builtin_abs-c74d2c9.stdout index 1529ddfe26..f77dba395f 100644 --- a/tests/reference/asr-test_builtin_abs-c74d2c9.stdout +++ b/tests/reference/asr-test_builtin_abs-c74d2c9.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 76 {}) _lpython_main_program [] [(SubroutineCall 1 test_abs () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 4 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_1__abs: (ExternalSymbol 1 abs@__lpython_overloaded_1__abs 4 __lpython_overloaded_1__abs lpython_builtin [] __lpython_overloaded_1__abs Public), abs@__lpython_overloaded_2__abs: (ExternalSymbol 1 abs@__lpython_overloaded_2__abs 4 __lpython_overloaded_2__abs lpython_builtin [] __lpython_overloaded_2__abs Public), abs@__lpython_overloaded_3__abs: (ExternalSymbol 1 abs@__lpython_overloaded_3__abs 4 __lpython_overloaded_3__abs lpython_builtin [] __lpython_overloaded_3__abs Public), abs@__lpython_overloaded_4__abs: (ExternalSymbol 1 abs@__lpython_overloaded_4__abs 4 __lpython_overloaded_4__abs lpython_builtin [] __lpython_overloaded_4__abs Public), abs@__lpython_overloaded_5__abs: (ExternalSymbol 1 abs@__lpython_overloaded_5__abs 4 __lpython_overloaded_5__abs lpython_builtin [] __lpython_overloaded_5__abs Public), abs@__lpython_overloaded_6__abs: (ExternalSymbol 1 abs@__lpython_overloaded_6__abs 4 __lpython_overloaded_6__abs lpython_builtin [] __lpython_overloaded_6__abs Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_abs: (Subroutine (SymbolTable 2 {abs: (ExternalSymbol 2 abs 4 abs lpython_builtin [] abs Private), b: (Variable 2 b Local () () Default (Logical 4 []) Source Public Required .false.), i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.), i2: (Variable 2 i2 Local () () Default (Integer 8 []) Source Public Required .false.), i3: (Variable 2 i3 Local () () Default (Integer 1 []) Source Public Required .false.), i4: (Variable 2 i4 Local () () Default (Integer 2 []) Source Public Required .false.), x: (Variable 2 x Local () () Default (Real 8 []) Source Public Required .false.), x2: (Variable 2 x2 Local () () Default (Real 4 []) Source Public Required .false.)}) test_abs [] [(= (Var 2 x) (RealConstant 5.50000000000000000e+00 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((Var 2 x))] (Real 8 []) () ()) Eq (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Logical 4 []) ()) ()) (= (Var 2 x) (RealUnaryMinus (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -5.50000000000000000e+00 (Real 8 []))) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((Var 2 x))] (Real 8 []) () ()) Eq (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealConstant 5.50000000000000000e+00 (Real 8 [])))] (Real 8 []) (RealConstant 5.50000000000000000e+00 (Real 8 [])) ()) Eq (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealUnaryMinus (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -5.50000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 5.50000000000000000e+00 (Real 8 [])) ()) Eq (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 x2) (Cast (RealUnaryMinus (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -5.50000000000000000e+00 (Real 8 []))) RealToReal (Real 4 []) (RealConstant -5.50000000000000000e+00 (Real 4 []))) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_1__abs 2 abs [((Var 2 x2))] (Real 4 []) () ()) RealToReal (Real 8 []) ()) Eq (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 abs@__lpython_overloaded_4__abs 2 abs [((Var 2 i))] (Integer 4 []) () ()) Eq (IntegerConstant 5 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 abs@__lpython_overloaded_4__abs 2 abs [((IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))))] (Integer 4 []) (IntegerConstant 1 (Integer 4 [])) ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 i2) (Cast (IntegerUnaryMinus (IntegerConstant 6 (Integer 4 [])) (Integer 4 []) (IntegerConstant -6 (Integer 4 []))) IntegerToInteger (Integer 8 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 abs@__lpython_overloaded_5__abs 2 abs [((Var 2 i2))] (Integer 8 []) () ()) Eq (Cast (IntegerConstant 6 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Logical 4 []) ()) ()) (= (Var 2 i3) (Cast (IntegerUnaryMinus (IntegerConstant 7 (Integer 4 [])) (Integer 4 []) (IntegerConstant -7 (Integer 4 []))) IntegerToInteger (Integer 1 []) ()) ()) (Assert (IntegerCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_2__abs 2 abs [((Var 2 i3))] (Integer 1 []) () ()) IntegerToInteger (Integer 4 []) ()) Eq (IntegerConstant 7 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i4) (Cast (IntegerUnaryMinus (IntegerConstant 8 (Integer 4 [])) (Integer 4 []) (IntegerConstant -8 (Integer 4 []))) IntegerToInteger (Integer 2 []) ()) ()) (Assert (IntegerCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_3__abs 2 abs [((Var 2 i4))] (Integer 2 []) () ()) IntegerToInteger (Integer 4 []) ()) Eq (IntegerConstant 8 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 b) (LogicalConstant .true. (Logical 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 abs@__lpython_overloaded_6__abs 2 abs [((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 b) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 abs@__lpython_overloaded_6__abs 2 abs [((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 82 {}) _lpython_main_program [] [(SubroutineCall 1 test_abs () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 4 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_1__abs: (ExternalSymbol 1 abs@__lpython_overloaded_1__abs 4 __lpython_overloaded_1__abs lpython_builtin [] __lpython_overloaded_1__abs Public), abs@__lpython_overloaded_2__abs: (ExternalSymbol 1 abs@__lpython_overloaded_2__abs 4 __lpython_overloaded_2__abs lpython_builtin [] __lpython_overloaded_2__abs Public), abs@__lpython_overloaded_3__abs: (ExternalSymbol 1 abs@__lpython_overloaded_3__abs 4 __lpython_overloaded_3__abs lpython_builtin [] __lpython_overloaded_3__abs Public), abs@__lpython_overloaded_4__abs: (ExternalSymbol 1 abs@__lpython_overloaded_4__abs 4 __lpython_overloaded_4__abs lpython_builtin [] __lpython_overloaded_4__abs Public), abs@__lpython_overloaded_5__abs: (ExternalSymbol 1 abs@__lpython_overloaded_5__abs 4 __lpython_overloaded_5__abs lpython_builtin [] __lpython_overloaded_5__abs Public), abs@__lpython_overloaded_6__abs: (ExternalSymbol 1 abs@__lpython_overloaded_6__abs 4 __lpython_overloaded_6__abs lpython_builtin [] __lpython_overloaded_6__abs Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_abs: (Subroutine (SymbolTable 2 {abs: (ExternalSymbol 2 abs 4 abs lpython_builtin [] abs Private), b: (Variable 2 b Local () () Default (Logical 4 []) Source Public Required .false.), i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.), i2: (Variable 2 i2 Local () () Default (Integer 8 []) Source Public Required .false.), i3: (Variable 2 i3 Local () () Default (Integer 1 []) Source Public Required .false.), i4: (Variable 2 i4 Local () () Default (Integer 2 []) Source Public Required .false.), x: (Variable 2 x Local () () Default (Real 8 []) Source Public Required .false.), x2: (Variable 2 x2 Local () () Default (Real 4 []) Source Public Required .false.)}) test_abs [] [(= (Var 2 x) (RealConstant 5.50000000000000000e+00 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((Var 2 x))] (Real 8 []) () ()) Eq (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Logical 4 []) ()) ()) (= (Var 2 x) (RealUnaryMinus (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -5.50000000000000000e+00 (Real 8 []))) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((Var 2 x))] (Real 8 []) () ()) Eq (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealConstant 5.50000000000000000e+00 (Real 8 [])))] (Real 8 []) (RealConstant 5.50000000000000000e+00 (Real 8 [])) ()) Eq (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealUnaryMinus (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -5.50000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 5.50000000000000000e+00 (Real 8 [])) ()) Eq (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 x2) (Cast (RealUnaryMinus (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -5.50000000000000000e+00 (Real 8 []))) RealToReal (Real 4 []) (RealConstant -5.50000000000000000e+00 (Real 4 []))) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_1__abs 2 abs [((Var 2 x2))] (Real 4 []) () ()) RealToReal (Real 8 []) ()) Eq (RealConstant 5.50000000000000000e+00 (Real 8 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 abs@__lpython_overloaded_4__abs 2 abs [((Var 2 i))] (Integer 4 []) () ()) Eq (IntegerConstant 5 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 abs@__lpython_overloaded_4__abs 2 abs [((IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))))] (Integer 4 []) (IntegerConstant 1 (Integer 4 [])) ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 i2) (Cast (IntegerUnaryMinus (IntegerConstant 6 (Integer 4 [])) (Integer 4 []) (IntegerConstant -6 (Integer 4 []))) IntegerToInteger (Integer 8 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 abs@__lpython_overloaded_5__abs 2 abs [((Var 2 i2))] (Integer 8 []) () ()) Eq (Cast (IntegerConstant 6 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Logical 4 []) ()) ()) (= (Var 2 i3) (Cast (IntegerUnaryMinus (IntegerConstant 7 (Integer 4 [])) (Integer 4 []) (IntegerConstant -7 (Integer 4 []))) IntegerToInteger (Integer 1 []) ()) ()) (Assert (IntegerCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_2__abs 2 abs [((Var 2 i3))] (Integer 1 []) () ()) IntegerToInteger (Integer 4 []) ()) Eq (IntegerConstant 7 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i4) (Cast (IntegerUnaryMinus (IntegerConstant 8 (Integer 4 [])) (Integer 4 []) (IntegerConstant -8 (Integer 4 []))) IntegerToInteger (Integer 2 []) ()) ()) (Assert (IntegerCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_3__abs 2 abs [((Var 2 i4))] (Integer 2 []) () ()) IntegerToInteger (Integer 4 []) ()) Eq (IntegerConstant 8 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 b) (LogicalConstant .true. (Logical 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 abs@__lpython_overloaded_6__abs 2 abs [((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 b) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 abs@__lpython_overloaded_6__abs 2 abs [((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_builtin_bin-52ba9fa.json b/tests/reference/asr-test_builtin_bin-52ba9fa.json index 802f1e86b9..5083482036 100644 --- a/tests/reference/asr-test_builtin_bin-52ba9fa.json +++ b/tests/reference/asr-test_builtin_bin-52ba9fa.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_bin-52ba9fa.stdout", - "stdout_hash": "3038491e81e4c3a4cf24ad13dd7bdcee04c3dd98be0f8aca815e2390", + "stdout_hash": "f815aa4d263ce032d60aa2d36d4b0285b5b83a0603592a00a4f76655", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_bin-52ba9fa.stdout b/tests/reference/asr-test_builtin_bin-52ba9fa.stdout index 552b68a550..5f605da6e4 100644 --- a/tests/reference/asr-test_builtin_bin-52ba9fa.stdout +++ b/tests/reference/asr-test_builtin_bin-52ba9fa.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 76 {}) _lpython_main_program [] [(SubroutineCall 1 test_bin () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_bin: (Subroutine (SymbolTable 2 {bin: (ExternalSymbol 2 bin 4 bin lpython_builtin [] bin Private), i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.)}) test_bin [] [(= (Var 2 i) (IntegerConstant 5 (Integer 4 [])) ()) (Assert (StringCompare (FunctionCall 2 bin () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "0b101" (Character 1 5 () [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerConstant 64 (Integer 4 [])) ()) (Assert (StringCompare (FunctionCall 2 bin () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "0b1000000" (Character 1 9 () [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))) ()) (Assert (StringCompare (FunctionCall 2 bin () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "-0b1000010110" (Character 1 13 () [])) (Logical 4 []) ()) ()) (Assert (StringCompare (FunctionCall 2 bin () [((IntegerConstant 64 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0b1000000" (Character 1 1 () [])) ()) Eq (StringConstant "0b1000000" (Character 1 9 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (StringCompare (FunctionCall 2 bin () [((IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0b1000010110" (Character 1 1 () [])) ()) Eq (StringConstant "-0b1000010110" (Character 1 13 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 82 {}) _lpython_main_program [] [(SubroutineCall 1 test_bin () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_bin: (Subroutine (SymbolTable 2 {bin: (ExternalSymbol 2 bin 4 bin lpython_builtin [] bin Private), i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.)}) test_bin [] [(= (Var 2 i) (IntegerConstant 5 (Integer 4 [])) ()) (Assert (StringCompare (FunctionCall 2 bin () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "0b101" (Character 1 5 () [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerConstant 64 (Integer 4 [])) ()) (Assert (StringCompare (FunctionCall 2 bin () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "0b1000000" (Character 1 9 () [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))) ()) (Assert (StringCompare (FunctionCall 2 bin () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "-0b1000010110" (Character 1 13 () [])) (Logical 4 []) ()) ()) (Assert (StringCompare (FunctionCall 2 bin () [((IntegerConstant 64 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0b1000000" (Character 1 1 () [])) ()) Eq (StringConstant "0b1000000" (Character 1 9 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (StringCompare (FunctionCall 2 bin () [((IntegerUnaryMinus (IntegerConstant 534 (Integer 4 [])) (Integer 4 []) (IntegerConstant -534 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0b1000010110" (Character 1 1 () [])) ()) Eq (StringConstant "-0b1000010110" (Character 1 13 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_builtin_bool-330223a.json b/tests/reference/asr-test_builtin_bool-330223a.json index b54ed2579d..a1176582dd 100644 --- a/tests/reference/asr-test_builtin_bool-330223a.json +++ b/tests/reference/asr-test_builtin_bool-330223a.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_bool-330223a.stdout", - "stdout_hash": "77d067816d3e01b5a49ba96351da3aa289da231e4dfdcec558fda348", + "stdout_hash": "3beb60323421d518bfff0fb7db1c760a967f5b0b9d5df231497caa66", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_bool-330223a.stdout b/tests/reference/asr-test_builtin_bool-330223a.stdout index 78171dad84..244e9605af 100644 --- a/tests/reference/asr-test_builtin_bool-330223a.stdout +++ b/tests/reference/asr-test_builtin_bool-330223a.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 76 {}) _lpython_main_program [] [(SubroutineCall 1 test_bool () [] ())] Source Public Implementation () .false. .false.), complex@__lpython_overloaded_13__complex: (ExternalSymbol 1 complex@__lpython_overloaded_13__complex 4 __lpython_overloaded_13__complex lpython_builtin [] __lpython_overloaded_13__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 4 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_bool: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), a2: (Variable 2 a2 Local () () Default (Integer 8 []) Source Public Required .false.), a3: (Variable 2 a3 Local () () Default (Integer 1 []) Source Public Required .false.), a4: (Variable 2 a4 Local () () Default (Integer 2 []) Source Public Required .false.), b: (Variable 2 b Local () () Default (Logical 4 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 4 []) Source Public Required .false.), c1: (Variable 2 c1 Local () () Default (Complex 8 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 4 complex lpython_builtin [] complex Private), f: (Variable 2 f Local () () Default (Real 8 []) Source Public Required .false.), f2: (Variable 2 f2 Local () () Default (Real 4 []) Source Public Required .false.), s: (Variable 2 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_bool [] [(= (Var 2 a) (IntegerConstant 34 (Integer 4 [])) ()) (Assert (Cast (Var 2 a) IntegerToLogical (Logical 4 []) ()) ()) (= (Var 2 a) (IntegerConstant 0 (Integer 4 [])) ()) (Assert (LogicalNot (Cast (Var 2 a) IntegerToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (Assert (Cast (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) IntegerToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (LogicalNot (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a2) (Cast (IntegerConstant 34 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (Assert (Cast (Var 2 a2) IntegerToLogical (Logical 4 []) ()) ()) (= (Var 2 a3) (Cast (IntegerConstant 34 (Integer 4 [])) IntegerToInteger (Integer 1 []) ()) ()) (Assert (Cast (Var 2 a3) IntegerToLogical (Logical 4 []) ()) ()) (= (Var 2 a4) (Cast (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) IntegerToInteger (Integer 2 []) ()) ()) (Assert (Cast (Var 2 a4) IntegerToLogical (Logical 4 []) ()) ()) (= (Var 2 f) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) (Assert (LogicalNot (Cast (Var 2 f) RealToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (= (Var 2 f) (RealConstant 1.00000000000000000e+00 (Real 8 [])) ()) (Assert (Cast (Var 2 f) RealToLogical (Logical 4 []) ()) ()) (Assert (Cast (RealConstant 5.67868658000000011e+01 (Real 8 [])) RealToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (LogicalNot (Cast (RealConstant 0.00000000000000000e+00 (Real 8 [])) RealToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 f2) (Cast (RealUnaryMinus (RealConstant 2.35599999999999994e+02 (Real 8 [])) (Real 8 []) (RealConstant -2.35599999999999994e+02 (Real 8 []))) RealToReal (Real 4 []) (RealConstant -2.35599999999999994e+02 (Real 4 []))) ()) (Assert (Cast (Var 2 f2) RealToLogical (Logical 4 []) ()) ()) (= (Var 2 f2) (Cast (RealConstant 5.33999999999999969e-05 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 5.33999999999999969e-05 (Real 4 []))) ()) (Assert (Cast (Var 2 f2) RealToLogical (Logical 4 []) ()) ()) (= (Var 2 s) (StringConstant "" (Character 1 0 () [])) ()) (Assert (LogicalNot (Cast (Var 2 s) CharacterToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (= (Var 2 s) (StringConstant "str" (Character 1 3 () [])) ()) (Assert (Cast (Var 2 s) CharacterToLogical (Logical 4 []) ()) ()) (Assert (LogicalNot (Cast (StringConstant "" (Character 1 0 () [])) CharacterToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (Cast (StringConstant "str" (Character 1 3 () [])) CharacterToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 b) (LogicalConstant .true. (Logical 4 [])) ()) (Assert (Var 2 b) ()) (= (Var 2 b) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (LogicalNot (Var 2 b) (Logical 4 []) ()) ()) (Assert (LogicalConstant .true. (Logical 4 [])) ()) (Assert (LogicalNot (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 2 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 4 []))) ()) (Assert (Cast (Var 2 c) ComplexToLogical (Logical 4 []) ()) ()) (= (Var 2 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 0 (Integer 4 []))) ((IntegerConstant 0 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 4 []))) ()) (Assert (LogicalNot (Cast (Var 2 c) ComplexToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (Assert (LogicalNot (Cast (ComplexBinOp (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) ComplexToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 c1) (FunctionCall 1 complex@__lpython_overloaded_13__complex 2 complex [((IntegerConstant 0 (Integer 4 []))) ((RealConstant 1.00201999999999999e-01 (Real 8 [])))] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 1.00201999999999999e-01 (Complex 8 [])) ()) ()) (Assert (Cast (Var 2 c1) ComplexToLogical (Logical 4 []) ()) ()) (Assert (LogicalNot (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 0 (Integer 4 []))) ((IntegerConstant 0 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ComplexToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (Cast (ComplexBinOp (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 []))) ComplexToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 82 {}) _lpython_main_program [] [(SubroutineCall 1 test_bool () [] ())] Source Public Implementation () .false. .false.), complex@__lpython_overloaded_13__complex: (ExternalSymbol 1 complex@__lpython_overloaded_13__complex 4 __lpython_overloaded_13__complex lpython_builtin [] __lpython_overloaded_13__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 4 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_bool: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), a2: (Variable 2 a2 Local () () Default (Integer 8 []) Source Public Required .false.), a3: (Variable 2 a3 Local () () Default (Integer 1 []) Source Public Required .false.), a4: (Variable 2 a4 Local () () Default (Integer 2 []) Source Public Required .false.), b: (Variable 2 b Local () () Default (Logical 4 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 4 []) Source Public Required .false.), c1: (Variable 2 c1 Local () () Default (Complex 8 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 4 complex lpython_builtin [] complex Private), f: (Variable 2 f Local () () Default (Real 8 []) Source Public Required .false.), f2: (Variable 2 f2 Local () () Default (Real 4 []) Source Public Required .false.), s: (Variable 2 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_bool [] [(= (Var 2 a) (IntegerConstant 34 (Integer 4 [])) ()) (Assert (Cast (Var 2 a) IntegerToLogical (Logical 4 []) ()) ()) (= (Var 2 a) (IntegerConstant 0 (Integer 4 [])) ()) (Assert (LogicalNot (Cast (Var 2 a) IntegerToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (Assert (Cast (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) IntegerToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (LogicalNot (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a2) (Cast (IntegerConstant 34 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (Assert (Cast (Var 2 a2) IntegerToLogical (Logical 4 []) ()) ()) (= (Var 2 a3) (Cast (IntegerConstant 34 (Integer 4 [])) IntegerToInteger (Integer 1 []) ()) ()) (Assert (Cast (Var 2 a3) IntegerToLogical (Logical 4 []) ()) ()) (= (Var 2 a4) (Cast (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) IntegerToInteger (Integer 2 []) ()) ()) (Assert (Cast (Var 2 a4) IntegerToLogical (Logical 4 []) ()) ()) (= (Var 2 f) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) (Assert (LogicalNot (Cast (Var 2 f) RealToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (= (Var 2 f) (RealConstant 1.00000000000000000e+00 (Real 8 [])) ()) (Assert (Cast (Var 2 f) RealToLogical (Logical 4 []) ()) ()) (Assert (Cast (RealConstant 5.67868658000000011e+01 (Real 8 [])) RealToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (LogicalNot (Cast (RealConstant 0.00000000000000000e+00 (Real 8 [])) RealToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 f2) (Cast (RealUnaryMinus (RealConstant 2.35599999999999994e+02 (Real 8 [])) (Real 8 []) (RealConstant -2.35599999999999994e+02 (Real 8 []))) RealToReal (Real 4 []) (RealConstant -2.35599999999999994e+02 (Real 4 []))) ()) (Assert (Cast (Var 2 f2) RealToLogical (Logical 4 []) ()) ()) (= (Var 2 f2) (Cast (RealConstant 5.33999999999999969e-05 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 5.33999999999999969e-05 (Real 4 []))) ()) (Assert (Cast (Var 2 f2) RealToLogical (Logical 4 []) ()) ()) (= (Var 2 s) (StringConstant "" (Character 1 0 () [])) ()) (Assert (LogicalNot (Cast (Var 2 s) CharacterToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (= (Var 2 s) (StringConstant "str" (Character 1 3 () [])) ()) (Assert (Cast (Var 2 s) CharacterToLogical (Logical 4 []) ()) ()) (Assert (LogicalNot (Cast (StringConstant "" (Character 1 0 () [])) CharacterToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (Cast (StringConstant "str" (Character 1 3 () [])) CharacterToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 b) (LogicalConstant .true. (Logical 4 [])) ()) (Assert (Var 2 b) ()) (= (Var 2 b) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (LogicalNot (Var 2 b) (Logical 4 []) ()) ()) (Assert (LogicalConstant .true. (Logical 4 [])) ()) (Assert (LogicalNot (LogicalConstant .false. (Logical 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 2 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 4 []))) ()) (Assert (Cast (Var 2 c) ComplexToLogical (Logical 4 []) ()) ()) (= (Var 2 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 0 (Integer 4 []))) ((IntegerConstant 0 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 4 []))) ()) (Assert (LogicalNot (Cast (Var 2 c) ComplexToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (Assert (LogicalNot (Cast (ComplexBinOp (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) ComplexToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 c1) (FunctionCall 1 complex@__lpython_overloaded_13__complex 2 complex [((IntegerConstant 0 (Integer 4 []))) ((RealConstant 1.00201999999999999e-01 (Real 8 [])))] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 1.00201999999999999e-01 (Complex 8 [])) ()) ()) (Assert (Cast (Var 2 c1) ComplexToLogical (Logical 4 []) ()) ()) (Assert (LogicalNot (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 0 (Integer 4 []))) ((IntegerConstant 0 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ComplexToLogical (Logical 4 []) (LogicalConstant .false. (Logical 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (Cast (ComplexBinOp (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 []))) ComplexToLogical (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_builtin_hex-64bd268.json b/tests/reference/asr-test_builtin_hex-64bd268.json index d20af602b8..971b5de72a 100644 --- a/tests/reference/asr-test_builtin_hex-64bd268.json +++ b/tests/reference/asr-test_builtin_hex-64bd268.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_hex-64bd268.stdout", - "stdout_hash": "7659c11f1ccbf0f6a5151295e1cb0829ec13d741a737a105b35bb7a3", + "stdout_hash": "a61880c0671bfe515faf5ebd74dac0574b6ad0163d97e3477b4cdcfa", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_hex-64bd268.stdout b/tests/reference/asr-test_builtin_hex-64bd268.stdout index 84f0a7405e..75d0d8e7fb 100644 --- a/tests/reference/asr-test_builtin_hex-64bd268.stdout +++ b/tests/reference/asr-test_builtin_hex-64bd268.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 76 {}) _lpython_main_program [] [(SubroutineCall 1 test_hex () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_hex: (Subroutine (SymbolTable 2 {hex: (ExternalSymbol 2 hex 4 hex lpython_builtin [] hex Private), i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.)}) test_hex [] [(= (Var 2 i) (IntegerConstant 34 (Integer 4 [])) ()) (Assert (StringCompare (FunctionCall 2 hex () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "0x22" (Character 1 4 () [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerUnaryMinus (IntegerConstant 4235 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4235 (Integer 4 []))) ()) (Assert (StringCompare (FunctionCall 2 hex () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "-0x108b" (Character 1 7 () [])) (Logical 4 []) ()) ()) (Assert (StringCompare (FunctionCall 2 hex () [((IntegerConstant 34 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0x22" (Character 1 1 () [])) ()) Eq (StringConstant "0x22" (Character 1 4 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (StringCompare (FunctionCall 2 hex () [((IntegerUnaryMinus (IntegerConstant 4235 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4235 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0x108b" (Character 1 1 () [])) ()) Eq (StringConstant "-0x108b" (Character 1 7 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 82 {}) _lpython_main_program [] [(SubroutineCall 1 test_hex () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_hex: (Subroutine (SymbolTable 2 {hex: (ExternalSymbol 2 hex 4 hex lpython_builtin [] hex Private), i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.)}) test_hex [] [(= (Var 2 i) (IntegerConstant 34 (Integer 4 [])) ()) (Assert (StringCompare (FunctionCall 2 hex () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "0x22" (Character 1 4 () [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerUnaryMinus (IntegerConstant 4235 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4235 (Integer 4 []))) ()) (Assert (StringCompare (FunctionCall 2 hex () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "-0x108b" (Character 1 7 () [])) (Logical 4 []) ()) ()) (Assert (StringCompare (FunctionCall 2 hex () [((IntegerConstant 34 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0x22" (Character 1 1 () [])) ()) Eq (StringConstant "0x22" (Character 1 4 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (StringCompare (FunctionCall 2 hex () [((IntegerUnaryMinus (IntegerConstant 4235 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4235 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0x108b" (Character 1 1 () [])) ()) Eq (StringConstant "-0x108b" (Character 1 7 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_builtin_oct-20b9066.json b/tests/reference/asr-test_builtin_oct-20b9066.json index 128005fa1e..2628dda1c1 100644 --- a/tests/reference/asr-test_builtin_oct-20b9066.json +++ b/tests/reference/asr-test_builtin_oct-20b9066.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_oct-20b9066.stdout", - "stdout_hash": "6625db1e5a2c89265faa8a1ae706c17ebd6015cc87e9e83ee6ed8e21", + "stdout_hash": "fbd02280d85eab3126f74b5ba213bbaaa03de4e596a5ee07ec57ab1a", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_oct-20b9066.stdout b/tests/reference/asr-test_builtin_oct-20b9066.stdout index d13d53cf45..25886744a9 100644 --- a/tests/reference/asr-test_builtin_oct-20b9066.stdout +++ b/tests/reference/asr-test_builtin_oct-20b9066.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 76 {}) _lpython_main_program [] [(SubroutineCall 1 test_oct () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_oct: (Subroutine (SymbolTable 2 {i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.), oct: (ExternalSymbol 2 oct 4 oct lpython_builtin [] oct Private)}) test_oct [] [(= (Var 2 i) (IntegerConstant 34 (Integer 4 [])) ()) (Assert (StringCompare (FunctionCall 2 oct () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "0o42" (Character 1 4 () [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerUnaryMinus (IntegerConstant 4235 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4235 (Integer 4 []))) ()) (Assert (StringCompare (FunctionCall 2 oct () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "-0o10213" (Character 1 8 () [])) (Logical 4 []) ()) ()) (Assert (StringCompare (FunctionCall 2 oct () [((IntegerConstant 34 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0o42" (Character 1 1 () [])) ()) Eq (StringConstant "0o42" (Character 1 4 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (StringCompare (FunctionCall 2 oct () [((IntegerUnaryMinus (IntegerConstant 4235 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4235 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0o10213" (Character 1 1 () [])) ()) Eq (StringConstant "-0o10213" (Character 1 8 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 82 {}) _lpython_main_program [] [(SubroutineCall 1 test_oct () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_oct: (Subroutine (SymbolTable 2 {i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.), oct: (ExternalSymbol 2 oct 4 oct lpython_builtin [] oct Private)}) test_oct [] [(= (Var 2 i) (IntegerConstant 34 (Integer 4 [])) ()) (Assert (StringCompare (FunctionCall 2 oct () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "0o42" (Character 1 4 () [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerUnaryMinus (IntegerConstant 4235 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4235 (Integer 4 []))) ()) (Assert (StringCompare (FunctionCall 2 oct () [((Var 2 i))] (Character 1 -2 () []) () ()) Eq (StringConstant "-0o10213" (Character 1 8 () [])) (Logical 4 []) ()) ()) (Assert (StringCompare (FunctionCall 2 oct () [((IntegerConstant 34 (Integer 4 [])))] (Character 1 -2 () []) (StringConstant "0o42" (Character 1 1 () [])) ()) Eq (StringConstant "0o42" (Character 1 4 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (StringCompare (FunctionCall 2 oct () [((IntegerUnaryMinus (IntegerConstant 4235 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4235 (Integer 4 []))))] (Character 1 -2 () []) (StringConstant "-0o10213" (Character 1 1 () [])) ()) Eq (StringConstant "-0o10213" (Character 1 8 () [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_builtin_pow-f02fcda.json b/tests/reference/asr-test_builtin_pow-f02fcda.json index 355513f93e..e5a36c10fd 100644 --- a/tests/reference/asr-test_builtin_pow-f02fcda.json +++ b/tests/reference/asr-test_builtin_pow-f02fcda.json @@ -2,11 +2,11 @@ "basename": "asr-test_builtin_pow-f02fcda", "cmd": "lpython --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/test_builtin_pow.py", - "infile_hash": "5696eb31b14c38dcd0c4d04d12af41c66c8efd457a54b9adbce00229", + "infile_hash": "781905a37677f0db70db8bdd4e3047ee3d8d2ce4220f914f408ce0fa", "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_pow-f02fcda.stdout", - "stdout_hash": "90f44dd950b6fe1bdc1944323f229a1caea12c23fa58c967e73e8b9d", + "stdout_hash": "7d56bd4d75f6325cf29c475598d40cbcd777cbc58e25a9d51a8a7da7", "stderr": "asr-test_builtin_pow-f02fcda.stderr", "stderr_hash": "180e1adfbb0d9c63a2fffa31951bbd629b3f1950cf0d97ca1389efe5", "returncode": 0 diff --git a/tests/reference/asr-test_builtin_pow-f02fcda.stdout b/tests/reference/asr-test_builtin_pow-f02fcda.stdout index 511846aa19..06a6216010 100644 --- a/tests/reference/asr-test_builtin_pow-f02fcda.stdout +++ b/tests/reference/asr-test_builtin_pow-f02fcda.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 76 {}) _lpython_main_program [] [(SubroutineCall 1 test_pow () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 4 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 4 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), pow@__lpython_overloaded_0__pow: (ExternalSymbol 1 pow@__lpython_overloaded_0__pow 4 __lpython_overloaded_0__pow lpython_builtin [] __lpython_overloaded_0__pow Public), pow@__lpython_overloaded_1__pow: (ExternalSymbol 1 pow@__lpython_overloaded_1__pow 4 __lpython_overloaded_1__pow lpython_builtin [] __lpython_overloaded_1__pow Public), pow@__lpython_overloaded_2__pow: (ExternalSymbol 1 pow@__lpython_overloaded_2__pow 4 __lpython_overloaded_2__pow lpython_builtin [] __lpython_overloaded_2__pow Public), pow@__lpython_overloaded_3__pow: (ExternalSymbol 1 pow@__lpython_overloaded_3__pow 4 __lpython_overloaded_3__pow lpython_builtin [] __lpython_overloaded_3__pow Public), pow@__lpython_overloaded_4__pow: (ExternalSymbol 1 pow@__lpython_overloaded_4__pow 4 __lpython_overloaded_4__pow lpython_builtin [] __lpython_overloaded_4__pow Public), pow@__lpython_overloaded_5__pow: (ExternalSymbol 1 pow@__lpython_overloaded_5__pow 4 __lpython_overloaded_5__pow lpython_builtin [] __lpython_overloaded_5__pow Public), pow@__lpython_overloaded_6__pow: (ExternalSymbol 1 pow@__lpython_overloaded_6__pow 4 __lpython_overloaded_6__pow lpython_builtin [] __lpython_overloaded_6__pow Public), pow@__lpython_overloaded_7__pow: (ExternalSymbol 1 pow@__lpython_overloaded_7__pow 4 __lpython_overloaded_7__pow lpython_builtin [] __lpython_overloaded_7__pow Public), pow@__lpython_overloaded_8__pow: (ExternalSymbol 1 pow@__lpython_overloaded_8__pow 4 __lpython_overloaded_8__pow lpython_builtin [] __lpython_overloaded_8__pow Public), pow@__lpython_overloaded_9__pow: (ExternalSymbol 1 pow@__lpython_overloaded_9__pow 4 __lpython_overloaded_9__pow lpython_builtin [] __lpython_overloaded_9__pow Public), test_pow: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), a1: (Variable 2 a1 Local () () Default (Real 8 []) Source Public Required .false.), a2: (Variable 2 a2 Local () () Default (Real 8 []) Source Public Required .false.), abs: (ExternalSymbol 2 abs 4 abs lpython_builtin [] abs Private), b: (Variable 2 b Local () () Default (Integer 4 []) Source Public Required .false.), b1: (Variable 2 b1 Local () () Default (Logical 4 []) Source Public Required .false.), b2: (Variable 2 b2 Local () () Default (Logical 4 []) Source Public Required .false.), c1: (Variable 2 c1 Local () () Default (Complex 4 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 4 complex lpython_builtin [] complex Private), eps: (Variable 2 eps Local () () Default (Real 8 []) Source Public Required .false.), f1: (Variable 2 f1 Local () () Default (Real 4 []) Source Public Required .false.), f2: (Variable 2 f2 Local () () Default (Real 4 []) Source Public Required .false.), i1: (Variable 2 i1 Local () () Default (Integer 8 []) Source Public Required .false.), i2: (Variable 2 i2 Local () () Default (Integer 8 []) Source Public Required .false.), p: (Variable 2 p Local () () Default (Real 4 []) Source Public Required .false.), pow: (ExternalSymbol 2 pow 4 pow lpython_builtin [] pow Private), x: (Variable 2 x Local () () Default (Integer 4 []) Source Public Required .false.), y: (Variable 2 y Local () () Default (Real 8 []) Source Public Required .false.)}) test_pow [] [(= (Var 2 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (= (Var 2 a) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 2 b) (IntegerConstant 5 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((Var 2 a)) ((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 32 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 a) (IntegerConstant 6 (Integer 4 [])) ()) (= (Var 2 b) (IntegerConstant 3 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((Var 2 a)) ((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 216 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 a) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 2 b) (IntegerConstant 0 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((Var 2 a)) ((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 a) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 2 b) (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) ()) (= (Var 2 a) (IntegerConstant 6 (Integer 4 [])) ()) (= (Var 2 b) (IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 []))) ()) (= (Var 2 i1) (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 2 i2) (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_1__pow 2 pow [((Var 2 i1)) ((Var 2 i2))] (Integer 8 []) () ()) Eq (Cast (IntegerConstant 32 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Logical 4 []) ()) ()) (= (Var 2 i1) (Cast (IntegerConstant 6 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 2 i2) (Cast (IntegerUnaryMinus (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) (IntegerConstant -3 (Integer 4 []))) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 2 f1) (Cast (RealBinOp (Cast (IntegerConstant 525346 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 66456 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) RealToReal (Real 4 []) ()) ()) (= (Var 2 f2) (Cast (RealConstant 3.00000000000000000e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 3.00000000000000000e+00 (Real 4 []))) ()) (= (Var 2 p) (FunctionCall 1 pow@__lpython_overloaded_2__pow 2 pow [((Var 2 f1)) ((Var 2 f2))] (Real 4 []) () ()) ()) (= (Var 2 f1) (FunctionCall 1 pow@__lpython_overloaded_4__pow 2 pow [((Var 2 a)) ((Var 2 f2))] (Real 4 []) () ()) ()) (= (Var 2 f1) (FunctionCall 1 pow@__lpython_overloaded_5__pow 2 pow [((Var 2 f2)) ((Var 2 a))] (Real 4 []) () ()) ()) (= (Var 2 b1) (LogicalConstant .true. (Logical 4 [])) ()) (= (Var 2 b2) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_8__pow 2 pow [((Var 2 b1)) ((Var 2 b2))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_8__pow 2 pow [((Var 2 b2)) ((Var 2 b1))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_8__pow 2 pow [((Var 2 b1)) ((Var 2 b2))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_8__pow 2 pow [((LogicalConstant .false. (Logical 4 []))) ((LogicalConstant .false. (Logical 4 [])))] (Integer 4 []) (IntegerConstant 1 (Integer 4 [])) ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a1) (RealConstant 4.50000000000000000e+00 (Real 8 [])) ()) (= (Var 2 a2) (RealConstant 2.29999999999999982e+00 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_3__pow 2 pow [((Var 2 a1)) ((Var 2 a2))] (Real 8 []) () ()) Sub (RealConstant 3.17971929089206000e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_3__pow 2 pow [((Var 2 a2)) ((Var 2 a1))] (Real 8 []) () ()) Sub (RealConstant 4.24399889427765871e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (= (Var 2 x) (IntegerConstant 3 (Integer 4 [])) ()) (= (Var 2 y) (RealConstant 2.29999999999999982e+00 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_6__pow 2 pow [((Var 2 x)) ((Var 2 y))] (Real 8 []) () ()) Sub (RealConstant 1.25135025328431819e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_7__pow 2 pow [((Var 2 y)) ((Var 2 x))] (Real 8 []) () ()) Sub (RealConstant 1.21669999999999980e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_6__pow 2 pow [((Var 2 x)) ((RealConstant 5.50000000000000000e+00 (Real 8 [])))] (Real 8 []) () ()) Sub (RealConstant 4.20888346239237194e+02 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Cast (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 2 (Integer 4 []))) ((IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))))] (Integer 4 []) (RealConstant 5.00000000000000000e-01 (Real 8 [])) ()) IntegerToReal (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Cast (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 6 (Integer 4 []))) ((IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 []))))] (Integer 4 []) (RealConstant 7.71604938271604895e-04 (Real 8 [])) ()) IntegerToReal (Real 8 []) ()) Sub (RealConstant 7.71604938271604895e-04 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Cast (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerUnaryMinus (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) (IntegerConstant -3 (Integer 4 [])))) ((IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))))] (Integer 4 []) (RealConstant -4.11522633744856002e-03 (Real 8 [])) ()) IntegerToReal (Real 8 []) ()) Add (RealConstant 4.11522633744856002e-03 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Cast (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 6 (Integer 4 []))) ((IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 []))))] (Integer 4 []) (RealConstant 7.71604938271604895e-04 (Real 8 [])) ()) IntegerToReal (Real 8 []) ()) Sub (RealConstant 7.71604938271604895e-04 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_3__pow 2 pow [((RealConstant 4.50000000000000000e+00 (Real 8 []))) ((RealConstant 2.29999999999999982e+00 (Real 8 [])))] (Real 8 []) (RealConstant 3.17971929089206000e+01 (Real 8 [])) ()) Sub (RealConstant 3.17971929089206000e+01 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_3__pow 2 pow [((RealConstant 2.29999999999999982e+00 (Real 8 []))) ((RealConstant 0.00000000000000000e+00 (Real 8 [])))] (Real 8 []) (RealConstant 1.00000000000000000e+00 (Real 8 [])) ()) Sub (RealConstant 1.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_3__pow 2 pow [((RealConstant 2.29999999999999982e+00 (Real 8 []))) ((RealUnaryMinus (RealConstant 1.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -1.50000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 2.86687162345994395e-01 (Real 8 [])) ()) Sub (RealConstant 2.86687162345994395e-01 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_6__pow 2 pow [((IntegerConstant 2 (Integer 4 []))) ((RealConstant 3.39999999999999991e+00 (Real 8 [])))] (Real 8 []) (RealConstant 1.05560632861831536e+01 (Real 8 [])) ()) Sub (RealConstant 1.05560632861831536e+01 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_6__pow 2 pow [((IntegerConstant 2 (Integer 4 []))) ((RealUnaryMinus (RealConstant 3.39999999999999991e+00 (Real 8 [])) (Real 8 []) (RealConstant -3.39999999999999991e+00 (Real 8 []))))] (Real 8 []) (RealConstant 9.47322854068998882e-02 (Real 8 [])) ()) Sub (RealConstant 9.47322854068998882e-02 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_7__pow 2 pow [((RealConstant 3.39999999999999991e+00 (Real 8 []))) ((IntegerConstant 9 (Integer 4 [])))] (Real 8 []) (RealConstant 6.07169927664639836e+04 (Real 8 [])) ()) Sub (RealConstant 6.07169927664639836e+04 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_7__pow 2 pow [((RealConstant 0.00000000000000000e+00 (Real 8 []))) ((IntegerConstant 53 (Integer 4 [])))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Sub (RealConstant 0.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 16 (Integer 4 [])) ()) Eq (IntegerConstant 16 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_7__pow 2 pow [((RealUnaryMinus (RealConstant 4.23500000000000000e+03 (Real 8 [])) (Real 8 []) (RealConstant -4.23500000000000000e+03 (Real 8 [])))) ((IntegerConstant 52 (Integer 4 [])))] (Real 8 []) (RealConstant 3.94800380598526379e+188 (Real 8 [])) ()) Sub (RealConstant 3.94800380598526379e+188 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (= (Var 2 c1) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 5 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c1) (FunctionCall 1 pow@__lpython_overloaded_9__pow 2 pow [((Var 2 c1)) ((IntegerConstant 4 (Integer 4 [])))] (Complex 4 []) () ()) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 82 {}) _lpython_main_program [] [(SubroutineCall 1 test_pow () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 4 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 4 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), pow@__lpython_overloaded_0__pow: (ExternalSymbol 1 pow@__lpython_overloaded_0__pow 4 __lpython_overloaded_0__pow lpython_builtin [] __lpython_overloaded_0__pow Public), pow@__lpython_overloaded_10__pow: (ExternalSymbol 1 pow@__lpython_overloaded_10__pow 4 __lpython_overloaded_10__pow lpython_builtin [] __lpython_overloaded_10__pow Public), pow@__lpython_overloaded_11__pow: (ExternalSymbol 1 pow@__lpython_overloaded_11__pow 4 __lpython_overloaded_11__pow lpython_builtin [] __lpython_overloaded_11__pow Public), pow@__lpython_overloaded_1__pow: (ExternalSymbol 1 pow@__lpython_overloaded_1__pow 4 __lpython_overloaded_1__pow lpython_builtin [] __lpython_overloaded_1__pow Public), pow@__lpython_overloaded_2__pow: (ExternalSymbol 1 pow@__lpython_overloaded_2__pow 4 __lpython_overloaded_2__pow lpython_builtin [] __lpython_overloaded_2__pow Public), pow@__lpython_overloaded_3__pow: (ExternalSymbol 1 pow@__lpython_overloaded_3__pow 4 __lpython_overloaded_3__pow lpython_builtin [] __lpython_overloaded_3__pow Public), pow@__lpython_overloaded_4__pow: (ExternalSymbol 1 pow@__lpython_overloaded_4__pow 4 __lpython_overloaded_4__pow lpython_builtin [] __lpython_overloaded_4__pow Public), pow@__lpython_overloaded_5__pow: (ExternalSymbol 1 pow@__lpython_overloaded_5__pow 4 __lpython_overloaded_5__pow lpython_builtin [] __lpython_overloaded_5__pow Public), pow@__lpython_overloaded_6__pow: (ExternalSymbol 1 pow@__lpython_overloaded_6__pow 4 __lpython_overloaded_6__pow lpython_builtin [] __lpython_overloaded_6__pow Public), pow@__lpython_overloaded_7__pow: (ExternalSymbol 1 pow@__lpython_overloaded_7__pow 4 __lpython_overloaded_7__pow lpython_builtin [] __lpython_overloaded_7__pow Public), pow@__lpython_overloaded_8__pow: (ExternalSymbol 1 pow@__lpython_overloaded_8__pow 4 __lpython_overloaded_8__pow lpython_builtin [] __lpython_overloaded_8__pow Public), pow@__lpython_overloaded_9__pow: (ExternalSymbol 1 pow@__lpython_overloaded_9__pow 4 __lpython_overloaded_9__pow lpython_builtin [] __lpython_overloaded_9__pow Public), test_pow: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), a1: (Variable 2 a1 Local () () Default (Real 8 []) Source Public Required .false.), a2: (Variable 2 a2 Local () () Default (Real 8 []) Source Public Required .false.), abs: (ExternalSymbol 2 abs 4 abs lpython_builtin [] abs Private), b: (Variable 2 b Local () () Default (Integer 4 []) Source Public Required .false.), b1: (Variable 2 b1 Local () () Default (Logical 4 []) Source Public Required .false.), b2: (Variable 2 b2 Local () () Default (Logical 4 []) Source Public Required .false.), c1: (Variable 2 c1 Local () () Default (Complex 4 []) Source Public Required .false.), complex: (ExternalSymbol 2 complex 4 complex lpython_builtin [] complex Private), eps: (Variable 2 eps Local () () Default (Real 8 []) Source Public Required .false.), f1: (Variable 2 f1 Local () () Default (Real 4 []) Source Public Required .false.), f2: (Variable 2 f2 Local () () Default (Real 4 []) Source Public Required .false.), i: (Variable 2 i Local () () Default (Integer 8 []) Source Public Required .false.), i1: (Variable 2 i1 Local () () Default (Integer 8 []) Source Public Required .false.), i2: (Variable 2 i2 Local () () Default (Integer 8 []) Source Public Required .false.), j: (Variable 2 j Local () () Default (Integer 8 []) Source Public Required .false.), k: (Variable 2 k Local () () Default (Integer 8 []) Source Public Required .false.), p: (Variable 2 p Local () () Default (Real 4 []) Source Public Required .false.), pow: (ExternalSymbol 2 pow 4 pow lpython_builtin [] pow Private), x: (Variable 2 x Local () () Default (Integer 4 []) Source Public Required .false.), y: (Variable 2 y Local () () Default (Real 8 []) Source Public Required .false.)}) test_pow [] [(= (Var 2 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (= (Var 2 a) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 2 b) (IntegerConstant 5 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((Var 2 a)) ((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 32 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 a) (IntegerConstant 6 (Integer 4 [])) ()) (= (Var 2 b) (IntegerConstant 3 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((Var 2 a)) ((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 216 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 a) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 2 b) (IntegerConstant 0 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((Var 2 a)) ((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 a) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 2 b) (IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))) ()) (= (Var 2 a) (IntegerConstant 6 (Integer 4 [])) ()) (= (Var 2 b) (IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 []))) ()) (= (Var 2 i1) (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 2 i2) (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_1__pow 2 pow [((Var 2 i1)) ((Var 2 i2))] (Integer 8 []) () ()) Eq (Cast (IntegerConstant 32 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Logical 4 []) ()) ()) (= (Var 2 i1) (Cast (IntegerConstant 6 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 2 i2) (Cast (IntegerUnaryMinus (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) (IntegerConstant -3 (Integer 4 []))) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 2 f1) (Cast (RealBinOp (Cast (IntegerConstant 525346 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 66456 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) RealToReal (Real 4 []) ()) ()) (= (Var 2 f2) (Cast (RealConstant 3.00000000000000000e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 3.00000000000000000e+00 (Real 4 []))) ()) (= (Var 2 p) (FunctionCall 1 pow@__lpython_overloaded_2__pow 2 pow [((Var 2 f1)) ((Var 2 f2))] (Real 4 []) () ()) ()) (= (Var 2 f1) (FunctionCall 1 pow@__lpython_overloaded_4__pow 2 pow [((Var 2 a)) ((Var 2 f2))] (Real 4 []) () ()) ()) (= (Var 2 f1) (FunctionCall 1 pow@__lpython_overloaded_5__pow 2 pow [((Var 2 f2)) ((Var 2 a))] (Real 4 []) () ()) ()) (= (Var 2 b1) (LogicalConstant .true. (Logical 4 [])) ()) (= (Var 2 b2) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_8__pow 2 pow [((Var 2 b1)) ((Var 2 b2))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_8__pow 2 pow [((Var 2 b2)) ((Var 2 b1))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_8__pow 2 pow [((Var 2 b1)) ((Var 2 b2))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_8__pow 2 pow [((LogicalConstant .false. (Logical 4 []))) ((LogicalConstant .false. (Logical 4 [])))] (Integer 4 []) (IntegerConstant 1 (Integer 4 [])) ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 a1) (RealConstant 4.50000000000000000e+00 (Real 8 [])) ()) (= (Var 2 a2) (RealConstant 2.29999999999999982e+00 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_3__pow 2 pow [((Var 2 a1)) ((Var 2 a2))] (Real 8 []) () ()) Sub (RealConstant 3.17971929089206000e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_3__pow 2 pow [((Var 2 a2)) ((Var 2 a1))] (Real 8 []) () ()) Sub (RealConstant 4.24399889427765871e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (= (Var 2 x) (IntegerConstant 3 (Integer 4 [])) ()) (= (Var 2 y) (RealConstant 2.29999999999999982e+00 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_6__pow 2 pow [((Var 2 x)) ((Var 2 y))] (Real 8 []) () ()) Sub (RealConstant 1.25135025328431819e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_7__pow 2 pow [((Var 2 y)) ((Var 2 x))] (Real 8 []) () ()) Sub (RealConstant 1.21669999999999980e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_6__pow 2 pow [((Var 2 x)) ((RealConstant 5.50000000000000000e+00 (Real 8 [])))] (Real 8 []) () ()) Sub (RealConstant 4.20888346239237194e+02 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Cast (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 2 (Integer 4 []))) ((IntegerUnaryMinus (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant -1 (Integer 4 []))))] (Integer 4 []) (RealConstant 5.00000000000000000e-01 (Real 8 [])) ()) IntegerToReal (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Cast (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 6 (Integer 4 []))) ((IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 []))))] (Integer 4 []) (RealConstant 7.71604938271604895e-04 (Real 8 [])) ()) IntegerToReal (Real 8 []) ()) Sub (RealConstant 7.71604938271604895e-04 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Cast (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerUnaryMinus (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) (IntegerConstant -3 (Integer 4 [])))) ((IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))))] (Integer 4 []) (RealConstant -4.11522633744856002e-03 (Real 8 [])) ()) IntegerToReal (Real 8 []) ()) Add (RealConstant 4.11522633744856002e-03 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Cast (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 6 (Integer 4 []))) ((IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 []))))] (Integer 4 []) (RealConstant 7.71604938271604895e-04 (Real 8 [])) ()) IntegerToReal (Real 8 []) ()) Sub (RealConstant 7.71604938271604895e-04 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_3__pow 2 pow [((RealConstant 4.50000000000000000e+00 (Real 8 []))) ((RealConstant 2.29999999999999982e+00 (Real 8 [])))] (Real 8 []) (RealConstant 3.17971929089206000e+01 (Real 8 [])) ()) Sub (RealConstant 3.17971929089206000e+01 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_3__pow 2 pow [((RealConstant 2.29999999999999982e+00 (Real 8 []))) ((RealConstant 0.00000000000000000e+00 (Real 8 [])))] (Real 8 []) (RealConstant 1.00000000000000000e+00 (Real 8 [])) ()) Sub (RealConstant 1.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_3__pow 2 pow [((RealConstant 2.29999999999999982e+00 (Real 8 []))) ((RealUnaryMinus (RealConstant 1.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -1.50000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 2.86687162345994395e-01 (Real 8 [])) ()) Sub (RealConstant 2.86687162345994395e-01 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_6__pow 2 pow [((IntegerConstant 2 (Integer 4 []))) ((RealConstant 3.39999999999999991e+00 (Real 8 [])))] (Real 8 []) (RealConstant 1.05560632861831536e+01 (Real 8 [])) ()) Sub (RealConstant 1.05560632861831536e+01 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_6__pow 2 pow [((IntegerConstant 2 (Integer 4 []))) ((RealUnaryMinus (RealConstant 3.39999999999999991e+00 (Real 8 [])) (Real 8 []) (RealConstant -3.39999999999999991e+00 (Real 8 []))))] (Real 8 []) (RealConstant 9.47322854068998882e-02 (Real 8 [])) ()) Sub (RealConstant 9.47322854068998882e-02 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_7__pow 2 pow [((RealConstant 3.39999999999999991e+00 (Real 8 []))) ((IntegerConstant 9 (Integer 4 [])))] (Real 8 []) (RealConstant 6.07169927664639836e+04 (Real 8 [])) ()) Sub (RealConstant 6.07169927664639836e+04 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_7__pow 2 pow [((RealConstant 0.00000000000000000e+00 (Real 8 []))) ((IntegerConstant 53 (Integer 4 [])))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Sub (RealConstant 0.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 16 (Integer 4 [])) ()) Eq (IntegerConstant 16 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (FunctionCall 1 pow@__lpython_overloaded_7__pow 2 pow [((RealUnaryMinus (RealConstant 4.23500000000000000e+03 (Real 8 [])) (Real 8 []) (RealConstant -4.23500000000000000e+03 (Real 8 [])))) ((IntegerConstant 52 (Integer 4 [])))] (Real 8 []) (RealConstant 3.94800380598526379e+188 (Real 8 [])) ()) Sub (RealConstant 3.94800380598526379e+188 (Real 8 [])) (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 []))))] (Real 8 []) (RealConstant 0.00000000000000000e+00 (Real 8 [])) ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (= (Var 2 i) (Cast (IntegerConstant 7 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 2 j) (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 2 k) (Cast (IntegerConstant 5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_11__pow 2 pow [((Var 2 i)) ((Var 2 j)) ((Var 2 k))] (Integer 8 []) () ()) Eq (Cast (IntegerConstant 4 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 pow@__lpython_overloaded_10__pow 2 pow [((IntegerConstant 102 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 121 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 38 (Integer 4 [])) ()) Eq (IntegerConstant 38 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 c1) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 2 complex [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 5 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 2 c1) (FunctionCall 1 pow@__lpython_overloaded_9__pow 2 pow [((Var 2 c1)) ((IntegerConstant 4 (Integer 4 [])))] (Complex 4 []) () ()) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_builtin_round-7417a21.json b/tests/reference/asr-test_builtin_round-7417a21.json index c797a2ce76..5439fc094c 100644 --- a/tests/reference/asr-test_builtin_round-7417a21.json +++ b/tests/reference/asr-test_builtin_round-7417a21.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_round-7417a21.stdout", - "stdout_hash": "e10febb90fd687f39b9e1bc5ceb249137367b8861e4836548b44997b", + "stdout_hash": "7cb83bbf16141ce3abec85fc2869f02fefa0602b706ea2fd2cd4fc85", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_round-7417a21.stdout b/tests/reference/asr-test_builtin_round-7417a21.stdout index 5a40c23f4f..e66ae1982c 100644 --- a/tests/reference/asr-test_builtin_round-7417a21.stdout +++ b/tests/reference/asr-test_builtin_round-7417a21.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 76 {}) _lpython_main_program [] [(SubroutineCall 1 test_round () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 75 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), round@__lpython_overloaded_0__round: (ExternalSymbol 1 round@__lpython_overloaded_0__round 4 __lpython_overloaded_0__round lpython_builtin [] __lpython_overloaded_0__round Public), round@__lpython_overloaded_1__round: (ExternalSymbol 1 round@__lpython_overloaded_1__round 4 __lpython_overloaded_1__round lpython_builtin [] __lpython_overloaded_1__round Public), round@__lpython_overloaded_2__round: (ExternalSymbol 1 round@__lpython_overloaded_2__round 4 __lpython_overloaded_2__round lpython_builtin [] __lpython_overloaded_2__round Public), round@__lpython_overloaded_3__round: (ExternalSymbol 1 round@__lpython_overloaded_3__round 4 __lpython_overloaded_3__round lpython_builtin [] __lpython_overloaded_3__round Public), round@__lpython_overloaded_4__round: (ExternalSymbol 1 round@__lpython_overloaded_4__round 4 __lpython_overloaded_4__round lpython_builtin [] __lpython_overloaded_4__round Public), round@__lpython_overloaded_5__round: (ExternalSymbol 1 round@__lpython_overloaded_5__round 4 __lpython_overloaded_5__round lpython_builtin [] __lpython_overloaded_5__round Public), round@__lpython_overloaded_6__round: (ExternalSymbol 1 round@__lpython_overloaded_6__round 4 __lpython_overloaded_6__round lpython_builtin [] __lpython_overloaded_6__round Public), test_round: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Logical 4 []) Source Public Required .false.), f: (Variable 2 f Local () () Default (Real 8 []) Source Public Required .false.), f2: (Variable 2 f2 Local () () Default (Real 4 []) Source Public Required .false.), i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.), i2: (Variable 2 i2 Local () () Default (Integer 1 []) Source Public Required .false.), i3: (Variable 2 i3 Local () () Default (Integer 2 []) Source Public Required .false.), i4: (Variable 2 i4 Local () () Default (Integer 8 []) Source Public Required .false.), round: (ExternalSymbol 2 round 4 round lpython_builtin [] round Private)}) test_round [] [(= (Var 2 f) (RealConstant 5.67799999999999994e+00 (Real 8 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerConstant 6 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 f) (RealUnaryMinus (RealConstant 1.83745230000000010e+05 (Real 8 [])) (Real 8 []) (RealConstant -1.83745230000000010e+05 (Real 8 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerUnaryMinus (IntegerConstant 183745 (Integer 4 [])) (Integer 4 []) (IntegerConstant -183745 (Integer 4 []))) (Logical 4 []) ()) ()) (= (Var 2 f) (RealConstant 4.43400000000000034e+01 (Real 8 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerConstant 44 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 f) (RealConstant 5.00000000000000000e-01 (Real 8 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 f) (RealUnaryMinus (RealConstant 5.05000000000000000e+01 (Real 8 [])) (Real 8 []) (RealConstant -5.05000000000000000e+01 (Real 8 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerUnaryMinus (IntegerConstant 50 (Integer 4 [])) (Integer 4 []) (IntegerConstant -50 (Integer 4 []))) (Logical 4 []) ()) ()) (= (Var 2 f) (RealConstant 1.50000000000000000e+00 (Real 8 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerConstant 2 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealConstant 1.30009999999999994e+01 (Real 8 [])))] (Integer 4 []) (IntegerConstant 13 (Integer 4 [])) ()) Eq (IntegerConstant 13 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealUnaryMinus (RealConstant 4.04999899999999968e+01 (Real 8 [])) (Real 8 []) (RealConstant -4.04999899999999968e+01 (Real 8 []))))] (Integer 4 []) (IntegerConstant -40 (Integer 4 [])) ()) Eq (IntegerUnaryMinus (IntegerConstant 40 (Integer 4 [])) (Integer 4 []) (IntegerConstant -40 (Integer 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealConstant 5.00000000000000000e-01 (Real 8 [])))] (Integer 4 []) (IntegerConstant 0 (Integer 4 [])) ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealUnaryMinus (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) (RealConstant -5.00000000000000000e-01 (Real 8 []))))] (Integer 4 []) (IntegerConstant 0 (Integer 4 [])) ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealConstant 1.50000000000000000e+00 (Real 8 [])))] (Integer 4 []) (IntegerConstant 2 (Integer 4 [])) ()) Eq (IntegerConstant 2 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealConstant 5.05000000000000000e+01 (Real 8 [])))] (Integer 4 []) (IntegerConstant 50 (Integer 4 [])) ()) Eq (IntegerConstant 50 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealConstant 5.67800000000000011e+01 (Real 8 [])))] (Integer 4 []) (IntegerConstant 57 (Integer 4 [])) ()) Eq (IntegerConstant 57 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 f2) (Cast (RealConstant 5.67799999999999994e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 5.67799999999999994e+00 (Real 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_1__round 2 round [((Var 2 f2))] (Integer 4 []) () ()) Eq (IntegerConstant 6 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_2__round 2 round [((Var 2 i))] (Integer 4 []) () ()) Eq (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_2__round 2 round [((IntegerConstant 4 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 4 (Integer 4 [])) ()) Eq (IntegerConstant 4 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 i2) (Cast (IntegerConstant 7 (Integer 4 [])) IntegerToInteger (Integer 1 []) ()) ()) (Assert (IntegerCompare (Cast (FunctionCall 1 round@__lpython_overloaded_4__round 2 round [((Var 2 i2))] (Integer 1 []) () ()) IntegerToInteger (Integer 4 []) ()) Eq (IntegerConstant 7 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i3) (Cast (IntegerUnaryMinus (IntegerConstant 8 (Integer 4 [])) (Integer 4 []) (IntegerConstant -8 (Integer 4 []))) IntegerToInteger (Integer 2 []) ()) ()) (Assert (IntegerCompare (Cast (FunctionCall 1 round@__lpython_overloaded_5__round 2 round [((Var 2 i3))] (Integer 2 []) () ()) IntegerToInteger (Integer 4 []) ()) Eq (IntegerUnaryMinus (IntegerConstant 8 (Integer 4 [])) (Integer 4 []) (IntegerConstant -8 (Integer 4 []))) (Logical 4 []) ()) ()) (= (Var 2 i4) (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_3__round 2 round [((Var 2 i4))] (Integer 8 []) () ()) Eq (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Logical 4 []) ()) ()) (= (Var 2 b) (LogicalConstant .true. (Logical 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_6__round 2 round [((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 b) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_6__round 2 round [((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_6__round 2 round [((LogicalConstant .false. (Logical 4 [])))] (Integer 4 []) (IntegerConstant 0 (Integer 4 [])) ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 82 {}) _lpython_main_program [] [(SubroutineCall 1 test_round () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 81 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), round@__lpython_overloaded_0__round: (ExternalSymbol 1 round@__lpython_overloaded_0__round 4 __lpython_overloaded_0__round lpython_builtin [] __lpython_overloaded_0__round Public), round@__lpython_overloaded_1__round: (ExternalSymbol 1 round@__lpython_overloaded_1__round 4 __lpython_overloaded_1__round lpython_builtin [] __lpython_overloaded_1__round Public), round@__lpython_overloaded_2__round: (ExternalSymbol 1 round@__lpython_overloaded_2__round 4 __lpython_overloaded_2__round lpython_builtin [] __lpython_overloaded_2__round Public), round@__lpython_overloaded_3__round: (ExternalSymbol 1 round@__lpython_overloaded_3__round 4 __lpython_overloaded_3__round lpython_builtin [] __lpython_overloaded_3__round Public), round@__lpython_overloaded_4__round: (ExternalSymbol 1 round@__lpython_overloaded_4__round 4 __lpython_overloaded_4__round lpython_builtin [] __lpython_overloaded_4__round Public), round@__lpython_overloaded_5__round: (ExternalSymbol 1 round@__lpython_overloaded_5__round 4 __lpython_overloaded_5__round lpython_builtin [] __lpython_overloaded_5__round Public), round@__lpython_overloaded_6__round: (ExternalSymbol 1 round@__lpython_overloaded_6__round 4 __lpython_overloaded_6__round lpython_builtin [] __lpython_overloaded_6__round Public), test_round: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Logical 4 []) Source Public Required .false.), f: (Variable 2 f Local () () Default (Real 8 []) Source Public Required .false.), f2: (Variable 2 f2 Local () () Default (Real 4 []) Source Public Required .false.), i: (Variable 2 i Local () () Default (Integer 4 []) Source Public Required .false.), i2: (Variable 2 i2 Local () () Default (Integer 1 []) Source Public Required .false.), i3: (Variable 2 i3 Local () () Default (Integer 2 []) Source Public Required .false.), i4: (Variable 2 i4 Local () () Default (Integer 8 []) Source Public Required .false.), round: (ExternalSymbol 2 round 4 round lpython_builtin [] round Private)}) test_round [] [(= (Var 2 f) (RealConstant 5.67799999999999994e+00 (Real 8 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerConstant 6 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 f) (RealUnaryMinus (RealConstant 1.83745230000000010e+05 (Real 8 [])) (Real 8 []) (RealConstant -1.83745230000000010e+05 (Real 8 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerUnaryMinus (IntegerConstant 183745 (Integer 4 [])) (Integer 4 []) (IntegerConstant -183745 (Integer 4 []))) (Logical 4 []) ()) ()) (= (Var 2 f) (RealConstant 4.43400000000000034e+01 (Real 8 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerConstant 44 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 f) (RealConstant 5.00000000000000000e-01 (Real 8 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 f) (RealUnaryMinus (RealConstant 5.05000000000000000e+01 (Real 8 [])) (Real 8 []) (RealConstant -5.05000000000000000e+01 (Real 8 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerUnaryMinus (IntegerConstant 50 (Integer 4 [])) (Integer 4 []) (IntegerConstant -50 (Integer 4 []))) (Logical 4 []) ()) ()) (= (Var 2 f) (RealConstant 1.50000000000000000e+00 (Real 8 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((Var 2 f))] (Integer 4 []) () ()) Eq (IntegerConstant 2 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealConstant 1.30009999999999994e+01 (Real 8 [])))] (Integer 4 []) (IntegerConstant 13 (Integer 4 [])) ()) Eq (IntegerConstant 13 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealUnaryMinus (RealConstant 4.04999899999999968e+01 (Real 8 [])) (Real 8 []) (RealConstant -4.04999899999999968e+01 (Real 8 []))))] (Integer 4 []) (IntegerConstant -40 (Integer 4 [])) ()) Eq (IntegerUnaryMinus (IntegerConstant 40 (Integer 4 [])) (Integer 4 []) (IntegerConstant -40 (Integer 4 []))) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealConstant 5.00000000000000000e-01 (Real 8 [])))] (Integer 4 []) (IntegerConstant 0 (Integer 4 [])) ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealUnaryMinus (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) (RealConstant -5.00000000000000000e-01 (Real 8 []))))] (Integer 4 []) (IntegerConstant 0 (Integer 4 [])) ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealConstant 1.50000000000000000e+00 (Real 8 [])))] (Integer 4 []) (IntegerConstant 2 (Integer 4 [])) ()) Eq (IntegerConstant 2 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealConstant 5.05000000000000000e+01 (Real 8 [])))] (Integer 4 []) (IntegerConstant 50 (Integer 4 [])) ()) Eq (IntegerConstant 50 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_0__round 2 round [((RealConstant 5.67800000000000011e+01 (Real 8 [])))] (Integer 4 []) (IntegerConstant 57 (Integer 4 [])) ()) Eq (IntegerConstant 57 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 f2) (Cast (RealConstant 5.67799999999999994e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 5.67799999999999994e+00 (Real 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_1__round 2 round [((Var 2 f2))] (Integer 4 []) () ()) Eq (IntegerConstant 6 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i) (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_2__round 2 round [((Var 2 i))] (Integer 4 []) () ()) Eq (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_2__round 2 round [((IntegerConstant 4 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 4 (Integer 4 [])) ()) Eq (IntegerConstant 4 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (= (Var 2 i2) (Cast (IntegerConstant 7 (Integer 4 [])) IntegerToInteger (Integer 1 []) ()) ()) (Assert (IntegerCompare (Cast (FunctionCall 1 round@__lpython_overloaded_4__round 2 round [((Var 2 i2))] (Integer 1 []) () ()) IntegerToInteger (Integer 4 []) ()) Eq (IntegerConstant 7 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 i3) (Cast (IntegerUnaryMinus (IntegerConstant 8 (Integer 4 [])) (Integer 4 []) (IntegerConstant -8 (Integer 4 []))) IntegerToInteger (Integer 2 []) ()) ()) (Assert (IntegerCompare (Cast (FunctionCall 1 round@__lpython_overloaded_5__round 2 round [((Var 2 i3))] (Integer 2 []) () ()) IntegerToInteger (Integer 4 []) ()) Eq (IntegerUnaryMinus (IntegerConstant 8 (Integer 4 [])) (Integer 4 []) (IntegerConstant -8 (Integer 4 []))) (Logical 4 []) ()) ()) (= (Var 2 i4) (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_3__round 2 round [((Var 2 i4))] (Integer 8 []) () ()) Eq (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) (Logical 4 []) ()) ()) (= (Var 2 b) (LogicalConstant .true. (Logical 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_6__round 2 round [((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (= (Var 2 b) (LogicalConstant .false. (Logical 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_6__round 2 round [((Var 2 b))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 round@__lpython_overloaded_6__round 2 round [((LogicalConstant .false. (Logical 4 [])))] (Integer 4 []) (IntegerConstant 0 (Integer 4 [])) ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_c_interop_01-e374f43.json b/tests/reference/asr-test_c_interop_01-e374f43.json index 94812bcea8..229affad23 100644 --- a/tests/reference/asr-test_c_interop_01-e374f43.json +++ b/tests/reference/asr-test_c_interop_01-e374f43.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_c_interop_01-e374f43.stdout", - "stdout_hash": "825ff9d4a0b65874077c2f3996f28aad7877d9a5a080d39462067a67", + "stdout_hash": "c1ddea1d8a8ed6c13e595f91ce19e1046622c86fcdb2a7cd1e9454cc", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_c_interop_01-e374f43.stdout b/tests/reference/asr-test_c_interop_01-e374f43.stdout index bae733331d..10f26386fd 100644 --- a/tests/reference/asr-test_c_interop_01-e374f43.stdout +++ b/tests/reference/asr-test_c_interop_01-e374f43.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lfortran_bgt32: (Function (SymbolTable 4 {_lpython_return_variable: (Variable 4 _lpython_return_variable ReturnVar () () Default (Integer 4 []) BindC Public Required .false.), i: (Variable 4 i In () () Default (Integer 4 []) BindC Public Required .true.), j: (Variable 4 j In () () Default (Integer 4 []) BindC Public Required .true.)}) _lfortran_bgt32 [(Var 4 i) (Var 4 j)] [] (Var 4 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_bgt64: (Function (SymbolTable 5 {_lpython_return_variable: (Variable 5 _lpython_return_variable ReturnVar () () Default (Integer 4 []) BindC Public Required .false.), i: (Variable 5 i In () () Default (Integer 8 []) BindC Public Required .true.), j: (Variable 5 j In () () Default (Integer 8 []) BindC Public Required .true.)}) _lfortran_bgt64 [(Var 5 i) (Var 5 j)] [] (Var 5 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dsin: (Function (SymbolTable 2 {_lpython_return_variable: (Variable 2 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 2 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dsin [(Var 2 x)] [] (Var 2 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_ssin: (Function (SymbolTable 3 {_lpython_return_variable: (Variable 3 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 3 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_ssin [(Var 3 x)] [] (Var 3 _lpython_return_variable) BindC Public Interface .false. ()), _lpython_main_program: (Subroutine (SymbolTable 80 {}) _lpython_main_program [] [(SubroutineCall 1 test_c_callbacks () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 8 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_1__abs: (ExternalSymbol 1 abs@__lpython_overloaded_1__abs 8 __lpython_overloaded_1__abs lpython_builtin [] __lpython_overloaded_1__abs Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 79 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_c_callbacks: (Subroutine (SymbolTable 6 {abs: (ExternalSymbol 6 abs 8 abs lpython_builtin [] abs Private), pi: (Variable 6 pi Local () () Default (Real 8 []) Source Public Required .false.)}) test_c_callbacks [] [(= (Var 6 pi) (RealConstant 3.14159265358979312e+00 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 6 abs [((RealBinOp (FunctionCall 1 _lfortran_dsin () [((Var 6 pi))] (Real 8 []) () ()) Sub (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 6 abs [((RealBinOp (FunctionCall 1 _lfortran_dsin () [((RealBinOp (Var 6 pi) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) Sub (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_1__abs 6 abs [((RealBinOp (FunctionCall 1 _lfortran_ssin () [((Cast (Var 6 pi) RealToReal (Real 4 []) ()))] (Real 4 []) () ()) Sub (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToReal (Real 4 []) ()) (Real 4 []) ()))] (Real 4 []) () ()) RealToReal (Real 8 []) ()) Lt (RealConstant 9.99999999999999955e-07 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_1__abs 6 abs [((RealBinOp (FunctionCall 1 _lfortran_ssin () [((Cast (RealBinOp (Var 6 pi) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) RealToReal (Real 4 []) ()))] (Real 4 []) () ()) Sub (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 4 []) ()) (Real 4 []) ()))] (Real 4 []) () ()) RealToReal (Real 8 []) ()) Lt (RealConstant 9.99999999999999955e-07 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 _lfortran_bgt32 () [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 _lfortran_bgt32 () [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 _lfortran_bgt64 () [((Cast (IntegerConstant 3 (Integer 4 [])) IntegerToInteger (Integer 8 []) ())) ((Cast (IntegerConstant 4 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 _lfortran_bgt64 () [((Cast (IntegerConstant 4 (Integer 4 [])) IntegerToInteger (Integer 8 []) ())) ((Cast (IntegerConstant 3 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lfortran_bgt32: (Function (SymbolTable 4 {_lpython_return_variable: (Variable 4 _lpython_return_variable ReturnVar () () Default (Integer 4 []) BindC Public Required .false.), i: (Variable 4 i In () () Default (Integer 4 []) BindC Public Required .true.), j: (Variable 4 j In () () Default (Integer 4 []) BindC Public Required .true.)}) _lfortran_bgt32 [(Var 4 i) (Var 4 j)] [] (Var 4 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_bgt64: (Function (SymbolTable 5 {_lpython_return_variable: (Variable 5 _lpython_return_variable ReturnVar () () Default (Integer 4 []) BindC Public Required .false.), i: (Variable 5 i In () () Default (Integer 8 []) BindC Public Required .true.), j: (Variable 5 j In () () Default (Integer 8 []) BindC Public Required .true.)}) _lfortran_bgt64 [(Var 5 i) (Var 5 j)] [] (Var 5 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dsin: (Function (SymbolTable 2 {_lpython_return_variable: (Variable 2 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 2 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dsin [(Var 2 x)] [] (Var 2 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_ssin: (Function (SymbolTable 3 {_lpython_return_variable: (Variable 3 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 3 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_ssin [(Var 3 x)] [] (Var 3 _lpython_return_variable) BindC Public Interface .false. ()), _lpython_main_program: (Subroutine (SymbolTable 86 {}) _lpython_main_program [] [(SubroutineCall 1 test_c_callbacks () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 8 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_1__abs: (ExternalSymbol 1 abs@__lpython_overloaded_1__abs 8 __lpython_overloaded_1__abs lpython_builtin [] __lpython_overloaded_1__abs Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 85 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_c_callbacks: (Subroutine (SymbolTable 6 {abs: (ExternalSymbol 6 abs 8 abs lpython_builtin [] abs Private), pi: (Variable 6 pi Local () () Default (Real 8 []) Source Public Required .false.)}) test_c_callbacks [] [(= (Var 6 pi) (RealConstant 3.14159265358979312e+00 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 6 abs [((RealBinOp (FunctionCall 1 _lfortran_dsin () [((Var 6 pi))] (Real 8 []) () ()) Sub (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 6 abs [((RealBinOp (FunctionCall 1 _lfortran_dsin () [((RealBinOp (Var 6 pi) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) Sub (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_1__abs 6 abs [((RealBinOp (FunctionCall 1 _lfortran_ssin () [((Cast (Var 6 pi) RealToReal (Real 4 []) ()))] (Real 4 []) () ()) Sub (Cast (IntegerConstant 0 (Integer 4 [])) IntegerToReal (Real 4 []) ()) (Real 4 []) ()))] (Real 4 []) () ()) RealToReal (Real 8 []) ()) Lt (RealConstant 9.99999999999999955e-07 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_1__abs 6 abs [((RealBinOp (FunctionCall 1 _lfortran_ssin () [((Cast (RealBinOp (Var 6 pi) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) RealToReal (Real 4 []) ()))] (Real 4 []) () ()) Sub (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 4 []) ()) (Real 4 []) ()))] (Real 4 []) () ()) RealToReal (Real 8 []) ()) Lt (RealConstant 9.99999999999999955e-07 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 _lfortran_bgt32 () [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 _lfortran_bgt32 () [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 _lfortran_bgt64 () [((Cast (IntegerConstant 3 (Integer 4 [])) IntegerToInteger (Integer 8 []) ())) ((Cast (IntegerConstant 4 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()))] (Integer 4 []) () ()) Eq (IntegerConstant 0 (Integer 4 [])) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 _lfortran_bgt64 () [((Cast (IntegerConstant 4 (Integer 4 [])) IntegerToInteger (Integer 8 []) ())) ((Cast (IntegerConstant 3 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()))] (Integer 4 []) () ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_complex-70f026c.json b/tests/reference/asr-test_complex-70f026c.json index f5c1c76a87..dc7984d4c9 100644 --- a/tests/reference/asr-test_complex-70f026c.json +++ b/tests/reference/asr-test_complex-70f026c.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_complex-70f026c.stdout", - "stdout_hash": "3a6d58e95ccfcb43b2009368ed69db8056be834fb81b5b53c508fa3f", + "stdout_hash": "24c83368db15a5f82645a284dae33412975c93f12432e29a7e4e8da0", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_complex-70f026c.stdout b/tests/reference/asr-test_complex-70f026c.stdout index 11e32fb9cf..f5e682e513 100644 --- a/tests/reference/asr-test_complex-70f026c.stdout +++ b/tests/reference/asr-test_complex-70f026c.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 83 {}) _lpython_main_program [] [(SubroutineCall 1 check () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 11 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_7__abs: (ExternalSymbol 1 abs@__lpython_overloaded_7__abs 11 __lpython_overloaded_7__abs lpython_builtin [] __lpython_overloaded_7__abs Public), abs@__lpython_overloaded_8__abs: (ExternalSymbol 1 abs@__lpython_overloaded_8__abs 11 __lpython_overloaded_8__abs lpython_builtin [] __lpython_overloaded_8__abs Public), check: (Subroutine (SymbolTable 9 {}) check [] [(SubroutineCall 1 test_real_imag () [] ()) (SubroutineCall 1 test_complex () [] ()) (SubroutineCall 1 test_complex_abs () [] ()) (SubroutineCall 1 test_complex_binop_32 () [] ()) (SubroutineCall 1 test_complex_binop_64 () [] ()) (SubroutineCall 1 test_complex_unary_minus () [] ()) (SubroutineCall 1 test_complex_not () [] ())] Source Public Implementation () .false. .false.), complex@__lpython_overloaded_10__complex: (ExternalSymbol 1 complex@__lpython_overloaded_10__complex 11 __lpython_overloaded_10__complex lpython_builtin [] __lpython_overloaded_10__complex Public), complex@__lpython_overloaded_11__complex: (ExternalSymbol 1 complex@__lpython_overloaded_11__complex 11 __lpython_overloaded_11__complex lpython_builtin [] __lpython_overloaded_11__complex Public), complex@__lpython_overloaded_12__complex: (ExternalSymbol 1 complex@__lpython_overloaded_12__complex 11 __lpython_overloaded_12__complex lpython_builtin [] __lpython_overloaded_12__complex Public), complex@__lpython_overloaded_13__complex: (ExternalSymbol 1 complex@__lpython_overloaded_13__complex 11 __lpython_overloaded_13__complex lpython_builtin [] __lpython_overloaded_13__complex Public), complex@__lpython_overloaded_14__complex: (ExternalSymbol 1 complex@__lpython_overloaded_14__complex 11 __lpython_overloaded_14__complex lpython_builtin [] __lpython_overloaded_14__complex Public), complex@__lpython_overloaded_5__complex: (ExternalSymbol 1 complex@__lpython_overloaded_5__complex 11 __lpython_overloaded_5__complex lpython_builtin [] __lpython_overloaded_5__complex Public), complex@__lpython_overloaded_6__complex: (ExternalSymbol 1 complex@__lpython_overloaded_6__complex 11 __lpython_overloaded_6__complex lpython_builtin [] __lpython_overloaded_6__complex Public), complex@__lpython_overloaded_7__complex: (ExternalSymbol 1 complex@__lpython_overloaded_7__complex 11 __lpython_overloaded_7__complex lpython_builtin [] __lpython_overloaded_7__complex Public), complex@__lpython_overloaded_8__complex: (ExternalSymbol 1 complex@__lpython_overloaded_8__complex 11 __lpython_overloaded_8__complex lpython_builtin [] __lpython_overloaded_8__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 11 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 82 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_complex: (Subroutine (SymbolTable 3 {a: (Variable 3 a Local () () Default (Real 8 []) Source Public Required .false.), a2: (Variable 3 a2 Local () () Default (Real 4 []) Source Public Required .false.), a3: (Variable 3 a3 Local () () Default (Real 4 []) Source Public Required .false.), abs: (ExternalSymbol 3 abs 11 abs lpython_builtin [] abs Private), complex: (ExternalSymbol 3 complex 11 complex lpython_builtin [] complex Private), eps: (Variable 3 eps Local () () Default (Real 8 []) Source Public Required .false.), i1: (Variable 3 i1 Local () () Default (Integer 4 []) Source Public Required .false.), i2: (Variable 3 i2 Local () () Default (Integer 8 []) Source Public Required .false.), x: (Variable 3 x Local () () Default (Complex 8 []) Source Public Required .false.), x2: (Variable 3 x2 Local () () Default (Complex 4 []) Source Public Required .false.)}) test_complex [] [(= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_5__complex 3 complex [((RealConstant 4.50000000000000000e+00 (Real 8 []))) ((RealConstant 6.70000000000000018e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 4.50000000000000000e+00 6.70000000000000018e+00 (Complex 8 [])) ()) ()) (= (Var 3 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexRe (Var 3 x) (Real 8 []) ()) Sub (RealConstant 4.50000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexIm (Var 3 x) (Real 8 []) ()) Sub (RealConstant 6.70000000000000018e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_9__complex 3 complex [((IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 [])))) ((IntegerConstant 2 (Integer 4 [])))] (Complex 8 []) (ComplexConstant -4.00000000000000000e+00 2.00000000000000000e+00 (Complex 8 [])) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexRe (Var 3 x) (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 4.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -4.00000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexIm (Var 3 x) (Real 8 []) ()) Sub (RealConstant 2.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_13__complex 3 complex [((IntegerConstant 4 (Integer 4 []))) ((RealConstant 7.88999999999999968e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 7.88999999999999968e+00 (Complex 8 [])) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexRe (Var 3 x) (Real 8 []) ()) Sub (RealConstant 4.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexIm (Var 3 x) (Real 8 []) ()) Sub (RealConstant 7.88999999999999968e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_14__complex 3 complex [((RealConstant 5.59999999999999964e+00 (Real 8 []))) ((IntegerConstant 0 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 5.59999999999999964e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexRe (Var 3 x) (Real 8 []) ()) Sub (RealConstant 5.59999999999999964e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexIm (Var 3 x) (Real 8 []) ()) Sub (RealConstant 0.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 a) (RealConstant 5.34600000000000023e+02 (Real 8 [])) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_5__complex 3 complex [((Var 3 a)) ((RealUnaryMinus (Var 3 a) (Real 8 []) ()))] (Complex 8 []) () ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexRe (Var 3 x) (Real 8 []) ()) Sub (RealConstant 5.34600000000000023e+02 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexIm (Var 3 x) (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 5.34600000000000023e+02 (Real 8 [])) (Real 8 []) (RealConstant -5.34600000000000023e+02 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 a2) (Cast (RealUnaryMinus (RealConstant 4.23543080634815226e+02 (Real 8 [])) (Real 8 []) (RealConstant -4.23543080634815226e+02 (Real 8 []))) RealToReal (Real 4 []) (RealConstant -4.23543080634815226e+02 (Real 4 []))) ()) (= (Var 3 a3) (Cast (RealConstant 3.45000000000000000e+01 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 3.45000000000000000e+01 (Real 4 []))) ()) (= (Var 3 x2) (FunctionCall 1 complex@__lpython_overloaded_6__complex 3 complex [((Var 3 a2)) ((Var 3 a3))] (Complex 4 []) () ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (Cast (ComplexIm (Var 3 x2) (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealConstant 3.45000000000000000e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 i1) (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) ()) (= (Var 3 i2) (Cast (IntegerUnaryMinus (IntegerConstant 6 (Integer 4 [])) (Integer 4 []) (IntegerConstant -6 (Integer 4 []))) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_7__complex 3 complex [((Var 3 a3)) ((Var 3 a))] (Complex 8 []) () ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_8__complex 3 complex [((Var 3 a)) ((Var 3 a3))] (Complex 8 []) () ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_11__complex 3 complex [((Var 3 i1)) ((Var 3 i2))] (Complex 8 []) () ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_9__complex 3 complex [((Var 3 i1)) ((IntegerUnaryMinus (Var 3 i1) (Integer 4 []) ()))] (Complex 8 []) () ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_10__complex 3 complex [((IntegerUnaryMinus (Var 3 i2) (Integer 8 []) ())) ((IntegerUnaryMinus (Var 3 i2) (Integer 8 []) ()))] (Complex 8 []) () ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_12__complex 3 complex [((Var 3 i2)) ((IntegerUnaryMinus (Var 3 i1) (Integer 4 []) ()))] (Complex 8 []) () ()) ())] Source Public Implementation () .false. .false.), test_complex_abs: (Subroutine (SymbolTable 4 {abs: (ExternalSymbol 4 abs 11 abs lpython_builtin [] abs Private), complex: (ExternalSymbol 4 complex 11 complex lpython_builtin [] complex Private), eps: (Variable 4 eps Local () () Default (Real 8 []) Source Public Required .false.), x: (Variable 4 x Local () () Default (Complex 4 []) Source Public Required .false.), y: (Variable 4 y Local () () Default (Complex 8 []) Source Public Required .false.)}) test_complex_abs [] [(= (Var 4 x) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 4 complex [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 4 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 4 abs [((RealBinOp (Cast (FunctionCall 1 abs@__lpython_overloaded_7__abs 4 abs [((Var 4 x))] (Real 4 []) () ()) RealToReal (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 4 eps) (Logical 4 []) ()) ()) (= (Var 4 y) (FunctionCall 1 complex@__lpython_overloaded_9__complex 4 complex [((IntegerConstant 6 (Integer 4 []))) ((IntegerConstant 8 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 6.00000000000000000e+00 8.00000000000000000e+00 (Complex 8 [])) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 4 abs [((RealBinOp (FunctionCall 1 abs@__lpython_overloaded_8__abs 4 abs [((Var 4 y))] (Real 8 []) () ()) Sub (RealConstant 1.00000000000000000e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 4 eps) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_complex_binop_32: (Subroutine (SymbolTable 5 {x: (Variable 5 x Local () () Default (Complex 4 []) Source Public Required .false.), y: (Variable 5 y Local () () Default (Complex 4 []) Source Public Required .false.), z: (Variable 5 z Local () () Default (Complex 4 []) Source Public Required .false.)}) test_complex_binop_32 [] [(= (Var 5 x) (Cast (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 5 y) (Cast (ComplexBinOp (Cast (IntegerConstant 4 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 5 z) (ComplexBinOp (Var 5 x) Add (Var 5 y) (Complex 4 []) ()) ()) (= (Var 5 z) (ComplexBinOp (Var 5 x) Sub (Var 5 y) (Complex 4 []) ()) ()) (= (Var 5 z) (ComplexBinOp (Var 5 x) Mul (Var 5 y) (Complex 4 []) ()) ()) (= (Var 5 z) (ComplexBinOp (Var 5 x) Pow (Var 5 y) (Complex 4 []) ()) ())] Source Public Implementation () .false. .false.), test_complex_binop_64: (Subroutine (SymbolTable 6 {x: (Variable 6 x Local () () Default (Complex 8 []) Source Public Required .false.), y: (Variable 6 y Local () () Default (Complex 8 []) Source Public Required .false.), z: (Variable 6 z Local () () Default (Complex 8 []) Source Public Required .false.)}) test_complex_binop_64 [] [(= (Var 6 x) (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 6 y) (ComplexBinOp (Cast (IntegerConstant 4 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 6 z) (ComplexBinOp (Var 6 x) Add (Var 6 y) (Complex 8 []) ()) ()) (= (Var 6 z) (ComplexBinOp (Var 6 x) Sub (Var 6 y) (Complex 8 []) ()) ()) (= (Var 6 z) (ComplexBinOp (Var 6 x) Mul (Var 6 y) (Complex 8 []) ()) ()) (= (Var 6 z) (ComplexBinOp (Var 6 x) Pow (Var 6 y) (Complex 8 []) ()) ())] Source Public Implementation () .false. .false.), test_complex_not: (Subroutine (SymbolTable 8 {b: (Variable 8 b Local () () Default (Logical 4 []) Source Public Required .false.), c: (Variable 8 c Local () () Default (Complex 4 []) Source Public Required .false.), c2: (Variable 8 c2 Local () () Default (Complex 8 []) Source Public Required .false.), complex: (ExternalSymbol 8 complex 11 complex lpython_builtin [] complex Private)}) test_complex_not [] [(= (Var 8 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 8 complex [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 5 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 8 b) (LogicalNot (Cast (Var 8 c) ComplexToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (Assert (LogicalNot (Var 8 b) (Logical 4 []) ()) ()) (= (Var 8 c2) (FunctionCall 1 complex@__lpython_overloaded_9__complex 8 complex [((IntegerConstant 0 (Integer 4 []))) ((IntegerConstant 0 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ()) (= (Var 8 b) (LogicalNot (Cast (Var 8 c2) ComplexToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (Assert (Var 8 b) ())] Source Public Implementation () .false. .false.), test_complex_unary_minus: (Subroutine (SymbolTable 7 {_c: (Variable 7 _c Local () () Default (Complex 4 []) Source Public Required .false.), abs: (ExternalSymbol 7 abs 11 abs lpython_builtin [] abs Private), c: (Variable 7 c Local () () Default (Complex 4 []) Source Public Required .false.), c2: (Variable 7 c2 Local () () Default (Complex 8 []) Source Public Required .false.), complex: (ExternalSymbol 7 complex 11 complex lpython_builtin [] complex Private)}) test_complex_unary_minus [] [(= (Var 7 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_13__complex 7 complex [((IntegerConstant 3 (Integer 4 []))) ((RealConstant 4.50000000000000000e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.50000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 3.00000000000000000e+00 4.50000000000000000e+00 (Complex 4 []))) ()) (= (Var 7 _c) (ComplexUnaryMinus (Var 7 c) (Complex 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (Cast (ComplexRe (Var 7 _c) (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 3.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -3.00000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (Cast (ComplexIm (Var 7 _c) (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 4.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -4.50000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (= (Var 7 _c) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 7 complex [((IntegerConstant 5 (Integer 4 []))) ((IntegerUnaryMinus (IntegerConstant 78 (Integer 4 [])) (Integer 4 []) (IntegerConstant -78 (Integer 4 []))))] (Complex 8 []) (ComplexConstant 5.00000000000000000e+00 -7.80000000000000000e+01 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 5.00000000000000000e+00 -7.80000000000000000e+01 (Complex 4 []))) ()) (= (Var 7 _c) (ComplexUnaryMinus (Var 7 _c) (Complex 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (Cast (ComplexRe (Var 7 _c) (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 5.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -5.00000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (Cast (ComplexIm (Var 7 _c) (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealConstant 7.80000000000000000e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (= (Var 7 c2) (FunctionCall 1 complex@__lpython_overloaded_5__complex 7 complex [((RealUnaryMinus (RealConstant 4.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -4.50000000000000000e+00 (Real 8 [])))) ((RealUnaryMinus (RealConstant 7.79999999999999982e+00 (Real 8 [])) (Real 8 []) (RealConstant -7.79999999999999982e+00 (Real 8 []))))] (Complex 8 []) (ComplexConstant -4.50000000000000000e+00 -7.79999999999999982e+00 (Complex 8 [])) ()) ()) (= (Var 7 c2) (ComplexUnaryMinus (Var 7 c2) (Complex 8 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (ComplexRe (Var 7 c2) (Real 8 []) ()) Sub (RealConstant 4.50000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (ComplexIm (Var 7 c2) (Real 8 []) ()) Sub (RealConstant 7.79999999999999982e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (= (Var 7 c2) (ComplexBinOp (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 7 c2) (ComplexUnaryMinus (Var 7 c2) (Complex 8 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (ComplexRe (Var 7 c2) (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 3.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -3.00000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (ComplexIm (Var 7 c2) (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 4.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -4.00000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_real_imag: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Real 8 []) Source Public Required .false.), abs: (ExternalSymbol 2 abs 11 abs lpython_builtin [] abs Private), b: (Variable 2 b Local () () Default (Real 8 []) Source Public Required .false.), eps: (Variable 2 eps Local () () Default (Real 8 []) Source Public Required .false.), x: (Variable 2 x Local () () Default (Complex 8 []) Source Public Required .false.)}) test_real_imag [] [(= (Var 2 x) (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 2 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (= (Var 2 a) (ComplexRe (Var 2 x) (Real 8 []) ()) ()) (= (Var 2 b) (ComplexIm (Var 2 x) (Real 8 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Var 2 a) Sub (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Var 2 b) Sub (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 89 {}) _lpython_main_program [] [(SubroutineCall 1 check () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 11 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_7__abs: (ExternalSymbol 1 abs@__lpython_overloaded_7__abs 11 __lpython_overloaded_7__abs lpython_builtin [] __lpython_overloaded_7__abs Public), abs@__lpython_overloaded_8__abs: (ExternalSymbol 1 abs@__lpython_overloaded_8__abs 11 __lpython_overloaded_8__abs lpython_builtin [] __lpython_overloaded_8__abs Public), check: (Subroutine (SymbolTable 9 {}) check [] [(SubroutineCall 1 test_real_imag () [] ()) (SubroutineCall 1 test_complex () [] ()) (SubroutineCall 1 test_complex_abs () [] ()) (SubroutineCall 1 test_complex_binop_32 () [] ()) (SubroutineCall 1 test_complex_binop_64 () [] ()) (SubroutineCall 1 test_complex_unary_minus () [] ()) (SubroutineCall 1 test_complex_not () [] ())] Source Public Implementation () .false. .false.), complex@__lpython_overloaded_10__complex: (ExternalSymbol 1 complex@__lpython_overloaded_10__complex 11 __lpython_overloaded_10__complex lpython_builtin [] __lpython_overloaded_10__complex Public), complex@__lpython_overloaded_11__complex: (ExternalSymbol 1 complex@__lpython_overloaded_11__complex 11 __lpython_overloaded_11__complex lpython_builtin [] __lpython_overloaded_11__complex Public), complex@__lpython_overloaded_12__complex: (ExternalSymbol 1 complex@__lpython_overloaded_12__complex 11 __lpython_overloaded_12__complex lpython_builtin [] __lpython_overloaded_12__complex Public), complex@__lpython_overloaded_13__complex: (ExternalSymbol 1 complex@__lpython_overloaded_13__complex 11 __lpython_overloaded_13__complex lpython_builtin [] __lpython_overloaded_13__complex Public), complex@__lpython_overloaded_14__complex: (ExternalSymbol 1 complex@__lpython_overloaded_14__complex 11 __lpython_overloaded_14__complex lpython_builtin [] __lpython_overloaded_14__complex Public), complex@__lpython_overloaded_5__complex: (ExternalSymbol 1 complex@__lpython_overloaded_5__complex 11 __lpython_overloaded_5__complex lpython_builtin [] __lpython_overloaded_5__complex Public), complex@__lpython_overloaded_6__complex: (ExternalSymbol 1 complex@__lpython_overloaded_6__complex 11 __lpython_overloaded_6__complex lpython_builtin [] __lpython_overloaded_6__complex Public), complex@__lpython_overloaded_7__complex: (ExternalSymbol 1 complex@__lpython_overloaded_7__complex 11 __lpython_overloaded_7__complex lpython_builtin [] __lpython_overloaded_7__complex Public), complex@__lpython_overloaded_8__complex: (ExternalSymbol 1 complex@__lpython_overloaded_8__complex 11 __lpython_overloaded_8__complex lpython_builtin [] __lpython_overloaded_8__complex Public), complex@__lpython_overloaded_9__complex: (ExternalSymbol 1 complex@__lpython_overloaded_9__complex 11 __lpython_overloaded_9__complex lpython_builtin [] __lpython_overloaded_9__complex Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 88 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), test_complex: (Subroutine (SymbolTable 3 {a: (Variable 3 a Local () () Default (Real 8 []) Source Public Required .false.), a2: (Variable 3 a2 Local () () Default (Real 4 []) Source Public Required .false.), a3: (Variable 3 a3 Local () () Default (Real 4 []) Source Public Required .false.), abs: (ExternalSymbol 3 abs 11 abs lpython_builtin [] abs Private), complex: (ExternalSymbol 3 complex 11 complex lpython_builtin [] complex Private), eps: (Variable 3 eps Local () () Default (Real 8 []) Source Public Required .false.), i1: (Variable 3 i1 Local () () Default (Integer 4 []) Source Public Required .false.), i2: (Variable 3 i2 Local () () Default (Integer 8 []) Source Public Required .false.), x: (Variable 3 x Local () () Default (Complex 8 []) Source Public Required .false.), x2: (Variable 3 x2 Local () () Default (Complex 4 []) Source Public Required .false.)}) test_complex [] [(= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_5__complex 3 complex [((RealConstant 4.50000000000000000e+00 (Real 8 []))) ((RealConstant 6.70000000000000018e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 4.50000000000000000e+00 6.70000000000000018e+00 (Complex 8 [])) ()) ()) (= (Var 3 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexRe (Var 3 x) (Real 8 []) ()) Sub (RealConstant 4.50000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexIm (Var 3 x) (Real 8 []) ()) Sub (RealConstant 6.70000000000000018e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_9__complex 3 complex [((IntegerUnaryMinus (IntegerConstant 4 (Integer 4 [])) (Integer 4 []) (IntegerConstant -4 (Integer 4 [])))) ((IntegerConstant 2 (Integer 4 [])))] (Complex 8 []) (ComplexConstant -4.00000000000000000e+00 2.00000000000000000e+00 (Complex 8 [])) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexRe (Var 3 x) (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 4.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -4.00000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexIm (Var 3 x) (Real 8 []) ()) Sub (RealConstant 2.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_13__complex 3 complex [((IntegerConstant 4 (Integer 4 []))) ((RealConstant 7.88999999999999968e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 7.88999999999999968e+00 (Complex 8 [])) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexRe (Var 3 x) (Real 8 []) ()) Sub (RealConstant 4.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexIm (Var 3 x) (Real 8 []) ()) Sub (RealConstant 7.88999999999999968e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_14__complex 3 complex [((RealConstant 5.59999999999999964e+00 (Real 8 []))) ((IntegerConstant 0 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 5.59999999999999964e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexRe (Var 3 x) (Real 8 []) ()) Sub (RealConstant 5.59999999999999964e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexIm (Var 3 x) (Real 8 []) ()) Sub (RealConstant 0.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 a) (RealConstant 5.34600000000000023e+02 (Real 8 [])) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_5__complex 3 complex [((Var 3 a)) ((RealUnaryMinus (Var 3 a) (Real 8 []) ()))] (Complex 8 []) () ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexRe (Var 3 x) (Real 8 []) ()) Sub (RealConstant 5.34600000000000023e+02 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (ComplexIm (Var 3 x) (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 5.34600000000000023e+02 (Real 8 [])) (Real 8 []) (RealConstant -5.34600000000000023e+02 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 a2) (Cast (RealUnaryMinus (RealConstant 4.23543080634815226e+02 (Real 8 [])) (Real 8 []) (RealConstant -4.23543080634815226e+02 (Real 8 []))) RealToReal (Real 4 []) (RealConstant -4.23543080634815226e+02 (Real 4 []))) ()) (= (Var 3 a3) (Cast (RealConstant 3.45000000000000000e+01 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 3.45000000000000000e+01 (Real 4 []))) ()) (= (Var 3 x2) (FunctionCall 1 complex@__lpython_overloaded_6__complex 3 complex [((Var 3 a2)) ((Var 3 a3))] (Complex 4 []) () ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 3 abs [((RealBinOp (Cast (ComplexIm (Var 3 x2) (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealConstant 3.45000000000000000e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 3 eps) (Logical 4 []) ()) ()) (= (Var 3 i1) (IntegerUnaryMinus (IntegerConstant 5 (Integer 4 [])) (Integer 4 []) (IntegerConstant -5 (Integer 4 []))) ()) (= (Var 3 i2) (Cast (IntegerUnaryMinus (IntegerConstant 6 (Integer 4 [])) (Integer 4 []) (IntegerConstant -6 (Integer 4 []))) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_7__complex 3 complex [((Var 3 a3)) ((Var 3 a))] (Complex 8 []) () ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_8__complex 3 complex [((Var 3 a)) ((Var 3 a3))] (Complex 8 []) () ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_11__complex 3 complex [((Var 3 i1)) ((Var 3 i2))] (Complex 8 []) () ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_9__complex 3 complex [((Var 3 i1)) ((IntegerUnaryMinus (Var 3 i1) (Integer 4 []) ()))] (Complex 8 []) () ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_10__complex 3 complex [((IntegerUnaryMinus (Var 3 i2) (Integer 8 []) ())) ((IntegerUnaryMinus (Var 3 i2) (Integer 8 []) ()))] (Complex 8 []) () ()) ()) (= (Var 3 x) (FunctionCall 1 complex@__lpython_overloaded_12__complex 3 complex [((Var 3 i2)) ((IntegerUnaryMinus (Var 3 i1) (Integer 4 []) ()))] (Complex 8 []) () ()) ())] Source Public Implementation () .false. .false.), test_complex_abs: (Subroutine (SymbolTable 4 {abs: (ExternalSymbol 4 abs 11 abs lpython_builtin [] abs Private), complex: (ExternalSymbol 4 complex 11 complex lpython_builtin [] complex Private), eps: (Variable 4 eps Local () () Default (Real 8 []) Source Public Required .false.), x: (Variable 4 x Local () () Default (Complex 4 []) Source Public Required .false.), y: (Variable 4 y Local () () Default (Complex 8 []) Source Public Required .false.)}) test_complex_abs [] [(= (Var 4 x) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 4 complex [((IntegerConstant 3 (Integer 4 []))) ((IntegerConstant 4 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 4 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 4 abs [((RealBinOp (Cast (FunctionCall 1 abs@__lpython_overloaded_7__abs 4 abs [((Var 4 x))] (Real 4 []) () ()) RealToReal (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 4 eps) (Logical 4 []) ()) ()) (= (Var 4 y) (FunctionCall 1 complex@__lpython_overloaded_9__complex 4 complex [((IntegerConstant 6 (Integer 4 []))) ((IntegerConstant 8 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 6.00000000000000000e+00 8.00000000000000000e+00 (Complex 8 [])) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 4 abs [((RealBinOp (FunctionCall 1 abs@__lpython_overloaded_8__abs 4 abs [((Var 4 y))] (Real 8 []) () ()) Sub (RealConstant 1.00000000000000000e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 4 eps) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_complex_binop_32: (Subroutine (SymbolTable 5 {x: (Variable 5 x Local () () Default (Complex 4 []) Source Public Required .false.), y: (Variable 5 y Local () () Default (Complex 4 []) Source Public Required .false.), z: (Variable 5 z Local () () Default (Complex 4 []) Source Public Required .false.)}) test_complex_binop_32 [] [(= (Var 5 x) (Cast (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 5 y) (Cast (ComplexBinOp (Cast (IntegerConstant 4 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 []))) ComplexToComplex (Complex 4 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 5 z) (ComplexBinOp (Var 5 x) Add (Var 5 y) (Complex 4 []) ()) ()) (= (Var 5 z) (ComplexBinOp (Var 5 x) Sub (Var 5 y) (Complex 4 []) ()) ()) (= (Var 5 z) (ComplexBinOp (Var 5 x) Mul (Var 5 y) (Complex 4 []) ()) ()) (= (Var 5 z) (ComplexBinOp (Var 5 x) Pow (Var 5 y) (Complex 4 []) ()) ())] Source Public Implementation () .false. .false.), test_complex_binop_64: (Subroutine (SymbolTable 6 {x: (Variable 6 x Local () () Default (Complex 8 []) Source Public Required .false.), y: (Variable 6 y Local () () Default (Complex 8 []) Source Public Required .false.), z: (Variable 6 z Local () () Default (Complex 8 []) Source Public Required .false.)}) test_complex_binop_64 [] [(= (Var 6 x) (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 6 y) (ComplexBinOp (Cast (IntegerConstant 4 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 6 z) (ComplexBinOp (Var 6 x) Add (Var 6 y) (Complex 8 []) ()) ()) (= (Var 6 z) (ComplexBinOp (Var 6 x) Sub (Var 6 y) (Complex 8 []) ()) ()) (= (Var 6 z) (ComplexBinOp (Var 6 x) Mul (Var 6 y) (Complex 8 []) ()) ()) (= (Var 6 z) (ComplexBinOp (Var 6 x) Pow (Var 6 y) (Complex 8 []) ()) ())] Source Public Implementation () .false. .false.), test_complex_not: (Subroutine (SymbolTable 8 {b: (Variable 8 b Local () () Default (Logical 4 []) Source Public Required .false.), c: (Variable 8 c Local () () Default (Complex 4 []) Source Public Required .false.), c2: (Variable 8 c2 Local () () Default (Complex 8 []) Source Public Required .false.), complex: (ExternalSymbol 8 complex 11 complex lpython_builtin [] complex Private)}) test_complex_not [] [(= (Var 8 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 8 complex [((IntegerConstant 4 (Integer 4 []))) ((IntegerConstant 5 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 4.00000000000000000e+00 5.00000000000000000e+00 (Complex 4 []))) ()) (= (Var 8 b) (LogicalNot (Cast (Var 8 c) ComplexToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (Assert (LogicalNot (Var 8 b) (Logical 4 []) ()) ()) (= (Var 8 c2) (FunctionCall 1 complex@__lpython_overloaded_9__complex 8 complex [((IntegerConstant 0 (Integer 4 []))) ((IntegerConstant 0 (Integer 4 [])))] (Complex 8 []) (ComplexConstant 0.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 [])) ()) ()) (= (Var 8 b) (LogicalNot (Cast (Var 8 c2) ComplexToLogical (Logical 4 []) ()) (Logical 4 []) ()) ()) (Assert (Var 8 b) ())] Source Public Implementation () .false. .false.), test_complex_unary_minus: (Subroutine (SymbolTable 7 {_c: (Variable 7 _c Local () () Default (Complex 4 []) Source Public Required .false.), abs: (ExternalSymbol 7 abs 11 abs lpython_builtin [] abs Private), c: (Variable 7 c Local () () Default (Complex 4 []) Source Public Required .false.), c2: (Variable 7 c2 Local () () Default (Complex 8 []) Source Public Required .false.), complex: (ExternalSymbol 7 complex 11 complex lpython_builtin [] complex Private)}) test_complex_unary_minus [] [(= (Var 7 c) (Cast (FunctionCall 1 complex@__lpython_overloaded_13__complex 7 complex [((IntegerConstant 3 (Integer 4 []))) ((RealConstant 4.50000000000000000e+00 (Real 8 [])))] (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.50000000000000000e+00 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 3.00000000000000000e+00 4.50000000000000000e+00 (Complex 4 []))) ()) (= (Var 7 _c) (ComplexUnaryMinus (Var 7 c) (Complex 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (Cast (ComplexRe (Var 7 _c) (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 3.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -3.00000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (Cast (ComplexIm (Var 7 _c) (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 4.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -4.50000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (= (Var 7 _c) (Cast (FunctionCall 1 complex@__lpython_overloaded_9__complex 7 complex [((IntegerConstant 5 (Integer 4 []))) ((IntegerUnaryMinus (IntegerConstant 78 (Integer 4 [])) (Integer 4 []) (IntegerConstant -78 (Integer 4 []))))] (Complex 8 []) (ComplexConstant 5.00000000000000000e+00 -7.80000000000000000e+01 (Complex 8 [])) ()) ComplexToComplex (Complex 4 []) (ComplexConstant 5.00000000000000000e+00 -7.80000000000000000e+01 (Complex 4 []))) ()) (= (Var 7 _c) (ComplexUnaryMinus (Var 7 _c) (Complex 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (Cast (ComplexRe (Var 7 _c) (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 5.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -5.00000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (Cast (ComplexIm (Var 7 _c) (Real 4 []) ()) RealToReal (Real 8 []) ()) Sub (RealConstant 7.80000000000000000e+01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (= (Var 7 c2) (FunctionCall 1 complex@__lpython_overloaded_5__complex 7 complex [((RealUnaryMinus (RealConstant 4.50000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -4.50000000000000000e+00 (Real 8 [])))) ((RealUnaryMinus (RealConstant 7.79999999999999982e+00 (Real 8 [])) (Real 8 []) (RealConstant -7.79999999999999982e+00 (Real 8 []))))] (Complex 8 []) (ComplexConstant -4.50000000000000000e+00 -7.79999999999999982e+00 (Complex 8 [])) ()) ()) (= (Var 7 c2) (ComplexUnaryMinus (Var 7 c2) (Complex 8 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (ComplexRe (Var 7 c2) (Real 8 []) ()) Sub (RealConstant 4.50000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (ComplexIm (Var 7 c2) (Real 8 []) ()) Sub (RealConstant 7.79999999999999982e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (= (Var 7 c2) (ComplexBinOp (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 3.00000000000000000e+00 4.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 7 c2) (ComplexUnaryMinus (Var 7 c2) (Complex 8 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (ComplexRe (Var 7 c2) (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 3.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -3.00000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 7 abs [((RealBinOp (ComplexIm (Var 7 c2) (Real 8 []) ()) Sub (RealUnaryMinus (RealConstant 4.00000000000000000e+00 (Real 8 [])) (Real 8 []) (RealConstant -4.00000000000000000e+00 (Real 8 []))) (Real 8 []) ()))] (Real 8 []) () ()) Lt (RealConstant 9.99999999999999980e-13 (Real 8 [])) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_real_imag: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Real 8 []) Source Public Required .false.), abs: (ExternalSymbol 2 abs 11 abs lpython_builtin [] abs Private), b: (Variable 2 b Local () () Default (Real 8 []) Source Public Required .false.), eps: (Variable 2 eps Local () () Default (Real 8 []) Source Public Required .false.), x: (Variable 2 x Local () () Default (Complex 8 []) Source Public Required .false.)}) test_real_imag [] [(= (Var 2 x) (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToComplex (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 0.00000000000000000e+00 (Complex 8 []))) Add (ComplexConstant 0.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 [])) (Complex 8 []) (ComplexConstant 2.00000000000000000e+00 3.00000000000000000e+00 (Complex 8 []))) ()) (= (Var 2 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (= (Var 2 a) (ComplexRe (Var 2 x) (Real 8 []) ()) ()) (= (Var 2 b) (ComplexIm (Var 2 x) (Real 8 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Var 2 a) Sub (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 2 abs [((RealBinOp (Var 2 b) Sub (Cast (IntegerConstant 3 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 2 eps) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_max_min-3c2fc51.json b/tests/reference/asr-test_max_min-3c2fc51.json index 3a1d7f1846..11b3d148c8 100644 --- a/tests/reference/asr-test_max_min-3c2fc51.json +++ b/tests/reference/asr-test_max_min-3c2fc51.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_max_min-3c2fc51.stdout", - "stdout_hash": "9540fb32d5a6570107e73dda671f326ce2578e9a8ce76b2d1e8e783a", + "stdout_hash": "72cc6d057681e66009ac02bf4abc09f47c661f9f45234ba3dc87c42e", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_max_min-3c2fc51.stdout b/tests/reference/asr-test_max_min-3c2fc51.stdout index fb987560a1..ad98da037d 100644 --- a/tests/reference/asr-test_max_min-3c2fc51.stdout +++ b/tests/reference/asr-test_max_min-3c2fc51.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 80 {}) _lpython_main_program [] [(SubroutineCall 1 check () [] ())] Source Public Implementation () .false. .false.), check: (Subroutine (SymbolTable 6 {}) check [] [(SubroutineCall 1 test_max_int () [] ()) (SubroutineCall 1 test_max_float () [] ()) (SubroutineCall 1 test_min_int () [] ()) (SubroutineCall 1 test_min_float () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 79 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), max@__lpython_overloaded_0__max: (ExternalSymbol 1 max@__lpython_overloaded_0__max 8 __lpython_overloaded_0__max lpython_builtin [] __lpython_overloaded_0__max Public), max@__lpython_overloaded_1__max: (ExternalSymbol 1 max@__lpython_overloaded_1__max 8 __lpython_overloaded_1__max lpython_builtin [] __lpython_overloaded_1__max Public), max@__lpython_overloaded_2__max: (ExternalSymbol 1 max@__lpython_overloaded_2__max 8 __lpython_overloaded_2__max lpython_builtin [] __lpython_overloaded_2__max Public), max@__lpython_overloaded_3__max: (ExternalSymbol 1 max@__lpython_overloaded_3__max 8 __lpython_overloaded_3__max lpython_builtin [] __lpython_overloaded_3__max Public), min@__lpython_overloaded_0__min: (ExternalSymbol 1 min@__lpython_overloaded_0__min 8 __lpython_overloaded_0__min lpython_builtin [] __lpython_overloaded_0__min Public), min@__lpython_overloaded_1__min: (ExternalSymbol 1 min@__lpython_overloaded_1__min 8 __lpython_overloaded_1__min lpython_builtin [] __lpython_overloaded_1__min Public), min@__lpython_overloaded_2__min: (ExternalSymbol 1 min@__lpython_overloaded_2__min 8 __lpython_overloaded_2__min lpython_builtin [] __lpython_overloaded_2__min Public), min@__lpython_overloaded_3__min: (ExternalSymbol 1 min@__lpython_overloaded_3__min 8 __lpython_overloaded_3__min lpython_builtin [] __lpython_overloaded_3__min Public), test_max_float: (Subroutine (SymbolTable 3 {d: (Variable 3 d Local () () Default (Real 8 []) Source Public Required .false.), e: (Variable 3 e Local () () Default (Real 8 []) Source Public Required .false.), f: (Variable 3 f Local () () Default (Real 8 []) Source Public Required .false.), max: (ExternalSymbol 3 max 8 max lpython_builtin [] max Private)}) test_max_float [] [(= (Var 3 d) (RealConstant 2.32330000000000005e+01 (Real 8 [])) ()) (= (Var 3 e) (RealConstant 2.32232999999999983e+01 (Real 8 [])) ()) (= (Var 3 f) (RealConstant 2.12300000000000004e+01 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 max@__lpython_overloaded_2__max 3 max [((Var 3 d)) ((Var 3 e)) ((Var 3 f))] (Real 8 []) () ()) Eq (Var 3 d) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 max@__lpython_overloaded_3__max 3 max [((Var 3 e)) ((Var 3 f))] (Real 8 []) () ()) Eq (Var 3 e) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_max_int: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 2 b Local () () Default (Integer 4 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Integer 4 []) Source Public Required .false.), max: (ExternalSymbol 2 max 8 max lpython_builtin [] max Private)}) test_max_int [] [(= (Var 2 a) (IntegerConstant 1 (Integer 4 [])) ()) (= (Var 2 b) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 2 c) (IntegerConstant 3 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 max@__lpython_overloaded_0__max 2 max [((Var 2 a)) ((Var 2 b))] (Integer 4 []) () ()) Eq (Var 2 b) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 max@__lpython_overloaded_1__max 2 max [((Var 2 a)) ((Var 2 b)) ((Var 2 c))] (Integer 4 []) () ()) Eq (Var 2 c) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 max@__lpython_overloaded_1__max 2 max [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 3 (Integer 4 [])) ()) Eq (IntegerConstant 3 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 max@__lpython_overloaded_0__max 2 max [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 6 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 6 (Integer 4 [])) ()) Eq (IntegerConstant 6 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.), test_min_float: (Subroutine (SymbolTable 5 {d: (Variable 5 d Local () () Default (Real 8 []) Source Public Required .false.), e: (Variable 5 e Local () () Default (Real 8 []) Source Public Required .false.), f: (Variable 5 f Local () () Default (Real 8 []) Source Public Required .false.), min: (ExternalSymbol 5 min 8 min lpython_builtin [] min Private)}) test_min_float [] [(= (Var 5 d) (RealConstant 2.32330000000000005e+01 (Real 8 [])) ()) (= (Var 5 e) (RealConstant 2.32232999999999983e+01 (Real 8 [])) ()) (= (Var 5 f) (RealConstant 2.12300000000000004e+01 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 min@__lpython_overloaded_2__min 5 min [((Var 5 d)) ((Var 5 e)) ((Var 5 f))] (Real 8 []) () ()) Eq (Var 5 f) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 min@__lpython_overloaded_3__min 5 min [((Var 5 e)) ((Var 5 f))] (Real 8 []) () ()) Eq (Var 5 f) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_min_int: (Subroutine (SymbolTable 4 {a: (Variable 4 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 4 b Local () () Default (Integer 4 []) Source Public Required .false.), c: (Variable 4 c Local () () Default (Integer 4 []) Source Public Required .false.), min: (ExternalSymbol 4 min 8 min lpython_builtin [] min Private)}) test_min_int [] [(= (Var 4 a) (IntegerConstant 1 (Integer 4 [])) ()) (= (Var 4 b) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 4 c) (IntegerConstant 3 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 min@__lpython_overloaded_0__min 4 min [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (Var 4 a) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 min@__lpython_overloaded_1__min 4 min [((Var 4 a)) ((Var 4 b)) ((Var 4 c))] (Integer 4 []) () ()) Eq (Var 4 a) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 min@__lpython_overloaded_1__min 4 min [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 1 (Integer 4 [])) ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 min@__lpython_overloaded_0__min 4 min [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 6 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 1 (Integer 4 [])) ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 86 {}) _lpython_main_program [] [(SubroutineCall 1 check () [] ())] Source Public Implementation () .false. .false.), check: (Subroutine (SymbolTable 6 {}) check [] [(SubroutineCall 1 test_max_int () [] ()) (SubroutineCall 1 test_max_float () [] ()) (SubroutineCall 1 test_min_int () [] ()) (SubroutineCall 1 test_min_float () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 85 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), max@__lpython_overloaded_0__max: (ExternalSymbol 1 max@__lpython_overloaded_0__max 8 __lpython_overloaded_0__max lpython_builtin [] __lpython_overloaded_0__max Public), max@__lpython_overloaded_1__max: (ExternalSymbol 1 max@__lpython_overloaded_1__max 8 __lpython_overloaded_1__max lpython_builtin [] __lpython_overloaded_1__max Public), max@__lpython_overloaded_2__max: (ExternalSymbol 1 max@__lpython_overloaded_2__max 8 __lpython_overloaded_2__max lpython_builtin [] __lpython_overloaded_2__max Public), max@__lpython_overloaded_3__max: (ExternalSymbol 1 max@__lpython_overloaded_3__max 8 __lpython_overloaded_3__max lpython_builtin [] __lpython_overloaded_3__max Public), min@__lpython_overloaded_0__min: (ExternalSymbol 1 min@__lpython_overloaded_0__min 8 __lpython_overloaded_0__min lpython_builtin [] __lpython_overloaded_0__min Public), min@__lpython_overloaded_1__min: (ExternalSymbol 1 min@__lpython_overloaded_1__min 8 __lpython_overloaded_1__min lpython_builtin [] __lpython_overloaded_1__min Public), min@__lpython_overloaded_2__min: (ExternalSymbol 1 min@__lpython_overloaded_2__min 8 __lpython_overloaded_2__min lpython_builtin [] __lpython_overloaded_2__min Public), min@__lpython_overloaded_3__min: (ExternalSymbol 1 min@__lpython_overloaded_3__min 8 __lpython_overloaded_3__min lpython_builtin [] __lpython_overloaded_3__min Public), test_max_float: (Subroutine (SymbolTable 3 {d: (Variable 3 d Local () () Default (Real 8 []) Source Public Required .false.), e: (Variable 3 e Local () () Default (Real 8 []) Source Public Required .false.), f: (Variable 3 f Local () () Default (Real 8 []) Source Public Required .false.), max: (ExternalSymbol 3 max 8 max lpython_builtin [] max Private)}) test_max_float [] [(= (Var 3 d) (RealConstant 2.32330000000000005e+01 (Real 8 [])) ()) (= (Var 3 e) (RealConstant 2.32232999999999983e+01 (Real 8 [])) ()) (= (Var 3 f) (RealConstant 2.12300000000000004e+01 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 max@__lpython_overloaded_2__max 3 max [((Var 3 d)) ((Var 3 e)) ((Var 3 f))] (Real 8 []) () ()) Eq (Var 3 d) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 max@__lpython_overloaded_3__max 3 max [((Var 3 e)) ((Var 3 f))] (Real 8 []) () ()) Eq (Var 3 e) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_max_int: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 2 b Local () () Default (Integer 4 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Integer 4 []) Source Public Required .false.), max: (ExternalSymbol 2 max 8 max lpython_builtin [] max Private)}) test_max_int [] [(= (Var 2 a) (IntegerConstant 1 (Integer 4 [])) ()) (= (Var 2 b) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 2 c) (IntegerConstant 3 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 max@__lpython_overloaded_0__max 2 max [((Var 2 a)) ((Var 2 b))] (Integer 4 []) () ()) Eq (Var 2 b) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 max@__lpython_overloaded_1__max 2 max [((Var 2 a)) ((Var 2 b)) ((Var 2 c))] (Integer 4 []) () ()) Eq (Var 2 c) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 max@__lpython_overloaded_1__max 2 max [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 3 (Integer 4 [])) ()) Eq (IntegerConstant 3 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 max@__lpython_overloaded_0__max 2 max [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 6 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 6 (Integer 4 [])) ()) Eq (IntegerConstant 6 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.), test_min_float: (Subroutine (SymbolTable 5 {d: (Variable 5 d Local () () Default (Real 8 []) Source Public Required .false.), e: (Variable 5 e Local () () Default (Real 8 []) Source Public Required .false.), f: (Variable 5 f Local () () Default (Real 8 []) Source Public Required .false.), min: (ExternalSymbol 5 min 8 min lpython_builtin [] min Private)}) test_min_float [] [(= (Var 5 d) (RealConstant 2.32330000000000005e+01 (Real 8 [])) ()) (= (Var 5 e) (RealConstant 2.32232999999999983e+01 (Real 8 [])) ()) (= (Var 5 f) (RealConstant 2.12300000000000004e+01 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 min@__lpython_overloaded_2__min 5 min [((Var 5 d)) ((Var 5 e)) ((Var 5 f))] (Real 8 []) () ()) Eq (Var 5 f) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 min@__lpython_overloaded_3__min 5 min [((Var 5 e)) ((Var 5 f))] (Real 8 []) () ()) Eq (Var 5 f) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_min_int: (Subroutine (SymbolTable 4 {a: (Variable 4 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 4 b Local () () Default (Integer 4 []) Source Public Required .false.), c: (Variable 4 c Local () () Default (Integer 4 []) Source Public Required .false.), min: (ExternalSymbol 4 min 8 min lpython_builtin [] min Private)}) test_min_int [] [(= (Var 4 a) (IntegerConstant 1 (Integer 4 [])) ()) (= (Var 4 b) (IntegerConstant 2 (Integer 4 [])) ()) (= (Var 4 c) (IntegerConstant 3 (Integer 4 [])) ()) (Assert (IntegerCompare (FunctionCall 1 min@__lpython_overloaded_0__min 4 min [((Var 4 a)) ((Var 4 b))] (Integer 4 []) () ()) Eq (Var 4 a) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 min@__lpython_overloaded_1__min 4 min [((Var 4 a)) ((Var 4 b)) ((Var 4 c))] (Integer 4 []) () ()) Eq (Var 4 a) (Logical 4 []) ()) ()) (Assert (IntegerCompare (FunctionCall 1 min@__lpython_overloaded_1__min 4 min [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 []))) ((IntegerConstant 3 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 1 (Integer 4 [])) ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ()) (Assert (IntegerCompare (FunctionCall 1 min@__lpython_overloaded_0__min 4 min [((IntegerConstant 1 (Integer 4 []))) ((IntegerConstant 6 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 1 (Integer 4 [])) ()) Eq (IntegerConstant 1 (Integer 4 [])) (Logical 4 []) (LogicalConstant .true. (Logical 4 []))) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_numpy_03-e600a49.json b/tests/reference/asr-test_numpy_03-e600a49.json index 85804266c6..c121c7b0d3 100644 --- a/tests/reference/asr-test_numpy_03-e600a49.json +++ b/tests/reference/asr-test_numpy_03-e600a49.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_numpy_03-e600a49.stdout", - "stdout_hash": "7d31794cc5e82a59612afc9ab40fe6e194a47658b9480ecc6a01de40", + "stdout_hash": "a9b6c79abcdce6f80d554a05203be016cf0524ca1c77ee4ce9ff316c", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_numpy_03-e600a49.stdout b/tests/reference/asr-test_numpy_03-e600a49.stdout index fd910f734d..fe0e861c63 100644 --- a/tests/reference/asr-test_numpy_03-e600a49.stdout +++ b/tests/reference/asr-test_numpy_03-e600a49.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_floordiv@__lpython_overloaded_2___lpython_floordiv: (ExternalSymbol 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 32 __lpython_overloaded_2___lpython_floordiv lpython_builtin [] __lpython_overloaded_2___lpython_floordiv Public), _lpython_main_program: (Subroutine (SymbolTable 104 {}) _lpython_main_program [] [(SubroutineCall 1 test_reshape_with_argument () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 32 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 103 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), numpy: (Module (SymbolTable 3 {__lpython_overloaded_0__cos: (Function (SymbolTable 9 {_lpython_return_variable: (Variable 9 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 9 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__cos [(Var 9 x)] [(= (Var 9 _lpython_return_variable) (FunctionCall 3 _lfortran_dcos () [((Var 9 x))] (Real 8 []) () ()) ()) (Return)] (Var 9 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log: (Function (SymbolTable 19 {_lpython_return_variable: (Variable 19 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 19 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log [(Var 19 x)] [(= (Var 19 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog () [((Var 19 x))] (Real 8 []) () ()) ()) (Return)] (Var 19 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log10: (Function (SymbolTable 23 {_lpython_return_variable: (Variable 23 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 23 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log10 [(Var 23 x)] [(= (Var 23 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog10 () [((Var 23 x))] (Real 8 []) () ()) ()) (Return)] (Var 23 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log2: (Function (SymbolTable 26 {_lpython_return_variable: (Variable 26 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 26 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log2 [(Var 26 x)] [(= (Var 26 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_dlog () [((Var 26 x))] (Real 8 []) () ()) Div (FunctionCall 3 _lfortran_dlog () [((RealConstant 2.00000000000000000e+00 (Real 8 [])))] (Real 8 []) () ()) (Real 8 []) ()) ()) (Return)] (Var 26 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sin: (Function (SymbolTable 5 {_lpython_return_variable: (Variable 5 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 5 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sin [(Var 5 x)] [(= (Var 5 _lpython_return_variable) (FunctionCall 3 _lfortran_dsin () [((Var 5 x))] (Real 8 []) () ()) ()) (Return)] (Var 5 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sqrt: (Function (SymbolTable 12 {_lpython_return_variable: (Variable 12 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 12 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sqrt [(Var 12 x)] [(= (Var 12 _lpython_return_variable) (RealBinOp (Var 12 x) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) ()) (Return)] (Var 12 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__tan: (Function (SymbolTable 15 {_lpython_return_variable: (Variable 15 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 15 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__tan [(Var 15 x)] [(= (Var 15 _lpython_return_variable) (FunctionCall 3 _lfortran_dtan () [((Var 15 x))] (Real 8 []) () ()) ()) (Return)] (Var 15 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__cos: (Function (SymbolTable 11 {_lpython_return_variable: (Variable 11 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 11 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__cos [(Var 11 x)] [(= (Var 11 _lpython_return_variable) (FunctionCall 3 _lfortran_scos () [((Var 11 x))] (Real 4 []) () ()) ()) (Return)] (Var 11 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log: (Function (SymbolTable 21 {_lpython_return_variable: (Variable 21 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 21 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log [(Var 21 x)] [(= (Var 21 _lpython_return_variable) (FunctionCall 3 _lfortran_slog () [((Var 21 x))] (Real 4 []) () ()) ()) (Return)] (Var 21 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log10: (Function (SymbolTable 25 {_lpython_return_variable: (Variable 25 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 25 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log10 [(Var 25 x)] [(= (Var 25 _lpython_return_variable) (FunctionCall 3 _lfortran_slog10 () [((Var 25 x))] (Real 4 []) () ()) ()) (Return)] (Var 25 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log2: (Function (SymbolTable 27 {_lpython_return_variable: (Variable 27 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 27 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log2 [(Var 27 x)] [(= (Var 27 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_slog () [((Var 27 x))] (Real 4 []) () ()) Div (FunctionCall 3 _lfortran_slog () [((Cast (RealConstant 2.00000000000000000e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 2.00000000000000000e+00 (Real 4 []))))] (Real 4 []) () ()) (Real 4 []) ()) ()) (Return)] (Var 27 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sin: (Function (SymbolTable 7 {_lpython_return_variable: (Variable 7 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 7 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sin [(Var 7 x)] [(= (Var 7 _lpython_return_variable) (FunctionCall 3 _lfortran_ssin () [((Var 7 x))] (Real 4 []) () ()) ()) (Return)] (Var 7 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sqrt: (Function (SymbolTable 13 {_lpython_return_variable: (Variable 13 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), result: (Variable 13 result Local () () Default (Real 4 []) Source Public Required .false.), x: (Variable 13 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sqrt [(Var 13 x)] [(= (Var 13 result) (Cast (RealBinOp (Cast (Var 13 x) RealToReal (Real 8 []) ()) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) RealToReal (Real 4 []) ()) ()) (= (Var 13 _lpython_return_variable) (Var 13 result) ()) (Return)] (Var 13 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__tan: (Function (SymbolTable 17 {_lpython_return_variable: (Variable 17 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 17 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__tan [(Var 17 x)] [(= (Var 17 _lpython_return_variable) (FunctionCall 3 _lfortran_stan () [((Var 17 x))] (Real 4 []) () ()) ()) (Return)] (Var 17 _lpython_return_variable) Source Public Implementation .true. ()), _lfortran_dcos: (Function (SymbolTable 8 {_lpython_return_variable: (Variable 8 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 8 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dcos [(Var 8 x)] [] (Var 8 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog: (Function (SymbolTable 18 {_lpython_return_variable: (Variable 18 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 18 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog [(Var 18 x)] [] (Var 18 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog10: (Function (SymbolTable 22 {_lpython_return_variable: (Variable 22 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 22 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog10 [(Var 22 x)] [] (Var 22 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dsin: (Function (SymbolTable 4 {_lpython_return_variable: (Variable 4 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 4 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dsin [(Var 4 x)] [] (Var 4 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dtan: (Function (SymbolTable 14 {_lpython_return_variable: (Variable 14 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 14 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dtan [(Var 14 x)] [] (Var 14 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_scos: (Function (SymbolTable 10 {_lpython_return_variable: (Variable 10 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 10 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_scos [(Var 10 x)] [] (Var 10 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog: (Function (SymbolTable 20 {_lpython_return_variable: (Variable 20 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 20 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog [(Var 20 x)] [] (Var 20 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog10: (Function (SymbolTable 24 {_lpython_return_variable: (Variable 24 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 24 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog10 [(Var 24 x)] [] (Var 24 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_ssin: (Function (SymbolTable 6 {_lpython_return_variable: (Variable 6 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 6 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_ssin [(Var 6 x)] [] (Var 6 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_stan: (Function (SymbolTable 16 {_lpython_return_variable: (Variable 16 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 16 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_stan [(Var 16 x)] [] (Var 16 _lpython_return_variable) BindC Public Interface .false. ()), cos: (GenericProcedure 3 cos [3 __lpython_overloaded_0__cos 3 __lpython_overloaded_1__cos] Public), log: (GenericProcedure 3 log [3 __lpython_overloaded_0__log 3 __lpython_overloaded_1__log] Public), log10: (GenericProcedure 3 log10 [3 __lpython_overloaded_0__log10 3 __lpython_overloaded_1__log10] Public), log2: (GenericProcedure 3 log2 [3 __lpython_overloaded_0__log2 3 __lpython_overloaded_1__log2] Public), sin: (GenericProcedure 3 sin [3 __lpython_overloaded_0__sin 3 __lpython_overloaded_1__sin] Public), sqrt: (GenericProcedure 3 sqrt [3 __lpython_overloaded_0__sqrt 3 __lpython_overloaded_1__sqrt] Public), tan: (GenericProcedure 3 tan [3 __lpython_overloaded_0__tan 3 __lpython_overloaded_1__tan] Public)}) numpy [] .false. .false.), test_1d_to_nd: (Subroutine (SymbolTable 29 {_lpython_floordiv: (ExternalSymbol 29 _lpython_floordiv 32 _lpython_floordiv lpython_builtin [] _lpython_floordiv Private), a: (Variable 29 a Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.), abs: (ExternalSymbol 29 abs 32 abs lpython_builtin [] abs Private), b: (Variable 29 b Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) Source Public Required .false.), c: (Variable 29 c Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.), d: (Variable 29 d InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), eps: (Variable 29 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 29 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 29 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 29 k Local () () Default (Integer 4 []) Source Public Required .false.), l: (Variable 29 l Local () () Default (Integer 4 []) Source Public Required .false.), newshape: (Variable 29 newshape Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 1 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))))]) Source Public Required .false.), newshape1: (Variable 29 newshape1 Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 3 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))))]) Source Public Required .false.)}) test_1d_to_nd [(Var 29 d)] [(= (Var 29 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (DoLoop ((Var 29 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (Var 29 i) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 29 _lpython_floordiv [((Var 29 k)) ((IntegerConstant 16 (Integer 4 [])))] (Integer 4 []) () ()) ()) (= (Var 29 j) (IntegerBinOp (Var 29 k) Sub (IntegerBinOp (Var 29 i) Mul (IntegerConstant 16 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (ArrayItem (Var 29 b) [(() (Var 29 k) ())] (Real 8 []) ()) (RealBinOp (Cast (IntegerBinOp (Var 29 i) Add (Var 29 j) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) Add (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()) ())]) (= (ArrayItem (Var 29 newshape) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 16 (Integer 4 [])) ()) (= (ArrayItem (Var 29 newshape) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 16 (Integer 4 [])) ()) (= (Var 29 a) (ArrayReshape (Var 29 b) (Var 29 newshape) (Real 8 [(() ())]) ()) ()) (DoLoop ((Var 29 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 29 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 29 abs [((RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 29 a) [(() (Var 29 i) ()) (() (Var 29 j) ())] (Real 8 []) ()) Sub (Cast (Var 29 i) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 29 j) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 29 eps) (Logical 4 []) ()) ())])]) (= (ArrayItem (Var 29 newshape1) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 16 (Integer 4 [])) ()) (= (ArrayItem (Var 29 newshape1) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 16 (Integer 4 [])) ()) (= (ArrayItem (Var 29 newshape1) [(() (IntegerConstant 2 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 16 (Integer 4 [])) ()) (= (Var 29 c) (ArrayReshape (Var 29 d) (Var 29 newshape1) (Real 8 [(() ())]) ()) ()) (DoLoop ((Var 29 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 29 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 29 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 29 abs [((RealBinOp (RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 29 c) [(() (Var 29 i) ()) (() (Var 29 j) ()) (() (Var 29 k) ())] (Real 8 []) ()) Sub (Cast (Var 29 i) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 29 j) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 29 k) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 29 eps) (Logical 4 []) ()) ())])])])] Source Public Implementation () .false. .false.), test_nd_to_1d: (Subroutine (SymbolTable 28 {_lpython_floordiv: (ExternalSymbol 28 _lpython_floordiv 32 _lpython_floordiv lpython_builtin [] _lpython_floordiv Private), a: (Variable 28 a InOut () () Default (Real 8 [(() ()) (() ())]) Source Public Required .false.), abs: (ExternalSymbol 28 abs 32 abs lpython_builtin [] abs Private), b: (Variable 28 b Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) Source Public Required .false.), c: (Variable 28 c Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.), d: (Variable 28 d Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4096 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4095 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4096 (Integer 4 []))))]) Source Public Required .false.), eps: (Variable 28 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 28 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 28 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 28 k Local () () Default (Integer 4 []) Source Public Required .false.), l: (Variable 28 l Local () () Default (Integer 4 []) Source Public Required .false.), newshape: (Variable 28 newshape Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 1 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 1 (Integer 4 []))))]) Source Public Required .false.), newshape1: (Variable 28 newshape1 Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 1 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 1 (Integer 4 []))))]) Source Public Required .false.)}) test_nd_to_1d [(Var 28 a)] [(= (Var 28 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (= (ArrayItem (Var 28 newshape) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 256 (Integer 4 [])) ()) (= (Var 28 b) (ArrayReshape (Var 28 a) (Var 28 newshape) (Real 8 [(() ())]) ()) ()) (DoLoop ((Var 28 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (Var 28 i) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 28 _lpython_floordiv [((Var 28 k)) ((IntegerConstant 16 (Integer 4 [])))] (Integer 4 []) () ()) ()) (= (Var 28 j) (IntegerBinOp (Var 28 k) Sub (IntegerBinOp (Var 28 i) Mul (IntegerConstant 16 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 28 abs [((RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 28 b) [(() (Var 28 k) ())] (Real 8 []) ()) Sub (Cast (Var 28 i) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 28 j) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 28 eps) (Logical 4 []) ()) ())]) (DoLoop ((Var 28 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 28 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 28 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 28 c) [(() (Var 28 i) ()) (() (Var 28 j) ()) (() (Var 28 k) ())] (Real 8 []) ()) (RealBinOp (Cast (IntegerBinOp (IntegerBinOp (Var 28 i) Add (Var 28 j) (Integer 4 []) ()) Add (Var 28 k) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) Add (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()) ())])])]) (= (ArrayItem (Var 28 newshape1) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 4096 (Integer 4 [])) ()) (= (Var 28 d) (ArrayReshape (Var 28 c) (Var 28 newshape1) (Real 8 [(() ())]) ()) ()) (DoLoop ((Var 28 l) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 4096 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4095 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (Var 28 i) (Cast (Cast (RealBinOp (Cast (Var 28 l) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 256 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) RealToInteger (Integer 8 []) ()) IntegerToInteger (Integer 4 []) ()) ()) (= (Var 28 j) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 28 _lpython_floordiv [((IntegerBinOp (Var 28 l) Sub (IntegerBinOp (Var 28 i) Mul (IntegerConstant 256 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ())) ((IntegerConstant 16 (Integer 4 [])))] (Integer 4 []) () ()) ()) (= (Var 28 k) (IntegerBinOp (IntegerBinOp (Var 28 l) Sub (IntegerBinOp (Var 28 i) Mul (IntegerConstant 256 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) Sub (IntegerBinOp (Var 28 j) Mul (IntegerConstant 16 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 28 abs [((RealBinOp (RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 28 d) [(() (Var 28 l) ())] (Real 8 []) ()) Sub (Cast (Var 28 i) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 28 j) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 28 k) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 28 eps) (Logical 4 []) ()) ())])] Source Public Implementation () .false. .false.), test_reshape_with_argument: (Subroutine (SymbolTable 30 {_lpython_floordiv: (ExternalSymbol 30 _lpython_floordiv 32 _lpython_floordiv lpython_builtin [] _lpython_floordiv Private), a: (Variable 30 a Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.), d: (Variable 30 d Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4096 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4095 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4096 (Integer 4 []))))]) Source Public Required .false.), i: (Variable 30 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 30 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 30 k Local () () Default (Integer 4 []) Source Public Required .false.), l: (Variable 30 l Local () () Default (Integer 4 []) Source Public Required .false.)}) test_reshape_with_argument [] [(DoLoop ((Var 30 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 30 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 30 a) [(() (Var 30 i) ()) (() (Var 30 j) ())] (Real 8 []) ()) (RealBinOp (Cast (IntegerBinOp (Var 30 i) Add (Var 30 j) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) Add (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()) ())])]) (SubroutineCall 1 test_nd_to_1d () [((Var 30 a))] ()) (DoLoop ((Var 30 l) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 4096 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4095 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (Var 30 i) (Cast (Cast (RealBinOp (Cast (Var 30 l) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 256 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) RealToInteger (Integer 8 []) ()) IntegerToInteger (Integer 4 []) ()) ()) (= (Var 30 j) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 30 _lpython_floordiv [((IntegerBinOp (Var 30 l) Sub (IntegerBinOp (Var 30 i) Mul (IntegerConstant 256 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ())) ((IntegerConstant 16 (Integer 4 [])))] (Integer 4 []) () ()) ()) (= (Var 30 k) (IntegerBinOp (IntegerBinOp (Var 30 l) Sub (IntegerBinOp (Var 30 i) Mul (IntegerConstant 256 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) Sub (IntegerBinOp (Var 30 j) Mul (IntegerConstant 16 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (ArrayItem (Var 30 d) [(() (Var 30 l) ())] (Real 8 []) ()) (RealBinOp (Cast (IntegerBinOp (IntegerBinOp (Var 30 i) Add (Var 30 j) (Integer 4 []) ()) Add (Var 30 k) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) Add (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()) ())]) (SubroutineCall 1 test_1d_to_nd () [((Var 30 d))] ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_floordiv@__lpython_overloaded_2___lpython_floordiv: (ExternalSymbol 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 32 __lpython_overloaded_2___lpython_floordiv lpython_builtin [] __lpython_overloaded_2___lpython_floordiv Public), _lpython_main_program: (Subroutine (SymbolTable 110 {}) _lpython_main_program [] [(SubroutineCall 1 test_reshape_with_argument () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 32 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 109 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), numpy: (Module (SymbolTable 3 {__lpython_overloaded_0__cos: (Function (SymbolTable 9 {_lpython_return_variable: (Variable 9 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 9 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__cos [(Var 9 x)] [(= (Var 9 _lpython_return_variable) (FunctionCall 3 _lfortran_dcos () [((Var 9 x))] (Real 8 []) () ()) ()) (Return)] (Var 9 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log: (Function (SymbolTable 19 {_lpython_return_variable: (Variable 19 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 19 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log [(Var 19 x)] [(= (Var 19 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog () [((Var 19 x))] (Real 8 []) () ()) ()) (Return)] (Var 19 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log10: (Function (SymbolTable 23 {_lpython_return_variable: (Variable 23 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 23 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log10 [(Var 23 x)] [(= (Var 23 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog10 () [((Var 23 x))] (Real 8 []) () ()) ()) (Return)] (Var 23 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log2: (Function (SymbolTable 26 {_lpython_return_variable: (Variable 26 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 26 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log2 [(Var 26 x)] [(= (Var 26 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_dlog () [((Var 26 x))] (Real 8 []) () ()) Div (FunctionCall 3 _lfortran_dlog () [((RealConstant 2.00000000000000000e+00 (Real 8 [])))] (Real 8 []) () ()) (Real 8 []) ()) ()) (Return)] (Var 26 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sin: (Function (SymbolTable 5 {_lpython_return_variable: (Variable 5 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 5 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sin [(Var 5 x)] [(= (Var 5 _lpython_return_variable) (FunctionCall 3 _lfortran_dsin () [((Var 5 x))] (Real 8 []) () ()) ()) (Return)] (Var 5 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sqrt: (Function (SymbolTable 12 {_lpython_return_variable: (Variable 12 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 12 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sqrt [(Var 12 x)] [(= (Var 12 _lpython_return_variable) (RealBinOp (Var 12 x) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) ()) (Return)] (Var 12 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__tan: (Function (SymbolTable 15 {_lpython_return_variable: (Variable 15 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 15 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__tan [(Var 15 x)] [(= (Var 15 _lpython_return_variable) (FunctionCall 3 _lfortran_dtan () [((Var 15 x))] (Real 8 []) () ()) ()) (Return)] (Var 15 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__cos: (Function (SymbolTable 11 {_lpython_return_variable: (Variable 11 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 11 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__cos [(Var 11 x)] [(= (Var 11 _lpython_return_variable) (FunctionCall 3 _lfortran_scos () [((Var 11 x))] (Real 4 []) () ()) ()) (Return)] (Var 11 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log: (Function (SymbolTable 21 {_lpython_return_variable: (Variable 21 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 21 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log [(Var 21 x)] [(= (Var 21 _lpython_return_variable) (FunctionCall 3 _lfortran_slog () [((Var 21 x))] (Real 4 []) () ()) ()) (Return)] (Var 21 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log10: (Function (SymbolTable 25 {_lpython_return_variable: (Variable 25 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 25 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log10 [(Var 25 x)] [(= (Var 25 _lpython_return_variable) (FunctionCall 3 _lfortran_slog10 () [((Var 25 x))] (Real 4 []) () ()) ()) (Return)] (Var 25 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log2: (Function (SymbolTable 27 {_lpython_return_variable: (Variable 27 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 27 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log2 [(Var 27 x)] [(= (Var 27 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_slog () [((Var 27 x))] (Real 4 []) () ()) Div (FunctionCall 3 _lfortran_slog () [((Cast (RealConstant 2.00000000000000000e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 2.00000000000000000e+00 (Real 4 []))))] (Real 4 []) () ()) (Real 4 []) ()) ()) (Return)] (Var 27 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sin: (Function (SymbolTable 7 {_lpython_return_variable: (Variable 7 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 7 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sin [(Var 7 x)] [(= (Var 7 _lpython_return_variable) (FunctionCall 3 _lfortran_ssin () [((Var 7 x))] (Real 4 []) () ()) ()) (Return)] (Var 7 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sqrt: (Function (SymbolTable 13 {_lpython_return_variable: (Variable 13 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), result: (Variable 13 result Local () () Default (Real 4 []) Source Public Required .false.), x: (Variable 13 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sqrt [(Var 13 x)] [(= (Var 13 result) (Cast (RealBinOp (Cast (Var 13 x) RealToReal (Real 8 []) ()) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) RealToReal (Real 4 []) ()) ()) (= (Var 13 _lpython_return_variable) (Var 13 result) ()) (Return)] (Var 13 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__tan: (Function (SymbolTable 17 {_lpython_return_variable: (Variable 17 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 17 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__tan [(Var 17 x)] [(= (Var 17 _lpython_return_variable) (FunctionCall 3 _lfortran_stan () [((Var 17 x))] (Real 4 []) () ()) ()) (Return)] (Var 17 _lpython_return_variable) Source Public Implementation .true. ()), _lfortran_dcos: (Function (SymbolTable 8 {_lpython_return_variable: (Variable 8 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 8 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dcos [(Var 8 x)] [] (Var 8 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog: (Function (SymbolTable 18 {_lpython_return_variable: (Variable 18 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 18 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog [(Var 18 x)] [] (Var 18 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog10: (Function (SymbolTable 22 {_lpython_return_variable: (Variable 22 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 22 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog10 [(Var 22 x)] [] (Var 22 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dsin: (Function (SymbolTable 4 {_lpython_return_variable: (Variable 4 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 4 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dsin [(Var 4 x)] [] (Var 4 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dtan: (Function (SymbolTable 14 {_lpython_return_variable: (Variable 14 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 14 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dtan [(Var 14 x)] [] (Var 14 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_scos: (Function (SymbolTable 10 {_lpython_return_variable: (Variable 10 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 10 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_scos [(Var 10 x)] [] (Var 10 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog: (Function (SymbolTable 20 {_lpython_return_variable: (Variable 20 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 20 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog [(Var 20 x)] [] (Var 20 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog10: (Function (SymbolTable 24 {_lpython_return_variable: (Variable 24 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 24 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog10 [(Var 24 x)] [] (Var 24 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_ssin: (Function (SymbolTable 6 {_lpython_return_variable: (Variable 6 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 6 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_ssin [(Var 6 x)] [] (Var 6 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_stan: (Function (SymbolTable 16 {_lpython_return_variable: (Variable 16 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 16 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_stan [(Var 16 x)] [] (Var 16 _lpython_return_variable) BindC Public Interface .false. ()), cos: (GenericProcedure 3 cos [3 __lpython_overloaded_0__cos 3 __lpython_overloaded_1__cos] Public), log: (GenericProcedure 3 log [3 __lpython_overloaded_0__log 3 __lpython_overloaded_1__log] Public), log10: (GenericProcedure 3 log10 [3 __lpython_overloaded_0__log10 3 __lpython_overloaded_1__log10] Public), log2: (GenericProcedure 3 log2 [3 __lpython_overloaded_0__log2 3 __lpython_overloaded_1__log2] Public), sin: (GenericProcedure 3 sin [3 __lpython_overloaded_0__sin 3 __lpython_overloaded_1__sin] Public), sqrt: (GenericProcedure 3 sqrt [3 __lpython_overloaded_0__sqrt 3 __lpython_overloaded_1__sqrt] Public), tan: (GenericProcedure 3 tan [3 __lpython_overloaded_0__tan 3 __lpython_overloaded_1__tan] Public)}) numpy [] .false. .false.), test_1d_to_nd: (Subroutine (SymbolTable 29 {_lpython_floordiv: (ExternalSymbol 29 _lpython_floordiv 32 _lpython_floordiv lpython_builtin [] _lpython_floordiv Private), a: (Variable 29 a Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.), abs: (ExternalSymbol 29 abs 32 abs lpython_builtin [] abs Private), b: (Variable 29 b Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) Source Public Required .false.), c: (Variable 29 c Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.), d: (Variable 29 d InOut () () Default (Real 8 [(() ())]) Source Public Required .false.), eps: (Variable 29 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 29 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 29 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 29 k Local () () Default (Integer 4 []) Source Public Required .false.), l: (Variable 29 l Local () () Default (Integer 4 []) Source Public Required .false.), newshape: (Variable 29 newshape Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 1 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))))]) Source Public Required .false.), newshape1: (Variable 29 newshape1 Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 3 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))))]) Source Public Required .false.)}) test_1d_to_nd [(Var 29 d)] [(= (Var 29 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (DoLoop ((Var 29 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (Var 29 i) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 29 _lpython_floordiv [((Var 29 k)) ((IntegerConstant 16 (Integer 4 [])))] (Integer 4 []) () ()) ()) (= (Var 29 j) (IntegerBinOp (Var 29 k) Sub (IntegerBinOp (Var 29 i) Mul (IntegerConstant 16 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (ArrayItem (Var 29 b) [(() (Var 29 k) ())] (Real 8 []) ()) (RealBinOp (Cast (IntegerBinOp (Var 29 i) Add (Var 29 j) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) Add (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()) ())]) (= (ArrayItem (Var 29 newshape) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 16 (Integer 4 [])) ()) (= (ArrayItem (Var 29 newshape) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 16 (Integer 4 [])) ()) (= (Var 29 a) (ArrayReshape (Var 29 b) (Var 29 newshape) (Real 8 [(() ())]) ()) ()) (DoLoop ((Var 29 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 29 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 29 abs [((RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 29 a) [(() (Var 29 i) ()) (() (Var 29 j) ())] (Real 8 []) ()) Sub (Cast (Var 29 i) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 29 j) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 29 eps) (Logical 4 []) ()) ())])]) (= (ArrayItem (Var 29 newshape1) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 16 (Integer 4 [])) ()) (= (ArrayItem (Var 29 newshape1) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 16 (Integer 4 [])) ()) (= (ArrayItem (Var 29 newshape1) [(() (IntegerConstant 2 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 16 (Integer 4 [])) ()) (= (Var 29 c) (ArrayReshape (Var 29 d) (Var 29 newshape1) (Real 8 [(() ())]) ()) ()) (DoLoop ((Var 29 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 29 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 29 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 29 abs [((RealBinOp (RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 29 c) [(() (Var 29 i) ()) (() (Var 29 j) ()) (() (Var 29 k) ())] (Real 8 []) ()) Sub (Cast (Var 29 i) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 29 j) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 29 k) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 29 eps) (Logical 4 []) ()) ())])])])] Source Public Implementation () .false. .false.), test_nd_to_1d: (Subroutine (SymbolTable 28 {_lpython_floordiv: (ExternalSymbol 28 _lpython_floordiv 32 _lpython_floordiv lpython_builtin [] _lpython_floordiv Private), a: (Variable 28 a InOut () () Default (Real 8 [(() ()) (() ())]) Source Public Required .false.), abs: (ExternalSymbol 28 abs 32 abs lpython_builtin [] abs Private), b: (Variable 28 b Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 256 (Integer 4 []))))]) Source Public Required .false.), c: (Variable 28 c Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.), d: (Variable 28 d Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4096 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4095 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4096 (Integer 4 []))))]) Source Public Required .false.), eps: (Variable 28 eps Local () () Default (Real 8 []) Source Public Required .false.), i: (Variable 28 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 28 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 28 k Local () () Default (Integer 4 []) Source Public Required .false.), l: (Variable 28 l Local () () Default (Integer 4 []) Source Public Required .false.), newshape: (Variable 28 newshape Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 1 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 1 (Integer 4 []))))]) Source Public Required .false.), newshape1: (Variable 28 newshape1 Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 1 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 0 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 1 (Integer 4 []))))]) Source Public Required .false.)}) test_nd_to_1d [(Var 28 a)] [(= (Var 28 eps) (RealConstant 9.99999999999999980e-13 (Real 8 [])) ()) (= (ArrayItem (Var 28 newshape) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 256 (Integer 4 [])) ()) (= (Var 28 b) (ArrayReshape (Var 28 a) (Var 28 newshape) (Real 8 [(() ())]) ()) ()) (DoLoop ((Var 28 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 256 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 255 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (Var 28 i) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 28 _lpython_floordiv [((Var 28 k)) ((IntegerConstant 16 (Integer 4 [])))] (Integer 4 []) () ()) ()) (= (Var 28 j) (IntegerBinOp (Var 28 k) Sub (IntegerBinOp (Var 28 i) Mul (IntegerConstant 16 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 28 abs [((RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 28 b) [(() (Var 28 k) ())] (Real 8 []) ()) Sub (Cast (Var 28 i) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 28 j) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 28 eps) (Logical 4 []) ()) ())]) (DoLoop ((Var 28 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 28 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 28 k) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 28 c) [(() (Var 28 i) ()) (() (Var 28 j) ()) (() (Var 28 k) ())] (Real 8 []) ()) (RealBinOp (Cast (IntegerBinOp (IntegerBinOp (Var 28 i) Add (Var 28 j) (Integer 4 []) ()) Add (Var 28 k) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) Add (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()) ())])])]) (= (ArrayItem (Var 28 newshape1) [(() (IntegerConstant 0 (Integer 4 [])) ())] (Integer 4 []) ()) (IntegerConstant 4096 (Integer 4 [])) ()) (= (Var 28 d) (ArrayReshape (Var 28 c) (Var 28 newshape1) (Real 8 [(() ())]) ()) ()) (DoLoop ((Var 28 l) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 4096 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4095 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (Var 28 i) (Cast (Cast (RealBinOp (Cast (Var 28 l) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 256 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) RealToInteger (Integer 8 []) ()) IntegerToInteger (Integer 4 []) ()) ()) (= (Var 28 j) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 28 _lpython_floordiv [((IntegerBinOp (Var 28 l) Sub (IntegerBinOp (Var 28 i) Mul (IntegerConstant 256 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ())) ((IntegerConstant 16 (Integer 4 [])))] (Integer 4 []) () ()) ()) (= (Var 28 k) (IntegerBinOp (IntegerBinOp (Var 28 l) Sub (IntegerBinOp (Var 28 i) Mul (IntegerConstant 256 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) Sub (IntegerBinOp (Var 28 j) Mul (IntegerConstant 16 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 28 abs [((RealBinOp (RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 28 d) [(() (Var 28 l) ())] (Real 8 []) ()) Sub (Cast (Var 28 i) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 28 j) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (Cast (Var 28 k) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) Sub (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) LtE (Var 28 eps) (Logical 4 []) ()) ())])] Source Public Implementation () .false. .false.), test_reshape_with_argument: (Subroutine (SymbolTable 30 {_lpython_floordiv: (ExternalSymbol 30 _lpython_floordiv 32 _lpython_floordiv lpython_builtin [] _lpython_floordiv Private), a: (Variable 30 a Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 [])))) ((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 16 (Integer 4 []))))]) Source Public Required .false.), d: (Variable 30 d Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 4096 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4095 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4096 (Integer 4 []))))]) Source Public Required .false.), i: (Variable 30 i Local () () Default (Integer 4 []) Source Public Required .false.), j: (Variable 30 j Local () () Default (Integer 4 []) Source Public Required .false.), k: (Variable 30 k Local () () Default (Integer 4 []) Source Public Required .false.), l: (Variable 30 l Local () () Default (Integer 4 []) Source Public Required .false.)}) test_reshape_with_argument [] [(DoLoop ((Var 30 i) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(DoLoop ((Var 30 j) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 16 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 15 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (ArrayItem (Var 30 a) [(() (Var 30 i) ()) (() (Var 30 j) ())] (Real 8 []) ()) (RealBinOp (Cast (IntegerBinOp (Var 30 i) Add (Var 30 j) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) Add (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()) ())])]) (SubroutineCall 1 test_nd_to_1d () [((Var 30 a))] ()) (DoLoop ((Var 30 l) (IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerConstant 4096 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4095 (Integer 4 []))) (IntegerConstant 1 (Integer 4 []))) [(= (Var 30 i) (Cast (Cast (RealBinOp (Cast (Var 30 l) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 256 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) RealToInteger (Integer 8 []) ()) IntegerToInteger (Integer 4 []) ()) ()) (= (Var 30 j) (FunctionCall 1 _lpython_floordiv@__lpython_overloaded_2___lpython_floordiv 30 _lpython_floordiv [((IntegerBinOp (Var 30 l) Sub (IntegerBinOp (Var 30 i) Mul (IntegerConstant 256 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ())) ((IntegerConstant 16 (Integer 4 [])))] (Integer 4 []) () ()) ()) (= (Var 30 k) (IntegerBinOp (IntegerBinOp (Var 30 l) Sub (IntegerBinOp (Var 30 i) Mul (IntegerConstant 256 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) Sub (IntegerBinOp (Var 30 j) Mul (IntegerConstant 16 (Integer 4 [])) (Integer 4 []) ()) (Integer 4 []) ()) ()) (= (ArrayItem (Var 30 d) [(() (Var 30 l) ())] (Real 8 []) ()) (RealBinOp (Cast (IntegerBinOp (IntegerBinOp (Var 30 i) Add (Var 30 j) (Integer 4 []) ()) Add (Var 30 k) (Integer 4 []) ()) IntegerToReal (Real 8 []) ()) Add (RealConstant 5.00000000000000000e-01 (Real 8 [])) (Real 8 []) ()) ())]) (SubroutineCall 1 test_1d_to_nd () [((Var 30 d))] ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_numpy_04-ecbb614.json b/tests/reference/asr-test_numpy_04-ecbb614.json index 2d51a1db54..3fcf258fd0 100644 --- a/tests/reference/asr-test_numpy_04-ecbb614.json +++ b/tests/reference/asr-test_numpy_04-ecbb614.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_numpy_04-ecbb614.stdout", - "stdout_hash": "78b1c3114aaced09445bb7e4754b7a2fdafd7b9e6b6f695eec337e26", + "stdout_hash": "5827fe1f7186074530e92c7fb533f13c3bba01c5389f26011051074f", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_numpy_04-ecbb614.stdout b/tests/reference/asr-test_numpy_04-ecbb614.stdout index c28014b656..534010808a 100644 --- a/tests/reference/asr-test_numpy_04-ecbb614.stdout +++ b/tests/reference/asr-test_numpy_04-ecbb614.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 104 {}) _lpython_main_program [] [(SubroutineCall 1 check () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 32 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_4__abs: (ExternalSymbol 1 abs@__lpython_overloaded_4__abs 32 __lpython_overloaded_4__abs lpython_builtin [] __lpython_overloaded_4__abs Public), check: (Subroutine (SymbolTable 30 {}) check [] [(SubroutineCall 1 test_array_01 () [] ()) (SubroutineCall 1 test_array_02 () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 103 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), numpy: (Module (SymbolTable 3 {__lpython_overloaded_0__cos: (Function (SymbolTable 9 {_lpython_return_variable: (Variable 9 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 9 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__cos [(Var 9 x)] [(= (Var 9 _lpython_return_variable) (FunctionCall 3 _lfortran_dcos () [((Var 9 x))] (Real 8 []) () ()) ()) (Return)] (Var 9 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log: (Function (SymbolTable 19 {_lpython_return_variable: (Variable 19 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 19 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log [(Var 19 x)] [(= (Var 19 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog () [((Var 19 x))] (Real 8 []) () ()) ()) (Return)] (Var 19 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log10: (Function (SymbolTable 23 {_lpython_return_variable: (Variable 23 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 23 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log10 [(Var 23 x)] [(= (Var 23 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog10 () [((Var 23 x))] (Real 8 []) () ()) ()) (Return)] (Var 23 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log2: (Function (SymbolTable 26 {_lpython_return_variable: (Variable 26 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 26 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log2 [(Var 26 x)] [(= (Var 26 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_dlog () [((Var 26 x))] (Real 8 []) () ()) Div (FunctionCall 3 _lfortran_dlog () [((RealConstant 2.00000000000000000e+00 (Real 8 [])))] (Real 8 []) () ()) (Real 8 []) ()) ()) (Return)] (Var 26 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sin: (Function (SymbolTable 5 {_lpython_return_variable: (Variable 5 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 5 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sin [(Var 5 x)] [(= (Var 5 _lpython_return_variable) (FunctionCall 3 _lfortran_dsin () [((Var 5 x))] (Real 8 []) () ()) ()) (Return)] (Var 5 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sqrt: (Function (SymbolTable 12 {_lpython_return_variable: (Variable 12 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 12 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sqrt [(Var 12 x)] [(= (Var 12 _lpython_return_variable) (RealBinOp (Var 12 x) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) ()) (Return)] (Var 12 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__tan: (Function (SymbolTable 15 {_lpython_return_variable: (Variable 15 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 15 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__tan [(Var 15 x)] [(= (Var 15 _lpython_return_variable) (FunctionCall 3 _lfortran_dtan () [((Var 15 x))] (Real 8 []) () ()) ()) (Return)] (Var 15 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__cos: (Function (SymbolTable 11 {_lpython_return_variable: (Variable 11 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 11 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__cos [(Var 11 x)] [(= (Var 11 _lpython_return_variable) (FunctionCall 3 _lfortran_scos () [((Var 11 x))] (Real 4 []) () ()) ()) (Return)] (Var 11 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log: (Function (SymbolTable 21 {_lpython_return_variable: (Variable 21 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 21 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log [(Var 21 x)] [(= (Var 21 _lpython_return_variable) (FunctionCall 3 _lfortran_slog () [((Var 21 x))] (Real 4 []) () ()) ()) (Return)] (Var 21 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log10: (Function (SymbolTable 25 {_lpython_return_variable: (Variable 25 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 25 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log10 [(Var 25 x)] [(= (Var 25 _lpython_return_variable) (FunctionCall 3 _lfortran_slog10 () [((Var 25 x))] (Real 4 []) () ()) ()) (Return)] (Var 25 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log2: (Function (SymbolTable 27 {_lpython_return_variable: (Variable 27 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 27 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log2 [(Var 27 x)] [(= (Var 27 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_slog () [((Var 27 x))] (Real 4 []) () ()) Div (FunctionCall 3 _lfortran_slog () [((Cast (RealConstant 2.00000000000000000e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 2.00000000000000000e+00 (Real 4 []))))] (Real 4 []) () ()) (Real 4 []) ()) ()) (Return)] (Var 27 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sin: (Function (SymbolTable 7 {_lpython_return_variable: (Variable 7 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 7 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sin [(Var 7 x)] [(= (Var 7 _lpython_return_variable) (FunctionCall 3 _lfortran_ssin () [((Var 7 x))] (Real 4 []) () ()) ()) (Return)] (Var 7 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sqrt: (Function (SymbolTable 13 {_lpython_return_variable: (Variable 13 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), result: (Variable 13 result Local () () Default (Real 4 []) Source Public Required .false.), x: (Variable 13 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sqrt [(Var 13 x)] [(= (Var 13 result) (Cast (RealBinOp (Cast (Var 13 x) RealToReal (Real 8 []) ()) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) RealToReal (Real 4 []) ()) ()) (= (Var 13 _lpython_return_variable) (Var 13 result) ()) (Return)] (Var 13 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__tan: (Function (SymbolTable 17 {_lpython_return_variable: (Variable 17 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 17 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__tan [(Var 17 x)] [(= (Var 17 _lpython_return_variable) (FunctionCall 3 _lfortran_stan () [((Var 17 x))] (Real 4 []) () ()) ()) (Return)] (Var 17 _lpython_return_variable) Source Public Implementation .true. ()), _lfortran_dcos: (Function (SymbolTable 8 {_lpython_return_variable: (Variable 8 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 8 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dcos [(Var 8 x)] [] (Var 8 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog: (Function (SymbolTable 18 {_lpython_return_variable: (Variable 18 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 18 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog [(Var 18 x)] [] (Var 18 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog10: (Function (SymbolTable 22 {_lpython_return_variable: (Variable 22 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 22 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog10 [(Var 22 x)] [] (Var 22 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dsin: (Function (SymbolTable 4 {_lpython_return_variable: (Variable 4 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 4 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dsin [(Var 4 x)] [] (Var 4 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dtan: (Function (SymbolTable 14 {_lpython_return_variable: (Variable 14 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 14 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dtan [(Var 14 x)] [] (Var 14 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_scos: (Function (SymbolTable 10 {_lpython_return_variable: (Variable 10 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 10 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_scos [(Var 10 x)] [] (Var 10 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog: (Function (SymbolTable 20 {_lpython_return_variable: (Variable 20 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 20 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog [(Var 20 x)] [] (Var 20 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog10: (Function (SymbolTable 24 {_lpython_return_variable: (Variable 24 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 24 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog10 [(Var 24 x)] [] (Var 24 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_ssin: (Function (SymbolTable 6 {_lpython_return_variable: (Variable 6 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 6 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_ssin [(Var 6 x)] [] (Var 6 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_stan: (Function (SymbolTable 16 {_lpython_return_variable: (Variable 16 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 16 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_stan [(Var 16 x)] [] (Var 16 _lpython_return_variable) BindC Public Interface .false. ()), cos: (GenericProcedure 3 cos [3 __lpython_overloaded_0__cos 3 __lpython_overloaded_1__cos] Public), log: (GenericProcedure 3 log [3 __lpython_overloaded_0__log 3 __lpython_overloaded_1__log] Public), log10: (GenericProcedure 3 log10 [3 __lpython_overloaded_0__log10 3 __lpython_overloaded_1__log10] Public), log2: (GenericProcedure 3 log2 [3 __lpython_overloaded_0__log2 3 __lpython_overloaded_1__log2] Public), sin: (GenericProcedure 3 sin [3 __lpython_overloaded_0__sin 3 __lpython_overloaded_1__sin] Public), sqrt: (GenericProcedure 3 sqrt [3 __lpython_overloaded_0__sqrt 3 __lpython_overloaded_1__sqrt] Public), tan: (GenericProcedure 3 tan [3 __lpython_overloaded_0__tan 3 __lpython_overloaded_1__tan] Public)}) numpy [] .false. .false.), test_array_01: (Subroutine (SymbolTable 28 {abs: (ExternalSymbol 28 abs 32 abs lpython_builtin [] abs Private), eps: (Variable 28 eps Local () () Default (Real 8 []) Source Public Required .false.), x: (Variable 28 x Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 3 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))))]) Source Public Required .false.)}) test_array_01 [] [(= (Var 28 x) (ArrayConstant [(RealConstant 1.00000000000000000e+00 (Real 8 [])) (RealConstant 2.00000000000000000e+00 (Real 8 [])) (RealConstant 3.00000000000000000e+00 (Real 8 []))] (Real 8 [])) ()) (= (Var 28 eps) (RealConstant 9.99999999999999979e-17 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 28 abs [((RealBinOp (ArrayItem (Var 28 x) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Real 8 []) ()) Sub (RealConstant 1.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 28 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 28 abs [((RealBinOp (ArrayItem (Var 28 x) [(() (IntegerConstant 2 (Integer 4 [])) ())] (Real 8 []) ()) Sub (RealConstant 2.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 28 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 28 abs [((RealBinOp (ArrayItem (Var 28 x) [(() (IntegerConstant 3 (Integer 4 [])) ())] (Real 8 []) ()) Sub (RealConstant 3.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 28 eps) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_array_02: (Subroutine (SymbolTable 29 {abs: (ExternalSymbol 29 abs 32 abs lpython_builtin [] abs Private), eps: (Variable 29 eps Local () () Default (Real 8 []) Source Public Required .false.), x: (Variable 29 x Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 3 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))))]) Source Public Required .false.)}) test_array_02 [] [(= (Var 29 x) (ArrayConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 []))] (Integer 4 [])) ()) (= (Var 29 eps) (RealConstant 9.99999999999999979e-17 (Real 8 [])) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_4__abs 29 abs [((IntegerBinOp (ArrayItem (Var 29 x) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Integer 4 []) ()) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()))] (Integer 4 []) () ()) IntegerToReal (Real 8 []) ()) Lt (Var 29 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_4__abs 29 abs [((IntegerBinOp (ArrayItem (Var 29 x) [(() (IntegerConstant 2 (Integer 4 [])) ())] (Integer 4 []) ()) Sub (IntegerConstant 2 (Integer 4 [])) (Integer 4 []) ()))] (Integer 4 []) () ()) IntegerToReal (Real 8 []) ()) Lt (Var 29 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_4__abs 29 abs [((IntegerBinOp (ArrayItem (Var 29 x) [(() (IntegerConstant 3 (Integer 4 [])) ())] (Integer 4 []) ()) Sub (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) ()))] (Integer 4 []) () ()) IntegerToReal (Real 8 []) ()) Lt (Var 29 eps) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 110 {}) _lpython_main_program [] [(SubroutineCall 1 check () [] ())] Source Public Implementation () .false. .false.), abs@__lpython_overloaded_0__abs: (ExternalSymbol 1 abs@__lpython_overloaded_0__abs 32 __lpython_overloaded_0__abs lpython_builtin [] __lpython_overloaded_0__abs Public), abs@__lpython_overloaded_4__abs: (ExternalSymbol 1 abs@__lpython_overloaded_4__abs 32 __lpython_overloaded_4__abs lpython_builtin [] __lpython_overloaded_4__abs Public), check: (Subroutine (SymbolTable 30 {}) check [] [(SubroutineCall 1 test_array_01 () [] ()) (SubroutineCall 1 test_array_02 () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main_program: (Program (SymbolTable 109 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), numpy: (Module (SymbolTable 3 {__lpython_overloaded_0__cos: (Function (SymbolTable 9 {_lpython_return_variable: (Variable 9 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 9 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__cos [(Var 9 x)] [(= (Var 9 _lpython_return_variable) (FunctionCall 3 _lfortran_dcos () [((Var 9 x))] (Real 8 []) () ()) ()) (Return)] (Var 9 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log: (Function (SymbolTable 19 {_lpython_return_variable: (Variable 19 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 19 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log [(Var 19 x)] [(= (Var 19 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog () [((Var 19 x))] (Real 8 []) () ()) ()) (Return)] (Var 19 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log10: (Function (SymbolTable 23 {_lpython_return_variable: (Variable 23 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 23 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log10 [(Var 23 x)] [(= (Var 23 _lpython_return_variable) (FunctionCall 3 _lfortran_dlog10 () [((Var 23 x))] (Real 8 []) () ()) ()) (Return)] (Var 23 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__log2: (Function (SymbolTable 26 {_lpython_return_variable: (Variable 26 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 26 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__log2 [(Var 26 x)] [(= (Var 26 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_dlog () [((Var 26 x))] (Real 8 []) () ()) Div (FunctionCall 3 _lfortran_dlog () [((RealConstant 2.00000000000000000e+00 (Real 8 [])))] (Real 8 []) () ()) (Real 8 []) ()) ()) (Return)] (Var 26 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sin: (Function (SymbolTable 5 {_lpython_return_variable: (Variable 5 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 5 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sin [(Var 5 x)] [(= (Var 5 _lpython_return_variable) (FunctionCall 3 _lfortran_dsin () [((Var 5 x))] (Real 8 []) () ()) ()) (Return)] (Var 5 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__sqrt: (Function (SymbolTable 12 {_lpython_return_variable: (Variable 12 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 12 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__sqrt [(Var 12 x)] [(= (Var 12 _lpython_return_variable) (RealBinOp (Var 12 x) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) ()) (Return)] (Var 12 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_0__tan: (Function (SymbolTable 15 {_lpython_return_variable: (Variable 15 _lpython_return_variable ReturnVar () () Default (Real 8 []) Source Public Required .false.), x: (Variable 15 x In () () Default (Real 8 []) Source Public Required .false.)}) __lpython_overloaded_0__tan [(Var 15 x)] [(= (Var 15 _lpython_return_variable) (FunctionCall 3 _lfortran_dtan () [((Var 15 x))] (Real 8 []) () ()) ()) (Return)] (Var 15 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__cos: (Function (SymbolTable 11 {_lpython_return_variable: (Variable 11 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 11 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__cos [(Var 11 x)] [(= (Var 11 _lpython_return_variable) (FunctionCall 3 _lfortran_scos () [((Var 11 x))] (Real 4 []) () ()) ()) (Return)] (Var 11 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log: (Function (SymbolTable 21 {_lpython_return_variable: (Variable 21 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 21 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log [(Var 21 x)] [(= (Var 21 _lpython_return_variable) (FunctionCall 3 _lfortran_slog () [((Var 21 x))] (Real 4 []) () ()) ()) (Return)] (Var 21 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log10: (Function (SymbolTable 25 {_lpython_return_variable: (Variable 25 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 25 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log10 [(Var 25 x)] [(= (Var 25 _lpython_return_variable) (FunctionCall 3 _lfortran_slog10 () [((Var 25 x))] (Real 4 []) () ()) ()) (Return)] (Var 25 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__log2: (Function (SymbolTable 27 {_lpython_return_variable: (Variable 27 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 27 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__log2 [(Var 27 x)] [(= (Var 27 _lpython_return_variable) (RealBinOp (FunctionCall 3 _lfortran_slog () [((Var 27 x))] (Real 4 []) () ()) Div (FunctionCall 3 _lfortran_slog () [((Cast (RealConstant 2.00000000000000000e+00 (Real 8 [])) RealToReal (Real 4 []) (RealConstant 2.00000000000000000e+00 (Real 4 []))))] (Real 4 []) () ()) (Real 4 []) ()) ()) (Return)] (Var 27 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sin: (Function (SymbolTable 7 {_lpython_return_variable: (Variable 7 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 7 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sin [(Var 7 x)] [(= (Var 7 _lpython_return_variable) (FunctionCall 3 _lfortran_ssin () [((Var 7 x))] (Real 4 []) () ()) ()) (Return)] (Var 7 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__sqrt: (Function (SymbolTable 13 {_lpython_return_variable: (Variable 13 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), result: (Variable 13 result Local () () Default (Real 4 []) Source Public Required .false.), x: (Variable 13 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__sqrt [(Var 13 x)] [(= (Var 13 result) (Cast (RealBinOp (Cast (Var 13 x) RealToReal (Real 8 []) ()) Pow (RealBinOp (Cast (IntegerConstant 1 (Integer 4 [])) IntegerToReal (Real 8 []) ()) Div (Cast (IntegerConstant 2 (Integer 4 [])) IntegerToReal (Real 8 []) ()) (Real 8 []) ()) (Real 8 []) ()) RealToReal (Real 4 []) ()) ()) (= (Var 13 _lpython_return_variable) (Var 13 result) ()) (Return)] (Var 13 _lpython_return_variable) Source Public Implementation .true. ()), __lpython_overloaded_1__tan: (Function (SymbolTable 17 {_lpython_return_variable: (Variable 17 _lpython_return_variable ReturnVar () () Default (Real 4 []) Source Public Required .false.), x: (Variable 17 x In () () Default (Real 4 []) Source Public Required .false.)}) __lpython_overloaded_1__tan [(Var 17 x)] [(= (Var 17 _lpython_return_variable) (FunctionCall 3 _lfortran_stan () [((Var 17 x))] (Real 4 []) () ()) ()) (Return)] (Var 17 _lpython_return_variable) Source Public Implementation .true. ()), _lfortran_dcos: (Function (SymbolTable 8 {_lpython_return_variable: (Variable 8 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 8 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dcos [(Var 8 x)] [] (Var 8 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog: (Function (SymbolTable 18 {_lpython_return_variable: (Variable 18 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 18 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog [(Var 18 x)] [] (Var 18 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dlog10: (Function (SymbolTable 22 {_lpython_return_variable: (Variable 22 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 22 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dlog10 [(Var 22 x)] [] (Var 22 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dsin: (Function (SymbolTable 4 {_lpython_return_variable: (Variable 4 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 4 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dsin [(Var 4 x)] [] (Var 4 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_dtan: (Function (SymbolTable 14 {_lpython_return_variable: (Variable 14 _lpython_return_variable ReturnVar () () Default (Real 8 []) BindC Public Required .false.), x: (Variable 14 x In () () Default (Real 8 []) BindC Public Required .true.)}) _lfortran_dtan [(Var 14 x)] [] (Var 14 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_scos: (Function (SymbolTable 10 {_lpython_return_variable: (Variable 10 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 10 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_scos [(Var 10 x)] [] (Var 10 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog: (Function (SymbolTable 20 {_lpython_return_variable: (Variable 20 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 20 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog [(Var 20 x)] [] (Var 20 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_slog10: (Function (SymbolTable 24 {_lpython_return_variable: (Variable 24 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 24 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_slog10 [(Var 24 x)] [] (Var 24 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_ssin: (Function (SymbolTable 6 {_lpython_return_variable: (Variable 6 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 6 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_ssin [(Var 6 x)] [] (Var 6 _lpython_return_variable) BindC Public Interface .false. ()), _lfortran_stan: (Function (SymbolTable 16 {_lpython_return_variable: (Variable 16 _lpython_return_variable ReturnVar () () Default (Real 4 []) BindC Public Required .false.), x: (Variable 16 x In () () Default (Real 4 []) BindC Public Required .true.)}) _lfortran_stan [(Var 16 x)] [] (Var 16 _lpython_return_variable) BindC Public Interface .false. ()), cos: (GenericProcedure 3 cos [3 __lpython_overloaded_0__cos 3 __lpython_overloaded_1__cos] Public), log: (GenericProcedure 3 log [3 __lpython_overloaded_0__log 3 __lpython_overloaded_1__log] Public), log10: (GenericProcedure 3 log10 [3 __lpython_overloaded_0__log10 3 __lpython_overloaded_1__log10] Public), log2: (GenericProcedure 3 log2 [3 __lpython_overloaded_0__log2 3 __lpython_overloaded_1__log2] Public), sin: (GenericProcedure 3 sin [3 __lpython_overloaded_0__sin 3 __lpython_overloaded_1__sin] Public), sqrt: (GenericProcedure 3 sqrt [3 __lpython_overloaded_0__sqrt 3 __lpython_overloaded_1__sqrt] Public), tan: (GenericProcedure 3 tan [3 __lpython_overloaded_0__tan 3 __lpython_overloaded_1__tan] Public)}) numpy [] .false. .false.), test_array_01: (Subroutine (SymbolTable 28 {abs: (ExternalSymbol 28 abs 32 abs lpython_builtin [] abs Private), eps: (Variable 28 eps Local () () Default (Real 8 []) Source Public Required .false.), x: (Variable 28 x Local () () Default (Real 8 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 3 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))))]) Source Public Required .false.)}) test_array_01 [] [(= (Var 28 x) (ArrayConstant [(RealConstant 1.00000000000000000e+00 (Real 8 [])) (RealConstant 2.00000000000000000e+00 (Real 8 [])) (RealConstant 3.00000000000000000e+00 (Real 8 []))] (Real 8 [])) ()) (= (Var 28 eps) (RealConstant 9.99999999999999979e-17 (Real 8 [])) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 28 abs [((RealBinOp (ArrayItem (Var 28 x) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Real 8 []) ()) Sub (RealConstant 1.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 28 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 28 abs [((RealBinOp (ArrayItem (Var 28 x) [(() (IntegerConstant 2 (Integer 4 [])) ())] (Real 8 []) ()) Sub (RealConstant 2.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 28 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (FunctionCall 1 abs@__lpython_overloaded_0__abs 28 abs [((RealBinOp (ArrayItem (Var 28 x) [(() (IntegerConstant 3 (Integer 4 [])) ())] (Real 8 []) ()) Sub (RealConstant 3.00000000000000000e+00 (Real 8 [])) (Real 8 []) ()))] (Real 8 []) () ()) Lt (Var 28 eps) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.), test_array_02: (Subroutine (SymbolTable 29 {abs: (ExternalSymbol 29 abs 32 abs lpython_builtin [] abs Private), eps: (Variable 29 eps Local () () Default (Real 8 []) Source Public Required .false.), x: (Variable 29 x Local () () Default (Integer 4 [((IntegerConstant 0 (Integer 4 [])) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 3 (Integer 4 [])) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 2 (Integer 4 []))) Sub (IntegerConstant 0 (Integer 4 [])) (Integer 4 []) ()) Add (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) (IntegerConstant 3 (Integer 4 []))))]) Source Public Required .false.)}) test_array_02 [] [(= (Var 29 x) (ArrayConstant [(IntegerConstant 1 (Integer 4 [])) (IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4 []))] (Integer 4 [])) ()) (= (Var 29 eps) (RealConstant 9.99999999999999979e-17 (Real 8 [])) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_4__abs 29 abs [((IntegerBinOp (ArrayItem (Var 29 x) [(() (IntegerConstant 1 (Integer 4 [])) ())] (Integer 4 []) ()) Sub (IntegerConstant 1 (Integer 4 [])) (Integer 4 []) ()))] (Integer 4 []) () ()) IntegerToReal (Real 8 []) ()) Lt (Var 29 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_4__abs 29 abs [((IntegerBinOp (ArrayItem (Var 29 x) [(() (IntegerConstant 2 (Integer 4 [])) ())] (Integer 4 []) ()) Sub (IntegerConstant 2 (Integer 4 [])) (Integer 4 []) ()))] (Integer 4 []) () ()) IntegerToReal (Real 8 []) ()) Lt (Var 29 eps) (Logical 4 []) ()) ()) (Assert (RealCompare (Cast (FunctionCall 1 abs@__lpython_overloaded_4__abs 29 abs [((IntegerBinOp (ArrayItem (Var 29 x) [(() (IntegerConstant 3 (Integer 4 [])) ())] (Integer 4 []) ()) Sub (IntegerConstant 3 (Integer 4 [])) (Integer 4 []) ()))] (Integer 4 []) () ()) IntegerToReal (Real 8 []) ()) Lt (Var 29 eps) (Logical 4 []) ()) ())] Source Public Implementation () .false. .false.)}) []) diff --git a/tests/reference/asr-test_pow-3f5d550.json b/tests/reference/asr-test_pow-3f5d550.json index cb3e0db2a6..49eb1dc8e3 100644 --- a/tests/reference/asr-test_pow-3f5d550.json +++ b/tests/reference/asr-test_pow-3f5d550.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_pow-3f5d550.stdout", - "stdout_hash": "b270bf67687f111aa4804fc03fc9d7444b80053d222f399c5b83df07", + "stdout_hash": "d407eaaf491865a56575650abfa7525486b0c2075c1ec3756dded8d3", "stderr": "asr-test_pow-3f5d550.stderr", "stderr_hash": "3d950301563cce75654f28bf41f6f53428ed1f5ae997774345f374a3", "returncode": 0 diff --git a/tests/reference/asr-test_pow-3f5d550.stdout b/tests/reference/asr-test_pow-3f5d550.stdout index 1a1a0ccb97..710500e5cb 100644 --- a/tests/reference/asr-test_pow-3f5d550.stdout +++ b/tests/reference/asr-test_pow-3f5d550.stdout @@ -1 +1 @@ -(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 76 {}) _lpython_main_program [] [(SubroutineCall 1 main () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main: (Subroutine (SymbolTable 2 {pow: (ExternalSymbol 2 pow 4 pow lpython_builtin [] pow Private)}) main [] [(Print () [(FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 2 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 4 (Integer 4 [])) ())] () ()) (Print () [(IntegerBinOp (IntegerConstant 2 (Integer 4 [])) Pow (IntegerConstant 2 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 [])))] () ())] Source Public Implementation () .false. .false.), main_program: (Program (SymbolTable 75 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), pow@__lpython_overloaded_0__pow: (ExternalSymbol 1 pow@__lpython_overloaded_0__pow 4 __lpython_overloaded_0__pow lpython_builtin [] __lpython_overloaded_0__pow Public)}) []) +(TranslationUnit (SymbolTable 1 {_lpython_main_program: (Subroutine (SymbolTable 82 {}) _lpython_main_program [] [(SubroutineCall 1 main () [] ())] Source Public Implementation () .false. .false.), lpython_builtin: (IntrinsicModule lpython_builtin), main: (Subroutine (SymbolTable 2 {pow: (ExternalSymbol 2 pow 4 pow lpython_builtin [] pow Private)}) main [] [(Print () [(FunctionCall 1 pow@__lpython_overloaded_0__pow 2 pow [((IntegerConstant 2 (Integer 4 []))) ((IntegerConstant 2 (Integer 4 [])))] (Integer 4 []) (IntegerConstant 4 (Integer 4 [])) ())] () ()) (Print () [(IntegerBinOp (IntegerConstant 2 (Integer 4 [])) Pow (IntegerConstant 2 (Integer 4 [])) (Integer 4 []) (IntegerConstant 4 (Integer 4 [])))] () ())] Source Public Implementation () .false. .false.), main_program: (Program (SymbolTable 81 {}) main_program [] [(SubroutineCall 1 _lpython_main_program () [] ())]), pow@__lpython_overloaded_0__pow: (ExternalSymbol 1 pow@__lpython_overloaded_0__pow 4 __lpython_overloaded_0__pow lpython_builtin [] __lpython_overloaded_0__pow Public)}) []) diff --git a/tests/reference/cpp-test_builtin_pow-56b3f92.json b/tests/reference/cpp-test_builtin_pow-56b3f92.json index 632779290e..0060e57ad1 100644 --- a/tests/reference/cpp-test_builtin_pow-56b3f92.json +++ b/tests/reference/cpp-test_builtin_pow-56b3f92.json @@ -2,11 +2,11 @@ "basename": "cpp-test_builtin_pow-56b3f92", "cmd": "lpython --no-color --show-cpp {infile}", "infile": "tests/../integration_tests/test_builtin_pow.py", - "infile_hash": "5696eb31b14c38dcd0c4d04d12af41c66c8efd457a54b9adbce00229", + "infile_hash": "781905a37677f0db70db8bdd4e3047ee3d8d2ce4220f914f408ce0fa", "outfile": null, "outfile_hash": null, "stdout": "cpp-test_builtin_pow-56b3f92.stdout", - "stdout_hash": "c3cca4e953ca3870f8a7bb247c65f4264a4288e4c536c540adb4f511", + "stdout_hash": "5d9014b2416eb2f9aa75cb221f85e5c281ef9f9f16d0c7af4f57a6f9", "stderr": "cpp-test_builtin_pow-56b3f92.stderr", "stderr_hash": "180e1adfbb0d9c63a2fffa31951bbd629b3f1950cf0d97ca1389efe5", "returncode": 0 diff --git a/tests/reference/cpp-test_builtin_pow-56b3f92.stdout b/tests/reference/cpp-test_builtin_pow-56b3f92.stdout index 15198a23b7..ad2185bada 100644 --- a/tests/reference/cpp-test_builtin_pow-56b3f92.stdout +++ b/tests/reference/cpp-test_builtin_pow-56b3f92.stdout @@ -25,10 +25,16 @@ struct dimension_descriptor // Forward declarations void _lpython_main_program(); void test_pow(); +int32_t __lpython_overloaded_0___mod(int32_t a, int32_t b); double __lpython_overloaded_0__abs(double x); int32_t __lpython_overloaded_0__pow(int32_t x, int32_t y); +int32_t __lpython_overloaded_10__pow(int32_t x, int32_t y, int32_t z); +int64_t __lpython_overloaded_11__pow(int64_t x, int64_t y, int64_t z); int64_t __lpython_overloaded_1__pow(int64_t x, int64_t y); +int32_t __lpython_overloaded_2___lpython_floordiv(int32_t a, int32_t b); +int64_t __lpython_overloaded_2___mod(int64_t a, int64_t b); float __lpython_overloaded_2__pow(float x, float y); +int64_t __lpython_overloaded_3___lpython_floordiv(int64_t a, int64_t b); double __lpython_overloaded_3__pow(double x, double y); float __lpython_overloaded_4__pow(int32_t x, float y); float __lpython_overloaded_5__pow(float x, int32_t y); @@ -60,8 +66,11 @@ void test_pow() double eps; float f1; float f2; + int64_t i; int64_t i1; int64_t i2; + int64_t j; + int64_t k; float p; int32_t x; double y; @@ -117,10 +126,22 @@ void test_pow() assert (__lpython_overloaded_0__abs(__lpython_overloaded_7__pow( 0.00000000000000000e+00, 53) - 0.00000000000000000e+00) < eps); assert (__lpython_overloaded_0__pow(4, 2) == 16); assert (__lpython_overloaded_0__abs(__lpython_overloaded_7__pow(- 4.23500000000000000e+03, 52) - 3.94800380598526379e+188) < eps); + i = 7; + j = 2; + k = 5; + assert (__lpython_overloaded_11__pow(i, j, k) == 4); + assert (__lpython_overloaded_10__pow(102, 3, 121) == 38); c1 = __lpython_overloaded_9__complex(4, 5); c1 = __lpython_overloaded_9__pow(c1, 4); } +int32_t __lpython_overloaded_0___mod(int32_t a, int32_t b) +{ + int32_t _lpython_return_variable; + _lpython_return_variable = a - __lpython_overloaded_2___lpython_floordiv(a, b)*b; + return _lpython_return_variable; +} + double __lpython_overloaded_0__abs(double x) { double _lpython_return_variable; @@ -141,6 +162,32 @@ int32_t __lpython_overloaded_0__pow(int32_t x, int32_t y) return _lpython_return_variable; } +int32_t __lpython_overloaded_10__pow(int32_t x, int32_t y, int32_t z) +{ + int32_t _lpython_return_variable; + int32_t result; + if (y < 0) { + std::cerr << "ERROR STOP" << std::endl; + exit(1); + } + result = __lpython_overloaded_0___mod(std::pow(x, y), z); + _lpython_return_variable = result; + return _lpython_return_variable; +} + +int64_t __lpython_overloaded_11__pow(int64_t x, int64_t y, int64_t z) +{ + int64_t _lpython_return_variable; + int64_t result; + if (y < 0) { + std::cerr << "ERROR STOP" << std::endl; + exit(1); + } + result = __lpython_overloaded_2___mod(std::pow(x, y), z); + _lpython_return_variable = result; + return _lpython_return_variable; +} + int64_t __lpython_overloaded_1__pow(int64_t x, int64_t y) { int64_t _lpython_return_variable; @@ -148,6 +195,28 @@ int64_t __lpython_overloaded_1__pow(int64_t x, int64_t y) return _lpython_return_variable; } +int32_t __lpython_overloaded_2___lpython_floordiv(int32_t a, int32_t b) +{ + int32_t _lpython_return_variable; + float r; + int32_t result; + r = (float)(a)/(float)(b); + result = (int)(r); + if (r >= 0.00000000000000000e+00 || (float)(result) == r) { + _lpython_return_variable = result; + return _lpython_return_variable; + } + _lpython_return_variable = result - 1; + return _lpython_return_variable; +} + +int64_t __lpython_overloaded_2___mod(int64_t a, int64_t b) +{ + int64_t _lpython_return_variable; + _lpython_return_variable = a - __lpython_overloaded_3___lpython_floordiv(a, b)*b; + return _lpython_return_variable; +} + float __lpython_overloaded_2__pow(float x, float y) { float _lpython_return_variable; @@ -155,6 +224,21 @@ float __lpython_overloaded_2__pow(float x, float y) return _lpython_return_variable; } +int64_t __lpython_overloaded_3___lpython_floordiv(int64_t a, int64_t b) +{ + int64_t _lpython_return_variable; + double r; + int64_t result; + r = (float)(a)/(float)(b); + result = (int)(r); + if (r >= 0.00000000000000000e+00 || (float)(result) == r) { + _lpython_return_variable = result; + return _lpython_return_variable; + } + _lpython_return_variable = result - 1; + return _lpython_return_variable; +} + double __lpython_overloaded_3__pow(double x, double y) { double _lpython_return_variable;