Skip to content

C++ write() rounds every value to 6 digits (3.141592653589793 -> 3.14159) #729

Backlog

Description

@bhuvan-somisetty

concore.hpp writes doubles with a plain <<, so the stream's default precision of 6 kicks in and every value a C++ node sends gets rounded.

tried on dev (bccabc7): write(1, "u", {3.141592653589793, 0.1234567, 1234567.0}) writes [0,3.14159,0.123457,1.23457e+06], the same write from concore.py gives [0, 3.141592653589793, 0.1234567, 1234567.0].

same in concoredocker.hpp and the zmq send in concore_base.hpp. <iomanip> is already included, looks like it just needs setprecision(17). happy to send a fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions