If you're reading a math textbook, or a CS textbook, or any but the most fluffy programming book, then you're giving it so much of your time and attention that any cost up to $100 is meaningless next to how much one book is better or worse than another.
I see people living in the First World and saying things like "I wanted to learn calculus from this very well-recommended book, but it costs $50, so I got this reprint of an older textbook for $15". You're basing your choice of the guide to challenging material that you predict will be tough to understand on the cost of a dinner and a movie. Textbooks are not commodities! Some of them are really good and others are really bad and it depends on the student, too. It isn't always that the more expensive one is better, to be sure. Often it's just the opposite. I'm saying you should just forget about price altogether and choose based on sampling/reviews/recommendations.
Things may be difficult for someone truly in dire poverty, or someone living in a poor country where $50 is more like the month's earnings. Those people should just go to gen.lib.rus.ec and download everything.