I have two questions regarding precision in MATLAB
1) Is double the data type with the most large number of digits for a float complex number?
2) How can the precision of integral() be augmented? It seems to me that there is a cap at around E+15 (for a large number)
解决方案
Here's an example script comparing double to symbolic/vpa precision:
% Numeric approach
f_numeric = @(z) exp(z.^2);
Out_numeric = integral (f_numeric, 0, 1);
% Symbolic / vpa approach
syms x
f_symbolic(x) = exp(x^2);
Out_symbolic = int (f_symbolic, x, [0,1]);
% Comparison
fprintf('Numeric : %0.30f\n', Out_numeric)
fprintf('Symbolic : %s\n' , char (vpa (Out_symbolic, 32)))
fprintf('Converted: %0.30f\n', double (vpa (Out_symbolic, 32))) % back to double