Cody

Problem 2920. Golden ratio

Solution 1070746

Submitted on 3 Dec 2016 by HEE SANG SHIN
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
phi_correct = (sqrt(5)+1)/2; error_bound = 10^-12; assert(abs(goldenRatio() - phi_correct) <= error_bound )

phi = 1.6180

Suggested Problems

More from this Author1

Community Treasure Hunt

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

Start Hunting!