Hazelcast C++ Client
Hazelcast C++ Client Library
hazelcast::client::big_decimal Struct Reference

An arbitrary precision and scale floating point number. More...

#include <big_decimal.h>

Public Attributes

boost::multiprecision::cpp_int unscaled
 
int32_t scale
 

Detailed Description

An arbitrary precision and scale floating point number.

unscaledValue x 10 ^ -scale

For arithmetic operations support, it is suggested to use external libraries. An usage example with boost::multiprecision::cpp_dec_float could be as follows:


hazelcast::big_decimal dec{ u, 2 };
boost::multiprecision::cpp_dec_float<10> f(
 (dec.unscaled.str() + "e-" + std::to_string(dec.scale)).c_str());
 std::cout << f.str(100, std::ios_base::dec) << std::endl;
 

Definition at line 43 of file big_decimal.h.


The documentation for this struct was generated from the following file: