Cody

Problem 2920. Golden ratio

Solution 2420339

Submitted on 30 May 2020
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   Fail
phi_correct = (sqrt(5)+1)/2; error_bound = 10^-12; assert(abs(goldenRatio() - phi_correct) <= error_bound )

ans = 1.6180

Output argument "phi" (and maybe others) not assigned during call to "goldenRatio". Error in Test1 (line 3) assert(abs(goldenRatio() - phi_correct) <= error_bound )