# Should I ask this question on stackoverflow or math.stackexchange?

I am working on Project Euler Problem 420. My solution has alot of code, and I've asked questions about the math involved on math.stackexchange. However, My code is still not producing correct results, and I'm not sure if it is a code bug, or a math problem. Should I ask for help on math.stackexchange, or stackoverflow, or both?

Update: The question was asked at math.SE (Project Euler $420$) and has since been voted closed (although there is a vote for it to be re-opened).

If the question would involve a lot of code then I imagine stackoverflow would be the more fitting place. If you can ask the question without all the details of the coding, in a purely mathematical way, then math.stackexchange might well be the place for it. You could always post it both places, making sure to link between the questions to avoid people duplicating effort.

Whatever you do, I would advise that you make it clear that you're doing it for Project Euler and so explicitly ask for hints only and no direct answers. A lot of people aren't particularly happy answering questions about Project Euler type things, particularly if it's not asked in an upfront way or if a full solution is being asked for rather than just a hint. That doesn't mean you shouldn't ask for help of course, just be careful how you do it!

If your problem is not purely mathematical but you have problems with the result, then StackOverflow is the right answer. If you go there, just make sure to create the smallest possible working example of your problem.

(Is your issue related with floating point math, perhaps? )