Increase the vpa digits much beyond what you need and do the calculations. floor() the result, abs() it, add 1, and take ceil() of the log10 of that. The result of ceil() will be the number of digits that were used before the decimal point. With that number in hand, you can vpa() the result of the calculation, this time specifying 10 + the number of digits before the decimal point as your precision. The result will be a symbolic number.
OR....
Do the calculation with more digits than you need. char() the result of the vpa. locate the '.' in the string and discard everything after the 10th character after the decimal place. The result will be a character string.
If you need more than 16 digits of precision (taking into account round-off error) then you will need to use a different solution method entirely, such as using the Symbolic Toolkit.
Best Answer