Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Kacper Augustynowicz 22 X 2017
- function density(a::Float64, b::Float64)
- d::Float64 = (nextfloat(a) - a)
- println("min space between numbers in [$a,$b] is $d\n\nFirst 4 numbers :\n")
- x::Float64 = a
- for i in 1:4
- println(x, "\t\t", bits(x))
- x += d
- end
- println("\nLast 4 numbers :\n")
- y::Float64 = b - (3*d)
- for i in (4,3,2,1)
- println(y, "\t\t", bits(y))
- y += d
- end
- end
- density(1.0, 2.0)
- println()
- density(0.5, 1.0)
- println()
- density(2.0, 4.0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement