MATLAB: Are symbolic expressions being rounded

doubleMATLABsymbolic

I'm deriving some expressions symbolically and then substituting values and computing the results and I only recently noticed that the results are being rounded.
>> format long
>> syms x; double(subs(10/x,x,3))
ans =
3.333300000000000
or simply,
>> x = sym(3.33333333)
x =
3.3333
>> double(x)
ans =
3.333300000000000
I can't even reproduce results from the documentation it seems:
>> syms x
>> p = sym(pi);
>> piVpa = vpa(p)
piVpa =
3.1416
According to the documentation, this is supposed to produce:
piVpa =
3.1415926535897932384626433832795

Best Answer

Mathworks technical support have diagnosed the problem. Don't know what caused it originally but the 'FloatingPointOutput' setting in the symbolic preferences was set to 1.
Here is the solution to fix it:
>> sympref
ans =
struct with fields:
FourierParameters: [1×2 sym]
HeavisideAtOrigin: [1×1 sym]
AbbreviateOutput: 1
TypesetOutput: 1
FloatingPointOutput: 1
PolynomialDisplayStyle: 'default'
MatrixWithSquareBrackets: 0
>> sympref('FloatingPointOutput','default');
>> double(sym('pi'))
ans =
3.141592653589793
>> p = sym(pi);
>> piVpa = vpa(p)
piVpa =
3.1415926535897932384626433832795