Created
February 26, 2019 02:17
-
-
Save haigopi/44888204e2549995aec93f55d3eafa30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= | |
ReadData: | |
- Julia version: | |
- Author: GOPI K KANCHARLA | |
- Date: 2019-02-23 | |
=# | |
println("typeof(1): ", typeof(1)) | |
println("Sys.WORD_SIZE: ",Sys.WORD_SIZE) | |
println("Int: ", Int) | |
println("typemin(Int64) -> typemax(Int64): ",typemin(Int64), " -> ", typemax(Int64)) | |
for T in [Int64, UInt8, UInt16, UInt32, UInt64, UInt128] | |
println("$(lpad(T, 25)): [$(typemin(T)), $(typemax(T))]") | |
end | |
x = typemax(Int64) | |
println("typemax(Int64): ", x) | |
println("typemax(Int64) + 1: ", x + 1) | |
println("x+1 == typemin(Int64) : ",x + 1 == typemin(Int64)) | |
println("1/Inf == ",1 / Inf, " : 1/0 == ",1 / 0) | |
#Distance from 1.0 | |
println(eps(Float64)) | |
println(eps(Float32)) | |
println(nextfloat(1.49)) | |
println(prevfloat(1.50)) | |
x = 1.1 | |
y = 0.1 | |
println(x + y) | |
println(round(x + y)) | |
x =3 | |
println(2x^2, 2*x^2, 3x+1) | |
println(2(x-1)^2 - 3(x-1) + 1) | |
x =3.123 | |
println(zero(x), one(x)) | |
# Vectrozied . operator | |
println([1,2,4].^3) | |
x = 10 | |
println('x', " : ",Int('x'), " : ", Char('x')) | |
str = "Hello World" | |
str1 = """ Hello World | |
"GOPI" Krishna | |
New line """ | |
println(str, str1) | |
greet="Hello" | |
whom = "World" | |
println("$greet, $whom") | |
println("1+2 = $(1+2)") | |
#searchindex("XXXXX", "X") | |
println(repeat("GOP, ", 10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment