A unified algorithm for elementary functions | Synapse