Matlab's standard floating point type is a double. It is possible that Matlab has the algorithms arranged in such a way that for your example the result is exactly 1, or you could simply be seeing it ...
Why floating point is important for developing machine-learning models. What floating-point formats are used with machine learning? Over the last two decades, compute-intensive artificial-intelligence ...