Skip to content
Snippets Groups Projects
Unverified Commit a92ed973 authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

Store floating point numbers in double precision

Even on 32-bit systems, Value has enough space to hold a double.
parent 91f49ca1
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ class JSONPlaceholder;
typedef long NixInt;
typedef float NixFloat;
typedef double NixFloat;
/* External values must descend from ExternalValueBase, so that
* type-agnostic nix functions (e.g. showType) can be implemented
......
......@@ -31,6 +31,7 @@ template<> void toJSON<unsigned long>(std::ostream & str, const unsigned long &
template<> void toJSON<long long>(std::ostream & str, const long long & n) { str << n; }
template<> void toJSON<unsigned long long>(std::ostream & str, const unsigned long long & n) { str << n; }
template<> void toJSON<float>(std::ostream & str, const float & n) { str << n; }
template<> void toJSON<double>(std::ostream & str, const double & n) { str << n; }
template<> void toJSON<std::string>(std::ostream & str, const std::string & s)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment