FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/tests/complex1.py at main · sak-codes/lpython · GitHub
sak-codes
/
lpython
Public
forked from
lcompilers/lpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lpython
/
tests
/
complex1.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (33 loc) · 728 Bytes
Breadcrumbs
lpython
/
tests
/
complex1.py
Copy path
File metadata and controls
38 lines (33 loc) · 728 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from
ltypes
import
c32
,
c64
def
test_complex
():
c
:
c32
c1
:
c32
c2
:
c32
c3
:
c64
b
:
bool
# constant real or int as args
c
=
c32
(
complex
())
c
=
c32
(
complex
(
3.4
))
c
=
c32
(
complex
(
5.
,
4.3
))
c
=
c32
(
complex
(
1
))
c1
=
c32
(
complex
(
3
,
4
))
c2
=
c32
(
complex
(
2
,
4.5
))
c3
=
complex
(
3.
,
4.
)
b
=
c1
!=
c2
b
=
c64
(
c1
)
==
c3
# binary ops
c
=
c1
+
c2
c
=
c2
-
c1
c
=
c1
*
c2
c
=
c32
(
complex
(
1
,
2
)
**
complex
(
3.34534
,
4.8678678
))
c
=
c32
(
complex
(
1
,
2
)
*
complex
(
3
,
4
))
c
=
c32
(
complex
(
4
,
5
)
-
complex
(
3
,
4
))
def
test
():
x
:
c64
y
:
c64
z
:
c32
x
=
c64
(
2
)
+
3j
y
=
c64
(
5
)
+
5j
z
=
c32
(
x
+
y
)
z
=
c32
(
x
-
y
)
z
=
c32
(
c64
(
2
)
*
x
)
Back
|
FazBrowse Home
|
New Git URL