Ad
  • Custom User Avatar

    I wanted it to be consisted between all translations. This kata uses 64-bit type as n in all languages.
    Besides, size_t type is just alias of unsigned long long on x64 machines and, hence we're using RAX in NASM, I can make an assumption that target machine is indeed x64.
    Usually size_t is used for array indexes and that is exactly the main reason why it is used here.

  • Custom User Avatar

    Thank you for the feedback.
    I've changed the signature in sample tests and added static to solution function.

    Also thanks for the help with how I should change description for NASM. None of the available tutorials said anything about how to change description for the new language. Good to know that it's even more complicated with NASM.

    I really don't think that two calls to rand are undefined behaviour since only thing that is not guaranteed is the order of the execution of these calls, but it doesn't really matter for the logic of my code.

  • Custom User Avatar

    Description should be changed to clarify that numbers can be negative.

    number          ::= { digit } [ '.' digit { digit } ]
    
  • Custom User Avatar

    NASM translation added, please review ;)

  • Custom User Avatar

    I think you should update test cases (at least those for C#) for base 10, because for n = 5 correct answer is 142857 not 102040816326530612244897959183673469387755, because 5 is special case and period of 5 / 49 isn't the smallest parasite number possible. For n = 5 correct answer is period of 1 / 7.