2023-03-28
This commit is contained in:
4
src/hello.jl
Executable file
4
src/hello.jl
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/snap/bin/julia
|
||||||
|
|
||||||
|
name = "World"
|
||||||
|
println("Hello, $name.")
|
||||||
26
src/numbers.jl
Executable file
26
src/numbers.jl
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/snap/bin/julia
|
||||||
|
|
||||||
|
x = 11
|
||||||
|
println(typeof(x))
|
||||||
|
|
||||||
|
y = 11.8
|
||||||
|
println(typeof(y))
|
||||||
|
|
||||||
|
println(Sys.WORD_SIZE) # 32 or 64 ...
|
||||||
|
|
||||||
|
println(typemax(Int))
|
||||||
|
println(typemin(Int))
|
||||||
|
|
||||||
|
a = 2.5e-4
|
||||||
|
println(typeof(a)) # Float64
|
||||||
|
|
||||||
|
b = 2.5f-4
|
||||||
|
println(typeof(b)) # Float32
|
||||||
|
|
||||||
|
|
||||||
|
arr = [1,2,3]
|
||||||
|
println(arr .^ 2) # [1,4,9]
|
||||||
|
println(sin.(arr))
|
||||||
|
|
||||||
|
c = 2//3 + 1
|
||||||
|
println(c) # 5//3
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/julia
|
#!/snap/bin/julia
|
||||||
|
|
||||||
x = 10
|
x = 10
|
||||||
y = 1
|
y = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user