Discussion:
HW 2 - MIPS Test Cases
(too old to reply)
Beau Osborne
2005-09-13 06:07:14 UTC
Permalink
Test Case results:
choose(10, 2) = 45
choose(3, 2) = 3
choose(17,17) = 1
choose(4, 1) = 4
choose(1, 0) = 1
--------------------
choose(100,50) = 0 (error code --> [Breakpoint] Occurred and Ignored)
Any ideas on what might be causing this error?

Also, if anyone has any other results to the program that they can post that
would be great.
David Grohmann
2005-09-13 05:31:43 UTC
Permalink
if you type into google "n choose k" it will give you answers to check
against

______________

David Grohmann
Post by Beau Osborne
choose(10, 2) = 45
choose(3, 2) = 3
choose(17,17) = 1
choose(4, 1) = 4
choose(1, 0) = 1
--------------------
choose(100,50) = 0 (error code --> [Breakpoint] Occurred and Ignored)
Any ideas on what might be causing this error?
Also, if anyone has any other results to the program that they can post that
would be great.
David Grohmann
2005-09-13 07:28:07 UTC
Permalink
well 100 choose 50 is ~ 1 X 10 ^29 a number much larger than can be
stored by even the hi+lo 64 bit answer for multiply unless perhaps we
used FP math instead?

______________

David Grohmann
Post by Beau Osborne
choose(10, 2) = 45
choose(3, 2) = 3
choose(17,17) = 1
choose(4, 1) = 4
choose(1, 0) = 1
--------------------
choose(100,50) = 0 (error code --> [Breakpoint] Occurred and Ignored)
Any ideas on what might be causing this error?
Also, if anyone has any other results to the program that they can post that
would be great.
Loading...