June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -1,17 +1,14 @@
|
|||
i = 0
|
||||
|
||||
macro sum(i, lo_byname, hi_byname, term)
|
||||
quote
|
||||
lo = $lo_byname
|
||||
hi = $hi_byname
|
||||
temp = 0.0
|
||||
|
||||
for i=lo:hi
|
||||
temp += $term
|
||||
macro sum(i, loname, hiname, term)
|
||||
return quote
|
||||
lo = $loname
|
||||
hi = $hiname
|
||||
tmp = 0.0
|
||||
for i in lo:hi
|
||||
tmp += $term
|
||||
end
|
||||
|
||||
temp
|
||||
return tmp
|
||||
end
|
||||
end
|
||||
|
||||
println(@sum(i, 1, 100, 1.0 / i))
|
||||
i = 0
|
||||
@sum(i, 1, 100, 1.0 / i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue