Friday, October 9, 2015

Different but close

In a GAMS model we calculated some numbers. I expected them to be the same. I saw:

image

OK, small difference. Let’s increase the number of decimals:

image

No cigar. All right. The difference is beyond the 8th decimal place. Lets have a look in the GDX viewer, which can show things in MAX precision:

image

Still no luck in viewing the difference between v(c) and v(a),v(b). GDXDUMP?

image

Export to Excel?

image

Using PUT?

image

The PUT statement is limited to 15 decimal places.

We can show some indirect evidence that v(c) actually a little bit larger than v(a) or v(b):

image

The last bit is different.

Using a C# program writing with d.ToString(“G17’') we finally see the real cause:

image

Still have not found a easy way (without doing some programming) of showing the numbers v(i) in full precision. Looks like an obvious thing to ask for.

No comments:

Post a Comment