No, writing a math textbook involves (perhaps) thousands of things that might be wrong, none of which will have any impact on one another.
Publishing a perfect book is difficult on par with writing code. Hell, Knuth is incredibly popular and crowdsources his error-checking, and TAOCP is still in its third edition.
Very similar in some ways. There are a vast number of interconnected details that have the potential to be wrong and far fewer automated ways to catch any errors. Your "users" inevitably catch a lot of them at "runtime".