grpc
third_party
abseil-cpp
absl
strings
internal
abseil-cpp/absl/strings/internal/pow10_helper.h
Go to the documentation of this file.
1
//
2
// Copyright 2018 The Abseil Authors.
3
//
4
// Licensed under the Apache License, Version 2.0 (the "License");
5
// you may not use this file except in compliance with the License.
6
// You may obtain a copy of the License at
7
//
8
// https://www.apache.org/licenses/LICENSE-2.0
9
//
10
// Unless required by applicable law or agreed to in writing, software
11
// distributed under the License is distributed on an "AS IS" BASIS,
12
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
// See the License for the specific language governing permissions and
14
// limitations under the License.
15
//
16
// This test helper library contains a table of powers of 10, to guarantee
17
// precise values are computed across the full range of doubles. We can't rely
18
// on the pow() function, because not all standard libraries ship a version
19
// that is precise.
20
#ifndef ABSL_STRINGS_INTERNAL_POW10_HELPER_H_
21
#define ABSL_STRINGS_INTERNAL_POW10_HELPER_H_
22
23
#include <vector>
24
25
#include "absl/base/config.h"
26
27
namespace
absl
{
28
ABSL_NAMESPACE_BEGIN
29
namespace
strings_internal {
30
31
// Computes the precise value of 10^exp. (I.e. the nearest representable
32
// double to the exact value, rounding to nearest-even in the (single) case of
33
// being exactly halfway between.)
34
double
Pow10
(
int
exp);
35
36
}
// namespace strings_internal
37
ABSL_NAMESPACE_END
38
}
// namespace absl
39
40
#endif // ABSL_STRINGS_INTERNAL_POW10_HELPER_H_
ABSL_NAMESPACE_END
#define ABSL_NAMESPACE_END
Definition:
third_party/abseil-cpp/absl/base/config.h:171
ABSL_NAMESPACE_BEGIN
#define ABSL_NAMESPACE_BEGIN
Definition:
third_party/abseil-cpp/absl/base/config.h:170
absl
Definition:
abseil-cpp/absl/algorithm/algorithm.h:31
absl::strings_internal::Pow10
double Pow10(int exp)
Definition:
abseil-cpp/absl/strings/internal/pow10_helper.cc:110
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:44