Conversation
Notices
-
@shibao @sun
Primality tests aren't exactly my forte either, nor is math in general, but it's an exercise for an Elixir course I'm taking so gotta slog through it anyway. If I didn't have prior art to compare with I'd be lost.
I think I'm done with this coef() method for the now though. It's taken way longer than it should have and I'm feeling a bit averse to staring at it much more.
If you come up with something more elegant you want to share, I'll certainly appreciate it though. This is the kind of logic that should be routine in any language, and I'll need to wrap my head around the Elixir way regardless. If I have to approach loops like this every time I'm gonna end up losing my shit too often.