Text this: Madelung constants for ionic crystals using the Ewald sum