Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Curious
Posts:
2,093
Registered:
12/6/04


Re: fprintf output: What does 0 mean?
Posted:
Jan 24, 2014 11:57 AM


paul.domaskis@gmail.com wrote in message <88ea480202a142c8a2d3616cd7bba2e7@googlegroups.com>... > I get a negative zero when printing a set of coefficients of lasso regression: > > >> format longg > >> fprintf('%e\n',B(:,86)) > 0.000000e+00 > 0.000000e+00 > 0.000000e+00 > 1.367172e01 > 0.000000e+00 > 6.460915e02 > 1.078923e10 > > I can't provide simple code to do duplicate. A simply cut/paste of the above text to assign into a variable x does not yield the same fprintf results. > > What would cause the negative zero? How should it be interpretted?
It's probably just a VERY small negative number that you don't have enough significant digits to see.



