5

A symbolic value occupies 112 bytes of memory with Matlab (Symbolic Math toolbox). One can see this via the whos command.

I know that a floating-point value (in the numerical framework of Matlab) is stored according to the IEEE 754 standard. So, with 8 bytes (double precision): 52 bits for the mantissa, one bit for the sign, and 11 bits for the exponent.

What about the details of the storage of symbolic numbers? What standard is used?

horchler
  • 18,384
  • 4
  • 37
  • 73
manifold
  • 233
  • 2
  • 9
  • 2
    If you type `edit sym` into the matlab terminal, you can see that symbols are stored as objects of the class `sym`. My guess is that the storage format is probably unique to MATLAB and doesn't follow any particular standard. – eigenchris Dec 13 '14 at 19:41
  • In addition the size reported by `whos` does not reflect the memory usage for a symbolic object/datatype. Type `edit sym` in your command window and explore, but much of this is hidden away in mex code. – horchler Dec 13 '14 at 19:47
  • Matlab questions are often answerable in one way or another iff they have a practical purpose. So I wonder whether you need this information (and for what), or perhaps it's just curiosity? – Dennis Jaheruddin Dec 18 '14 at 09:58

1 Answers1

2

The core of the symbolic math toolbox is mupad, a software which was developed by the "mupad research group" at the university of paderborn. If you want to get a rough idea how symbolic math works in Matlab works try searching there.

The sym object itself is some kind of wrapper porting the data into matlab. You can easily prove that the sym does not contain all relevant information. Create a 1000 digits constant, to hold this information more than 112 bytes are required but your sym still has the same size.

Daniel
  • 36,610
  • 3
  • 36
  • 69