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.
I've had a think and, having thunk, I've removed the closed form, but also amended the description to make it clear that such a thing exists.
Appreciate the feedback!
It's a very valid question and represents that I'm in two minds over this. In line with exactly your point, the original description didn't include a closed form. However, the initial comments when I put this up as a potential Kata suggested that just having the recursive definition looked confusing, so I subsequently altered it to include one of the direct methods of computation knowing that it took away from the original spirit.
I guess I just need to decide whether to revert to my original proposal, but, as this is my first attempt at a Kata, I'm more than happy to hear both what people think...
ain't no way bro said ** nods head **
** nods head ** I know, and I completely understand. I tried both styles side by side and I genuinely prefer that L/KaTeX style for mathematical expressions...
I don;t mean to enforce any specific form of the formula, I only wanted to point out the possibility of a nice formating of exponents and subscripts.
Very much obliged on the suggestion of KaTeX: I did wonder if methematical notation was possible, but don't know LaTeX. I've updated the look and feel of the formulae side of things to use KaTeX and also included a non-recursive definition of the swinging factorial function which looks a bit less ... technical ...
That's the algorithmic form of the equation; it makes no sense to directly translate it for a math representation.
For a math representation it should be replaced with the usual
You could make it simpler by replacing
\text{ mod }
with an operator like%
.Consider KaTeX for the formula part https://katex.org/docs/supported .
I will try to prepare an example.
I've added a small note to the description to try and clarify this...
There are no floats involved in the calculation, only the formula representation make it seem like so; if you're worried you can always use fractions instead, though all terms will end up integral (as it should be).
It's more the precision I was worried about. There are floating point divisions in there.
The tests aren't really performance heavy, so going by the definition or the explicit formula will both work.
This comment is hidden because it contains spoiler information about the solution
Fair question; part of the Kata was to look up a straightforward method to calculate the values (hence the references in the hints). Perhaps I should make this a bit more explicit in the description..?
Loading more items...