MATLAB: How to get 32 bit mathematical output

32 bit floating bit o/p?

I am computing a series of equations and presently I'm getting a 15 bit floating point o/p, I need it in 32 bit and 64 bit.

Best Answer

0.984807753012208 is 15 digits, not 15 bits. You are also missing printing out some of the digits: use
sprintf('%.99g\n', TheVariable)
to see the full list of digits.
Each decimal digit corresponds to log2(10) bits, which is just under 3 1/3 bits per decimal digit. 15 decimal digits therefore corresponds to about 49 bits. But really it is 16 digits you are getting: the next in sequence happens to be 0 so it is omitted from the printout. 16 decimal digits corresponds to 53 bits of accuracy. The remaining bits in a 64 bit double precision word correspond to sign information and to the exponent (... x 2^(-1) in this particular case.)
So you are already getting full 64 bit accuracy.