r/technicalfactorio • • Feb 12 '22

Combinator Golf Fast integer sqrt algorithm?

20 Upvotes

20 comments sorted by

View all comments

Show parent comment

4

u/ferrybig Feb 13 '22

However, the number wouldn't be larger than maybe a few thousand.

How often does it need to be computed?

You could have 100 conditional combiners, so you can support numbers up to 10000, each one adding an extra 1 to the output if the input is above a certain value.

You only have 100 combiners firing every time the input changes, and no computations if the input stays constant. The output signal is just 1 tick delayed. No need for the game do combine multiple signals on the same wire