Cody

# Problem 45234. Calculating large fibonacci numbers

Solution 2133746

Submitted on 19 Feb 2020 by Jiahang Li
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x = 100; y_correct = 21; assert(isequal(your_fcn_name(x),y_correct))

a = 1.0e+20 * 2.1892 3.5422 3.5422 5.7315 ans = 21

2   Pass
x = 140; y_correct = 29; assert(isequal(your_fcn_name(x),y_correct))

a = 1.0e+29 * 0.5010 0.8106 0.8106 1.3115 ans = 29

3   Pass
x = 200; y_correct = 41; assert(isequal(your_fcn_name(x),y_correct))

a = 1.0e+41 * 1.7340 2.8057 2.8057 4.5397 ans = 41

4   Pass
x = 300; y_correct = 62; assert(isequal(your_fcn_name(x),y_correct))

a = 1.0e+62 * 1.3735 2.2223 2.2223 3.5958 ans = 62

5   Pass
x = 400; y_correct = 83; assert(isequal(your_fcn_name(x),y_correct))

a = 1.0e+83 * 1.0879 1.7602 1.7602 2.8481 ans = 83

6   Pass
x = 500; y_correct = 104; assert(isequal(your_fcn_name(x),y_correct))

a = 1.0e+104 * 0.8617 1.3942 1.3942 2.2559 ans = 104

7   Pass
x = 1000; y_correct = 209; assert(isequal(your_fcn_name(x),y_correct))

a = 1.0e+208 * 2.6864 4.3467 4.3467 7.0330 ans = 209

8   Pass
x = 1100; y_correct = 230; assert(isequal(your_fcn_name(x),y_correct))

a = 1.0e+229 * 2.1278 3.4429 3.4429 5.5707 ans = 230

9   Pass
x = 1100; y_correct = 230; tic assert(isequal(your_fcn_name(x),y_correct)) time = toc assert(time < .01)

a = 1.0e+229 * 2.1278 3.4429 3.4429 5.5707 ans = 230 time = 3.5400e-04

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!