Calculated magnetic exchange interactions in high-temperature superconductors