MATLAB: Does evaluating the Fresnel Cosine from -Infinity to zero return an incorrect result using Symbolic Math Toolbox 3.1 (R14)

Symbolic Math Toolbox

I evaluate the Fresnel Cosine with the following code:
syms t
double(int(cos(pi/2*t^2), t, -inf, 0))
returns
-0.500
which is incorrect.
However, evaluating
double(int(cos(pi/2*t^2), t, -10000, 0))
returns
0.500
returns the correct result.

Best Answer

This bug has been fixed in Release 2007a (R2007a). For previous product releases, read below for any possible workarounds:
This is a result of a bug in Maple 8, which is used by Symbolic Math Toolbox 3.1 (R14), that affects how the Fresnel Cosine is computed. To work around this issue, you can create a symbolic function for the Fresnel Cosine and use SUBS to evaluate it with different values. For example,
syms x t
f = cos(pi/2*t^2);
f2 = int(f, t, x, 0);
subs(f2, x, -inf)