Fix complex exponential for real overflow (#5521)