msgid "**double**. The double field type exists mainly so that there will be an equivalent to Tarantool/SQL's :ref:`DOUBLE data type <sql_data_type_double>`. In `msgpuck.h <https://github.com/rtsisyk/msgpuck>`_ (Tarantool's interface to MsgPack) the storage type is MP_DOUBLE and the size of the encoded value is always 9 bytes. In Lua, 'double' fields can only contain non-integer numeric values and cdata values with double floating-point numbers. Examples: ``1.234``, ``-44``, ``1.447e+44``. |br| To avoid using the wrong kind of values inadvertently, use ``ffi.cast()`` when searching or changing 'double' fields. For example, instead of :samp:`{space_object}:insert`:code:`{`:samp:`{value}`:code:`}` say ``ffi = require('ffi') ...`` :samp:`{space_object}:insert`:code:`({ffi.cast('double',`:samp:`{value}`:code:`)})`. Example:"
0 commit comments