tests/example_integer_times_pow10.cpp
raw| 1 | #include "fast_float/fast_float.h" |
| 2 | |
| 3 | #include <iostream> |
| 4 | |
| 5 | int main() { |
| 6 | const uint64_t W = 12345678901234567; |
| 7 | const int Q = 23; |
| 8 | const double result = fast_float::integer_times_pow10(W, Q); |
| 9 | std::cout.precision(17); |
| 10 | std::cout << W << " * 10^" << Q << " = " << result << " (" |
| 11 | << (result == 12345678901234567e23 ? "==" : "!=") << "expected)\n"; |
| 12 | } |