Skip to content

Instantly share code, notes, and snippets.

@julialang-jenkins
Created January 9, 2015 00:39
Show Gist options
  • Save julialang-jenkins/0b15d00fba69c1e6b08f to your computer and use it in GitHub Desktop.
Save julialang-jenkins/0b15d00fba69c1e6b08f to your computer and use it in GitHub Desktop.
fib
0
1
1
2
3
5
8
13
21
34
55
function fib(n::Integer)
if n == 0
return 0
elseif n == 1
return 1
else
return fib(n - 1) + fib(n - 2)
end
end
for n in 0:10
print(fib(n), "
")
end
Julia Version 0.3.3
Commit b24213b (2014-11-23 20:19 UTC)
Platform Info:
System: Linux (x86_64-linux-gnu)
CPU: Intel Xeon E312xx (Sandy Bridge)
WORD_SIZE: 64
Ubuntu 12.04.5 LTS
uname: Linux 3.2.0-70-generic #105-Ubuntu SMP Wed Sep 24 19:49:16 UTC 2014 x86_64 x86_64
Memory: 0.9721298217773438 GB (69.2578125 MB free)
Uptime: 4.012865e6 sec
Load Avg: 0.34814453125 0.23046875 0.125
Intel Xeon E312xx (Sandy Bridge):
speed user nice sys idle irq
#1 2499 MHz 13148340 s 4709 s 2909450 s 382764712 s 682 s
#2 2499 MHz 11081777 s 221 s 2875863 s 386304239 s 0 s
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
Environment:
JENKINS_HOME = /var/lib/jenkins
LD_LIBRARY_PATH = /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk-amd64/jre/../lib/amd64
HOME = /var/lib/jenkins
TERM = screen
HUDSON_HOME = /var/lib/jenkins
PATH = /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Package Directory: /var/lib/jenkins/.julia/v0.3
No packages installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment