zee
zee

Reputation: 11

How to compare sym variable from vpa in matlab?

Assume that I have two variables with 300 digits of precision:

a = vpa(sqrt(2),300);
b = vpa(sqrt(3),300);

I want to know whether (b-a) > (1e-15) is true or false. What should I do?

Upvotes: 1

Views: 455

Answers (1)

Dennis Jaheruddin
Dennis Jaheruddin

Reputation: 21563

I think you are simply looking for this:

double(b-a)>(1e-15)

Upvotes: 0

Related Questions