excelepsilon

Get Machine epsilon in Microsoft Excel


This seems like a question better directed at those with some programming experience rather than just general Excel users, hence my asking on here as opposed to Superuser.

Is there any way, preferably through a function, to return epsilon (i.e. the smallest non-zero number representable in Excel's calculations)? If it's not retrievable through a function, is there a quick way to calculate it through a compact function?

To be clear, I'm not looking for a VBA-based solution, I'd like an Excel formula/ spreadsheet based solution that does not require running macros.

My searches online have mostly turned up discussions on how to display the symbol Epsilon.

Thanks.


Solution

  • Excel always operates on IEEE doubles.

    A non-VBA expression that will get you the smallest non-denormalized floating point number greater than 0 is

    =2^-1022
    

    Machine epsilon, on the other hand, is the smallest number that can be added to 1 and result in a number that is greater than 1. For double precision it is given by

    =2^-52