fast_float/tests/example_integer_times_pow10.cpp
Pavel Novikov 6702cd4244
added doc section in the README,
added example code test executable
2025-09-05 13:36:23 +03:00

13 lines
375 B
C++

#include "fast_float/fast_float.h"
#include <iostream>
int main() {
const uint64_t W = 12345678901234567;
const int Q = 23;
const double result = fast_float::integer_times_pow10(W, Q);
std::cout.precision(17);
std::cout << W << " * 10^" << Q << " = " << result << " ("
<< (result == 12345678901234567e23 ? "==" : "!=") << "expected)\n";
}