17 #ifndef ROOT_Math_GenVector_BitReproducible
18 #define ROOT_Math_GenVector_BitReproducible 1
28 namespace GenVector_detail {
30 class BitReproducibleException :
public std::exception
33 BitReproducibleException(
const std::string & w) noexcept : fMsg(w) {}
34 ~BitReproducibleException() noexcept {}
35 const char *what() const noexcept
override {
return fMsg.c_str(); }
40 class BitReproducible {
49 static void Dto2longs(
double d,
unsigned int & i1,
unsigned int & i2);
57 static double Longs2double (
unsigned int i1,
unsigned int i2);
63 static std::string D2x(
double d);
65 static void Output ( std::ostream & os,
double d ) {
68 os <<
" " << i1 <<
" " << i2;
71 static void Input ( std::istream & is,
double & d ) {
74 d = Longs2double(i1, i2);
77 static void Output ( std::ostream & os,
float f ) {
79 Dto2longs(
double(f), i1, i2 );
80 os <<
" " << i1 <<
" " << i2;
83 static void Input ( std::istream & is,
float & f ) {
86 f = float( Longs2double(i1, i2) );
95 static void Fill_byte_order ();
96 static bool fgByte_order_known;
97 static int fgByte_order[8];
128 #endif // DOUBCONV_HH