summaryrefslogtreecommitdiffhomepage
path: root/julia.html.markdown
diff options
context:
space:
mode:
authorStefan Karpinski <stefan@karpinski.org>2013-07-02 23:27:19 -0400
committerStefan Karpinski <stefan@karpinski.org>2013-07-02 23:27:19 -0400
commit9adefc58b1adf5a58bacf06f0434a53137dd8b89 (patch)
tree6dc9ecffb6aa64bb2d73970bcc6ed56833d8455e /julia.html.markdown
parentbbfe94770feb3f9373a6c8b8fbffb97e8f06e867 (diff)
don't be lazy and actually make the first change I suggested.
Diffstat (limited to 'julia.html.markdown')
-rw-r--r--julia.html.markdown13
1 files changed, 2 insertions, 11 deletions
diff --git a/julia.html.markdown b/julia.html.markdown
index 0dd40f73..c31df752 100644
--- a/julia.html.markdown
+++ b/julia.html.markdown
@@ -48,17 +48,8 @@ div(5, 2) #=> 2
2 << 1 #=> 4 # logical/arithmetic shift left
# You can use the bits function to see the binary representation of a number.
-bits(2) #=> "0000000000000000000000000000000000000000000000000000000000000010"
-bits(2.0) #=> "0100000000000000000000000000000000000000000000000000000000000000"
-
-# this might be a better example:
-julia> bits(123)
-"0000000000000000000000000000000000000000000000000000000001111011"
-
-julia> bits(123.0)
-"0100000001011110110000000000000000000000000000000000000000000000"
-# the other one stands the risk of someone thinking that floating-point
-# numbers are just integers with reversed bit-patterns or something.
+bits(12345) #=> "0000000000000000000000000000000000000000000000000011000000111001"
+bits(12345.0) #=> "0100000011001000000111001000000000000000000000000000000000000000"
# Boolean values are primitives
true