We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
well this won't give any timeouts but one test case is failing , i think it's because of inaccuracy we get in golden ratio while calculating it for very large term for e.g. the following code will generate 27th term as 37889062373143904 instead of 37889062373143906.
rectify it and you will get the correct code :)
Project Euler #2: Even Fibonacci numbers
You are viewing a single comment's thread. Return to all comments →
well this won't give any timeouts but one test case is failing , i think it's because of inaccuracy we get in golden ratio while calculating it for very large term for e.g. the following code will generate 27th term as 37889062373143904 instead of 37889062373143906. rectify it and you will get the correct code :)