Skip to content

Commit 17b13d8

Browse files
committed
invokation parens removed from fibonacci recipe
1 parent 37835c5 commit 17b13d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

chapters/math/fast-fibonacci.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ fib_bits = (n) ->
5252

5353
bits = []
5454
while n > 0
55-
[n, bit] = divmodBasic(n, 2)
56-
bits.push(bit)
55+
[n, bit] = divmodBasic n, 2
56+
bits.push bit
5757

5858
bits.reverse()
5959
return bits
@@ -67,7 +67,7 @@ fibFast = (n) ->
6767

6868
[a, b, c] = [1, 0, 1]
6969

70-
for bit in fib_bits(n)
70+
for bit in fib_bits n
7171
if bit
7272
[a, b] = [(a+c)*b, b*b + c*c]
7373
else
@@ -88,12 +88,12 @@ divmodBasic = (x, y) ->
8888
Burnikel / Ziegler _if_ possible...
8989
###
9090

91-
return [(q = Math.floor(x/y)), (r = if x < y then x else x % y)]
91+
return [(q = Math.floor x/y), (r = if x < y then x else x % y)]
9292

9393
start = (new Date).getTime();
9494
calc_value = fibFast(MAXIMUM_JS_FIB_N)
9595
diff = (new Date).getTime() - start;
96-
console.log("[#{calc_value}] took #{diff} ms.")
96+
console.log "[#{calc_value}] took #{diff} ms."
9797
{% endhighlight %}
9898

9999
## Discussion

0 commit comments

Comments
 (0)