EPIJudge icon indicating copy to clipboard operation
EPIJudge copied to clipboard

Bug in test case for real square root function

Open davidsimowitz opened this issue 5 years ago • 5 comments

For the Compute the real square root problem, the test data has an incorrect entry in one of the rows. The second floating point value in the row of the tsv file is the expected square root of the first floating point value. Since the first value is 0.0 the square root for this test case cannot be 1.571727783679971e-162.

My guess is the expected square root values in the second column of test data were used to calculate the first column inputs. This caused the product to underflow to 0.0 in this one case.

davidsimowitz avatar Nov 14 '19 23:11 davidsimowitz

Hi @davidsimowitz ,

Thanks for finding this bug, and it is fixed and will be merged in the next release.

tsunghsienlee avatar Nov 18 '19 02:11 tsunghsienlee

Hi @davidsimowitz ,

Please, apply the change against the dev branch (I've already changed the PR for you).

After that, I'll merge it

metopa avatar Dec 12 '19 09:12 metopa

Hi Tsung,

Sorry for hijacking this thread. I have problem understanding the problem statement for a variant :

"The US President is elected by the members of the Electoral College. The number of electors per state and Washington, D.C., are given in Table 17.1. All electors from each state as well as Washington, D.C., cast their vote for the same candidate. Write a program to determine if a tie is possible in a presidential election with two candidates."

If all electors from each state as well as Washington, D.C. cast their vote for same candidate, how can there be ever a tie? There will only be one winner of election right?

On Sun, Nov 17, 2019 at 6:04 PM Tsung-Hsien Lee [email protected] wrote:

Hi @davidsimowitz https://github.com/davidsimowitz ,

Thanks for finding this bug, and it is fixed and will be merged in the next release.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adnanaziz/EPIJudge/pull/115?email_source=notifications&email_token=ABUYZMYKHWBNHLZSQG6TZQDQUHZZ5A5CNFSM4JNTL6DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEI6BNA#issuecomment-554819764, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUYZMZZXEGUJENAYVW23ADQUHZZ5ANCNFSM4JNTL6DA .

zorro786 avatar Dec 14 '19 09:12 zorro786

@zorro786 Please, open a separate issue for this question. Do not reuse other issues, because it becomes hard to track conversations.

metopa avatar Dec 14 '19 15:12 metopa

@davidsimowitz Hi there, sorry for the long wait. I'll check this out right after I do my state exams at the end of June. I'll keep you updated :)

metopa avatar Jun 07 '20 08:06 metopa