Let us take for example the concentrated sulfuric waste from the sulfuric cell.
Adding it the acid carefully to water (safety) to dilute the acid, the gold will cement from solution.
Now, this dilute solution will hold all of the metals that are still soluble as sulfates.
Say for some reason we have a little HNO3 and HCl mixed in with this mainly sulfuric acid waste.
Adding iron will cement most all of the metals less reactive than iron, like cadmium, cobalt, nickel, tin, lead, bismuth copper...
After decanting will leaving us with an iron sulfate solution with the other metals more reactive than iron in solution, such as chromium zinc, manganese aluminum, magnesium, sodium, barium, potassium, and lithium.
Evaporating the solution down to a green salt will concentrate the iron sulfate as crystals, which when forming will push the impurities and other metal out of the crystal matrix bond, leaving most of the metals more reactive than iron in solution.
During the evaporation process, the other more volatile acids will decompose and volatilize, water being first then nitric and then HCl, sulfuric will not volatilize as it has such a high boiling point than water or the other acids.
When making the copperas, we can remove the iron sulfate from the more reactive metals in the solution like zinc, by using crystallization, evaporating the copperas to salt, after removing crystals, rinsing, and then rewetting the with dilute H2SO4, and we can then recrystallize the copperas salts to get an almost pure copperas from the solution.
Now from what was waste we now will have a product we can use to test for gold dissolved in solution, a reagent-grade product we can use to precipitate gold with.