Cody

Solution 1969449

Submitted on 10 Oct 2019
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
a = 1; b = 2; dt = 'uint64'; s_correct = 3; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test1 (line 5) s = summation(a, b, dt);

2   Fail
a = 1; b = 2; dt = 'int8'; s_correct = 3; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test2 (line 5) s = summation(a, b, dt);

3   Fail
a = 1; b = 2; dt = 'single'; s_correct = 12582913.5; s = summation(a, b, dt); assert( abs(s - s_correct) < 2 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test3 (line 5) s = summation(a, b, dt);

4   Fail
a = 1; b = 2; dt = 'double'; s_correct = 6755399441055746; s = summation(a, b, dt); assert( abs(s - s_correct) < 2 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test4 (line 5) s = summation(a, b, dt);

5   Fail
a = 2; b = 3; dt = 'int32'; s_correct = 5; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test5 (line 5) s = summation(a, b, dt);

6   Fail
a = 2; b = 3; dt = 'uint16'; s_correct = 5; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test6 (line 5) s = summation(a, b, dt);

7   Fail
a = 2; b = 3; dt = 'single'; s_correct = 10485762.5; s = summation(a, b, dt); assert( abs(s - s_correct) < 2 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test7 (line 5) s = summation(a, b, dt);

8   Fail
a = 2; b = 3; dt = 'double'; s_correct = 5629499534213122; s = summation(a, b, dt); assert( abs(s - s_correct) < 2 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test8 (line 5) s = summation(a, b, dt);

9   Fail
a = 4; b = 5; dt = 'int64'; s_correct = 9; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test9 (line 5) s = summation(a, b, dt);

10   Fail
a = 4; b = 5; dt = 'uint8'; s_correct = 9; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test10 (line 5) s = summation(a, b, dt);

11   Fail
a = 4; b = 5; dt = 'single'; s_correct = 9437188.5; s = summation(a, b, dt); assert( abs(s - s_correct) < 2 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test11 (line 5) s = summation(a, b, dt);

12   Fail
a = 4; b = 5; dt = 'double'; s_correct = 5066549580791812; s = summation(a, b, dt); assert( abs(s - s_correct) < 2 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test12 (line 5) s = summation(a, b, dt);

13   Fail
a = 8; b = 9; dt = 'uint32'; s_correct = 17; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test13 (line 5) s = summation(a, b, dt);

14   Fail
a = 8; b = 9; dt = 'int16'; s_correct = 17; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test14 (line 5) s = summation(a, b, dt);

15   Fail
a = 8; b = 9; dt = 'single'; s_correct = 8912904.5; s = summation(a, b, dt); assert( abs(s - s_correct) < 2 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test15 (line 5) s = summation(a, b, dt);

16   Fail
a = 8; b = 9; dt = 'double'; s_correct = 4785074604081160; s = summation(a, b, dt); assert( abs(s - s_correct) < 2 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test16 (line 5) s = summation(a, b, dt);

17   Fail
a = 20; b = 22; dt = 'int32'; s_correct = 63; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test17 (line 5) s = summation(a, b, dt);

18   Fail
a = 20; b = 22; dt = 'double'; s_correct = 11821949021847573; s = summation(a, b, dt); assert( abs(s - s_correct) < 4 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test18 (line 5) s = summation(a, b, dt);

19   Fail
a = 20; b = 22; dt = 'single'; s_correct = 22020117; s = summation(a, b, dt); assert( abs(s - s_correct) < 4 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test19 (line 5) s = summation(a, b, dt);

20   Fail
a = 20; b = 30; dt = 'uint16'; s_correct = 275; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test20 (line 5) s = summation(a, b, dt);

21   Fail
a = 20; b = 30; dt = 'double'; s_correct = 70368744177664025; s = summation(a, b, dt); assert( abs(s - s_correct) < 32 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test21 (line 5) s = summation(a, b, dt);

22   Fail
a = 20; b = 30; dt = 'single'; s_correct = 131072025; s = summation(a, b, dt); assert( abs(s - s_correct) < 32 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test22 (line 5) s = summation(a, b, dt);

23   Fail
a = 1; b = 17; dt = 'uint8'; s_correct = 153; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test23 (line 5) s = summation(a, b, dt);

24   Fail
a = 1; b = 17; dt = 'double'; s_correct = 105975328731561993; s = summation(a, b, dt); assert( abs(s - s_correct) < 64 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test24 (line 5) s = summation(a, b, dt);

25   Fail
a = 1; b = 17; dt = 'single'; s_correct = 197394441; s = summation(a, b, dt); assert( abs(s - s_correct) < 64 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test25 (line 5) s = summation(a, b, dt);

26   Fail
a = -130; b = -126; dt = 'int32'; s_correct = -640; s = summation(a, b, dt); assert( isequal(s, s_correct) )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test26 (line 5) s = summation(a, b, dt);

27   Fail
a = -130; b = -126; dt = 'double'; s_correct = -26951229020045440; s = summation(a, b, dt); assert( abs(s - s_correct) < 16 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test27 (line 5) s = summation(a, b, dt);

28   Fail
a = -130; b = -126; dt = 'single'; s_correct = -50200704; s = summation(a, b, dt); assert( abs(s - s_correct) < 16 )

Output argument "s" (and maybe others) not assigned during call to "summation". Error in Test28 (line 5) s = summation(a, b, dt);