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.
Thank you for reply + couple of keywords) Im trying to find purpose for "kumite" thing thus bothering people around.. that the spirit, i guess
gotta have some fun with llvm intermediates x)
Of course !!
I was not running for perf...
Use of a rand instead of a mersenne twister, etc.. and even the use of std:experimental::simd etc...
Note on your note: any modern compiler will unroll the loop, and... turn i++ into ++i.. 😀
I believe they define status to avoid having multiple return statements, which is likely for best practice reasons.
If number isn't an Int - it may crash the code as it still tries to use the operator on it. It never just "skips" parts unless it has a reason.
NO WAY SAME PROBLEM HERE
I think you mixed up the "lines and needles" approach (https://en.wikipedia.org/wiki/Buffon%27s_needle) with the "square and circle" approach. There is no point in talking about needles here, just points.
Making
2e6
runs doesn't let you estimatepi
accurately. I've played with this code when this abomination was still a kumite, and without setting a fixed seed even with2 * 1e7
runs the result MAY be correct up to the SECOND decimal only (results inaccurate that much are not very frequent, but you'll still often run into them).The way this kata is made, it makes absolutely no sense.
No random tests.
It's not tested how the result is obtained.
done. thanks.
Parameter runs must be n or n inside function must be runs.
Ok, not really a problem and sounds like a good explanation;-)... I'm not sure if it's good to allow him to publish katas (or generally web) without any control and help, normally these comments happen. Perhaps better to explain him these things and the meaning of "senseless" (or what he should do for the next one) instead of hiding this word (is it so bad?). Sometimes i have similar "problems" my son is 13, so probably harder to control;-)...
My 10-year old was playing with it, sorry about that. I usually let him solve Katas (he does the level 8, 7 or 6) but not create new ones. I will try and hide the word "senseless" from him for obvious motivational reasons.
Puzzles? Really? Or only a completely senseless "kata";-)...?
This comment is hidden because it contains spoiler information about the solution
'(1, 2, 3)' should equal '(1,2,3)'