Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:27:25

0001 //
0002 // Copyright 2018 The Abseil Authors.
0003 //
0004 // Licensed under the Apache License, Version 2.0 (the "License");
0005 // you may not use this file except in compliance with the License.
0006 // You may obtain a copy of the License at
0007 //
0008 //      https://www.apache.org/licenses/LICENSE-2.0
0009 //
0010 // Unless required by applicable law or agreed to in writing, software
0011 // distributed under the License is distributed on an "AS IS" BASIS,
0012 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013 // See the License for the specific language governing permissions and
0014 // limitations under the License.
0015 //
0016 // This test helper library contains a table of powers of 10, to guarantee
0017 // precise values are computed across the full range of doubles. We can't rely
0018 // on the pow() function, because not all standard libraries ship a version
0019 // that is precise.
0020 #ifndef ABSL_STRINGS_INTERNAL_POW10_HELPER_H_
0021 #define ABSL_STRINGS_INTERNAL_POW10_HELPER_H_
0022 
0023 #include <vector>
0024 
0025 #include "absl/base/config.h"
0026 
0027 namespace absl {
0028 ABSL_NAMESPACE_BEGIN
0029 namespace strings_internal {
0030 
0031 // Computes the precise value of 10^exp. (I.e. the nearest representable
0032 // double to the exact value, rounding to nearest-even in the (single) case of
0033 // being exactly halfway between.)
0034 double Pow10(int exp);
0035 
0036 }  // namespace strings_internal
0037 ABSL_NAMESPACE_END
0038 }  // namespace absl
0039 
0040 #endif  // ABSL_STRINGS_INTERNAL_POW10_HELPER_H_