michael@0: // Copyright (c) 2008 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: #ifndef THIRD_PARTY_DMG_FP_H_ michael@0: #define THIRD_PARTY_DMG_FP_H_ michael@0: michael@0: namespace dmg_fp { michael@0: michael@0: // Return a nearest machine number to the input decimal michael@0: // string (or set errno to ERANGE). With IEEE arithmetic, ties are michael@0: // broken by the IEEE round-even rule. Otherwise ties are broken by michael@0: // biased rounding (add half and chop). michael@0: double strtod(const char* s00, char** se); michael@0: michael@0: // Convert double to ASCII string. For meaning of parameters michael@0: // see dtoa.cc file. michael@0: char* dtoa(double d, int mode, int ndigits, michael@0: int* decpt, int* sign, char** rve); michael@0: michael@0: // Must be used to free values returned by dtoa. michael@0: void freedtoa(char* s); michael@0: michael@0: // Store the closest decimal approximation to x in b (null terminated). michael@0: // Returns a pointer to b. It is sufficient for |b| to be 32 characters. michael@0: char* g_fmt(char* b, double x); michael@0: michael@0: } // namespace dmg_fp michael@0: michael@0: #endif // THIRD_PARTY_DMG_FP_H_