MATLAB: When with rounding and precision

round

I am calculating the following: p15 = 0.8683*1.15
When I round to 5 decimal places round(p15,5) the answer is 0.99854 since Matlab sees full precision as 0.9985449999999999.
You can confirm this by typing sprintf('%1.30f',.8683*1.15)
ans = 0.998544999999999900000000000000
Unfortunately, I need to match the output of a standard calculator (don't ask why) and need to have the output as 0.99855. How is this possible via Matlab?

Best Answer

round(p15 * 1e6)/1e6
By the way, you cannot see the full precision on MS Windows by using sprintf(), but you can on OS-X
0.99854499999999990489385481851059012115001678466796875