Cody

# Problem 42339. ~(*|/)

Solution 1158530

Submitted on 10 Apr 2017
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
n = 0; y_correct = 0; tolerance = 1e-12; assert(abs(no_mult_div(n)-y_correct)<tolerance);

Undefined function 'bitsra' for input arguments of type 'double'. Error in no_mult_div (line 2) y = bitsra(n,2)+bitsra(n,2)+bitsra(n,2); Error in TestPoint1 (line 4) assert(abs(no_mult_div(n)-y_correct)<tolerance);

2   Fail
n = 0.1; y_correct = 0.0750; tolerance = 1e-12; assert(abs(no_mult_div(n)-y_correct)<tolerance);

Undefined function 'bitsra' for input arguments of type 'double'. Error in no_mult_div (line 2) y = bitsra(n,2)+bitsra(n,2)+bitsra(n,2); Error in TestPoint2 (line 4) assert(abs(no_mult_div(n)-y_correct)<tolerance);

3   Fail
n = 1; y_correct = 0.7500; tolerance = 1e-12; assert(abs(no_mult_div(n)-y_correct)<tolerance);

Undefined function 'bitsra' for input arguments of type 'double'. Error in no_mult_div (line 2) y = bitsra(n,2)+bitsra(n,2)+bitsra(n,2); Error in TestPoint3 (line 4) assert(abs(no_mult_div(n)-y_correct)<tolerance);

4   Fail
n = -1; y_correct = -0.7500; tolerance = 1e-12; assert(abs(no_mult_div(n)-y_correct)<tolerance);

Undefined function 'bitsra' for input arguments of type 'double'. Error in no_mult_div (line 2) y = bitsra(n,2)+bitsra(n,2)+bitsra(n,2); Error in TestPoint4 (line 4) assert(abs(no_mult_div(n)-y_correct)<tolerance);