I think I found a bug, when 2 gunpowder is put into the target spot, and iron and coal are put into the input slots, it will return nothing, I'm currently testing to find if there is a pattern to it
EDIT: Also happens with 2 uranium targeted and 2 gold
EDIT2: 2 iron targeted and 2 uranium returns 1 iron as expected, as does 2 iron targeted and 1 uranium, but 2 iron targeted and 2 gold returns nothing
EDIT3: 2 iron targeted and 2 gunpowder returns nothing, 2 coal targeted and 2 uranium returns nothing, 3 coal targeted and 2 coal in input returns nothing, however 2 coal targeted and 2 coal in input returns a coal as expected
EDIT4: Additional testing seems to give a base patter of ((if number x itemProtons < item2Protons + item3Protons) and (item2Protons + item3Protons > 1 x itemProtons) and (number x itemNeutrons < item2Neutrons + item3Neutrons) and (item2Neutrons + item3Neutrons > 1 x itemNeutrons) then return false else return true)
where number is the amount of the item targeted that is placed in the targeted spot, itemProtons and itemNeutrons are 1 x the item targeted's protons and neutrons, and item2Protons and item3Protons and item2Neutrons and item3Neutrons are the input slot's item's protons and neutrons
This seems to be the general formula