// Defining a string-to-bigint conversion // that is used by OTL internally.// Since 64-bit ineteger conversion functions are// not part of the ANSI C++ standard, the code// below is compiler specific#define OTL_STR_TO_BIGINT(str,n) \{ \ n=_atoi64(str); \}

// Defining a bigint-to-string conversion // that is used by OTL internally.// Since 64-bit ineteger conversion functions are// not part of the ANSI C++ standard, the code// below is compiler specific#define OTL_BIGINT_TO_STR(n,str) \{ \ _i64toa(n,str,10); \}

#elif defined(__GNUC__) // GNU C++

#include <stdlib.h>

// Enabling support for 64-bit signed integers// Since 64-bit integers are not part of the ANSI C++// standard, this definition is compiler specific.#define OTL_BIGINT long long

const OTL_BIGINT BIGINT_VAL1=12345678901234000LL;

// Defining a string-to-bigint conversion // that is used by OTL internally.// Since 64-bit ineteger conversion functions are// not part of the ANSI C++ standard, the code// below is compiler specific.#define OTL_STR_TO_BIGINT(str,n) \{ \ n=strtoll(str,0,10); \}

// Defining a bigint-to-string conversion // that is used by OTL internally.// Since 64-bit ineteger conversion functions are// not part of the ANSI C++ standard, the code// below is compiler specific#define OTL_BIGINT_TO_STR(n,str) \{ \ sprintf(str,"%lld",n); \}

Permission to use, copy, modify and redistribute this document
for
any purpose is hereby granted without fee, provided that the above
copyright
notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.