Commit a6e3b2bf authored by mohamad's avatar mohamad

Adding Math Fibonacci bug fixing

parent 45183747
......@@ -9,6 +9,6 @@ public class MathFibonacciCalculator implements IFibonacciCalculator {
double item2 = (1 - Math.sqrt(5))/2;
item1 = Math.pow(item1,number);
item2 = Math.pow(item2,number);
return Math.round((item1 + item2)/Math.sqrt(5));
return Math.round((item1 - item2)/Math.sqrt(5));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment