coefficient XX seems to agree too.
Newton-Raphson code matches Sai's