Semirings with an almost division algorithm