5namespace sysio {
namespace chain {
namespace webassembly {
7 template <
typename Ctx,
typename F>
8 inline static void predicated_print(Ctx&
context, F&& print_func) {
17 [&]() {
context.console_append(
static_cast<const char*
>(str.data()) ); });
22 [&]() {
context.console_append(std::string_view(str.data(), str.size())); });
28 std::ostringstream oss;
30 context.console_append( oss.str() );
37 std::ostringstream oss;
39 context.console_append( oss.str() );
46 bool is_negative = (*val < 0);
47 unsigned __int128 val_magnitude;
50 val_magnitude =
static_cast<unsigned __int128
>(-*val);
52 val_magnitude =
static_cast<unsigned __int128
>(*val);
78 std::ostringstream oss;
79 oss.setf( std::ios::scientific, std::ios::floatfield );
80 oss.precision( std::numeric_limits<float>::digits10 );
82 context.console_append( oss.str() );
90 std::ostringstream oss;
91 oss.setf( std::ios::scientific, std::ios::floatfield );
92 oss.precision( std::numeric_limits<double>::digits10 );
94 context.console_append( oss.str() );
113 std::ostringstream oss;
114 oss.setf( std::ios::scientific, std::ios::floatfield );
117 oss.precision( std::numeric_limits<long double>::digits10 );
121 std::memcpy((
char*)&_val, (
char*)&val_approx,
sizeof(
long double));
124 oss.precision( std::numeric_limits<double>::digits10 );
128 context.console_append( oss.str() );
an implementation of 128 bit unsigned integer
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
const string & get_string() const
void printhex(legacy_span< const char > data)
void printsf(float32_t val)
void prints_l(legacy_span< const char > str)
void printui(uint64_t val)
void printdf(float64_t val)
void prints(null_terminated_ptr str)
void printui128(legacy_ptr< const unsigned __int128 > val)
void printi128(legacy_ptr< const __int128 > val)
void printqf(legacy_ptr< const float128_t > val)
fc::string to_hex(const char *d, uint32_t s)
void f128M_to_extF80M(const float128_t *aPtr, extFloat80_t *zPtr)
float64_t f128M_to_f64(const float128_t *aPtr)
double from_softfloat64(float64_t d)
float from_softfloat32(float32_t f)
unsigned __int64 uint64_t
Immutable except for fc::from_variant.