Skip to content

X_NEW_FLOAT_EXT format #2

@aposto

Description

@aposto

// format.hpp 
#ifndef LIBBERT_NO_EXTENSION
  template < typename Iterator >
  Iterator format_new_float( real_t data, Iterator i ) {
    *i = (byte_t)X_NEW_FLOAT_EXT;
    char buf[8];
    std::copy( reinterpret_cast(&data), reinterpret_cast(&data)+8, buf );
#ifndef LIBBERT_BIGENDIAN
    std::reverse(buf, buf+8);
#endif
    return std::copy( buf, buf+8, i );
  }
#endif


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions