I have quite a few resistors but occasionally I run into a situation where I need some specific value I don't have. in those cases I just select a a starting point (more or less at random) and then add resistors in series or parallel to get the desired value (I'm just calculating of course) but if I need some really specific value this stuff gets quite messy pretty quickly and I end up with either lots of resistors or having spent way too much time essentially just guessing (with a little bit of common sense) which combinations work the best.
So I though to myself: Why not automate the process? This, as far as I can tell, is really problematic though: The number of options here is scaling exponentially and a quick and dirty program I wrote (even utilizing CUDA) takes ages to brute force all options. Brute forcing is the only way I can think of.
So here's my question: Is there any "premade" solution for this? I'd imagine this can't be that unique of a use case.
I hope this is the right place to ask this question. I'll also post a question regarding the computational aspect of the problem on Stackoverflow assuming no one has any ideas in terms of a premade solution.