I have a real number $x$ (for concreteness, say $10^4<x<10^6$) and would like to find $e^x-\lfloor e^x\rfloor$ to reasonable precision (10-20 decimal places). What is the most efficient method?
Computing $e^x$ directly in an arbitrary-precision library works but this requires a lot of storage space (and hence time) to store digits that I just throw away. Is there a better approach?
Edit: If it would help I have $x=y+n$ where $y$ is fixed throughout all my calculations (an easily-computed real constant) and $n\in\mathbb{Z}.$ I'd like to do the calculation for a million values of $n$, give or take.
