Cody

# Problem 401. cos for boss?

Solution 3481209

Submitted on 30 Oct 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
alfa=pi/2; bita=-1/10^20; cos_correct = 1/10^20; assert(abs(cos_for_boss(alfa,bita)-cos_correct)<eps/10)

x = 1.5708 coffee = 6.1232e-17

Assertion failed.

2   Fail
bita=pi/2; alfa=-1/11^20; cos_correct = 1/11^20; assert(abs(cos_for_boss(alfa,bita)-cos_correct)<eps/10)

x = 1.5708 coffee = 6.1232e-17

Assertion failed.

3   Pass
bita=pi/6; alfa=pi/6; cos_correct = 1/2; assert(abs(cos_for_boss(alfa,bita)-cos_correct)<eps*10)

x = 1.0472 coffee = 0.5000

4   Pass
bita=pi/8; alfa=pi/8; cos_correct = 1/sqrt(2); assert(abs(cos_for_boss(alfa,bita)-cos_correct)<eps*10)

x = 0.7854 coffee = 0.7071

5   Pass
bita=pi/12; alfa=pi/4; cos_correct = 1/2; assert(abs(cos_for_boss(alfa,bita)-cos_correct)<eps*10)

x = 1.0472 coffee = 0.5000

### Community Treasure Hunt

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

Start Hunting!