[math-fun] inverter, a new version with a lot of new tests