File: example_integer_times_pow10.cpp

package info (click to toggle)
fast-float 8.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 896 kB
  • sloc: cpp: 7,252; ansic: 3,474; python: 366; sh: 37; makefile: 9
file content (12 lines) | stat: -rw-r--r-- 375 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#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";
}