Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
vendorpull https://github.com/sourcemeta/vendorpull 1dcbac42809cf87cb5b045106b863e17ad84ba02
core https://github.com/sourcemeta/core fe450b982907f99e542a0cfc78bc60d2b600ff7a
core https://github.com/sourcemeta/core 28d02328c467616ecec2bffd37c07930974fedf2
bootstrap https://github.com/twbs/bootstrap 1a6fdfae6be09b09eaced8f0e442ca6f7680a61e
13 changes: 11 additions & 2 deletions src/runtime/decoder_number.cc
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
#include <sourcemeta/jsonbinpack/runtime_decoder.h>

#include <cmath> // std::pow
#include <cstdint> // std::int64_t, std::uint64_t

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC optimize("no-reciprocal-math")
#endif

namespace sourcemeta::jsonbinpack {

auto Decoder::DOUBLE_VARINT_TUPLE(const struct DOUBLE_VARINT_TUPLE &)
-> sourcemeta::core::JSON {
#ifdef __clang__
#pragma clang fp reciprocal(off)
#endif
const std::int64_t digits{this->get_varint_zigzag()};
const std::uint64_t point{this->get_varint()};
const double divisor{std::pow(10, static_cast<double>(point))};
double divisor{1.0};
for (std::uint64_t i = 0; i < point; ++i) {
divisor *= 10.0;
}
return sourcemeta::core::JSON{static_cast<double>(digits) / divisor};
}

Expand Down
84 changes: 41 additions & 43 deletions vendor/core/CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions vendor/core/DEPENDENCIES

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

146 changes: 0 additions & 146 deletions vendor/core/cmake/Findmpdecimal.cmake

This file was deleted.

Loading
Loading