How to get the Exact answer from this

I am getting the answer like this
ans =
3027186236751523/28269553036454149273332760011886696253239742350009903329945699220681916416
How to get the precise answer from this?Please help me out. I didnt find any code to reduce this large number.

2 Comments

Are you using syms ? If so read about vpa.
Thank you...i got the answer

Sign in to comment.

 Accepted Answer

Walter Roberson
Walter Roberson on 12 Oct 2020
Edited: Walter Roberson on 12 Oct 2020
That is the precise number, to the accuracy of the input values (which were probably not very accurate at all.)
Remember that rational numbers are infinitely precise. You cannot do better than infinitely precise.
You might have expected to see a floating-point number, but floating point is inherently inaccurate for most calculations.
You can see an approximate value of solution by using double() or vpa(). The result is guaranteed to not be precise.
By the way, that denominator is 2^244

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products

Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!