Cody

Solution 595004

Submitted on 11 Mar 2015 by goc3
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
%% assert(numCmp('12.3456',12.3456))

p = 3 prec = 4 n1n = 123456 n2n = 123456 ans = 1

2   Pass
%% assert(numCmp('12.3456',12.3456789))

p = 3 prec = 4 n1n = 123456 n2n = 123456.789 ans = 1

3   Pass
%% assert(~numCmp('12.3456',12.345))

p = 3 prec = 4 n1n = 123456 n2n = 123450 ans = 0

4   Pass
%% assert(~numCmp('12.34567890',12.3456))

p = 3 prec = 8 n1n = 1234567890 n2n = 1234560000 ans = 0

5   Pass
%% assert(numCmp('12e6',12e6))

p = [] prec = 4 n1n = 120000000000 n2n = 120000000000 ans = 1

6   Pass
%% assert(~numCmp('54',100))

p = [] prec = 2 n1n = 5400 n2n = 10000 ans = 0