MATLAB: How to multiply 2 variables without losing precision high precisionMATLABsimple math a= 378979003; b= 1.443e-5; The result of a*b is 5468.7 but I'm very interested in higher precision (such as 5468.6670). How to achieve those precision? Best Answer You can check that a*b and 5468.7 are not equala*b==5468.7Now try thisformat longc=a*b Related SolutionsMATLAB: How to avoid the loss of the last digit (it gives a zero instead of a one) num2str(uint64(14472334024676221),'%u')You have exceeded flintmax:flintmax Largest consecutive integer in floating point format. flintmax returns the largest consecutive integer in IEEE double precision, which is 2^53. Above this value, double precision format does not have integer precision, and not all integers can be represented exactly. MATLAB: How to use exp for plot x=linspace(0,7)a= 1;b= 3;f = exp(-a.*x).*sin(b.*x)plot(x,f) Related QuestionHow to store only 3 digits after the decimal pointModulo of realmax in matlabExtracting digits from a number
Best Answer