If you multiply five such fields, then how many fractional positions must be maintained in an intermediate result? (5 * 6 = 30)

If you work with fields that only hold 15 digits, how can you handle all of the necessary fractional positions? On which side of the decimal point should any accuracy be sacrificed?

The problem isn’t with the multiplication, it’s how you have defined your fields and with insufficient understanding of what happens with fixed-point multiplication. It’s working as defined in the language reference manual.

Easiest resolution is the one you’ve chosen to use, but you might want to test with maximum and minimum values to ensure that everything will always work as expected.

You didn’t say anything about what version of the compiler you’re using, so it’s not clear how many fractional positions are available for you to work with.

Tom

]]>