Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Please, add like those tests, it's really gonna start my head/
Test(Real_Addition, should_pass_all_the_tests_provided) {
tester( 100, 100, 200);
tester( 10000, 10000, 20000);
}
Test(Silly_Addition, should_pass_all_the_tests_provided) {
tester( 1240, 1900, 21140);
tester( 30003, 99000, 129003);
}
Thank you all for fast answers!!!
This comment is hidden because it contains spoiler information about the solution
Oops. I'm not sure how I missed it :p
std::setprecision()
to the custom stringizer0.5
to the value to be rounded)I added
std::setprecision()
to the stringizer. the issue about rounding + strict equality instead of approximate equality still remains, but it's already been raised belowdone
@trashy_incel Can you remove the image and use KaTeX for math formulas in the meantime ? ^^
done
fixed
duplicate of this issue
root of the issue: unlike other languages, C compares the expected and actual values with approximate equality post-rounding, not strict equality post-rounding. and the epsilon used to compare and print the numbers is
1e-5
, while the description asks for rounding to1e-4
. also, there is a bug in the random tests that make them generate the same coordinates for every test.here is a fork that fixes all that, also improves the description and makes it language-agnostic + Markdown instead of HTML
The user appears to have solved the kata, there don't appear to be any issues with the tests in Java.
I'm assuming he's talking about C, seeing as that's the language he solved it in.
Loading more items...