$r=(-3a^{4}+16a^{2}b-64ac+256d)/256.$