I am making a function in matlab to compute the following function:

enter image description here

for this function we have:

enter image description here

This is my implementation in matlab of the function:

function [b]= exponential(e)
%b = ? 
b= (exp (e) -1)/e;

When I test the function with very small values, indeed the limit of the function is to 1, but when the number is very small (eg 1*e-20) the limit goes to zero? what is the explanation to this phenomenon?. Am I doing something wrong?.

x= 10e-1 , f (x)= 1.0517

x= 10e-5 , f (x)=  1.0000

x= 10e-10 , f (x)=  1.0000

x= 10e-20 , f (x)=  0
Edit
Report