10d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// Copyright 2006-2008 the V8 project authors. All rights reserved. 20d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// Redistribution and use in source and binary forms, with or without 30d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// modification, are permitted provided that the following conditions are 40d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// met: 50d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// 60d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// * Redistributions of source code must retain the above copyright 70d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// notice, this list of conditions and the following disclaimer. 80d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// * Redistributions in binary form must reproduce the above 90d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// copyright notice, this list of conditions and the following 100d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// disclaimer in the documentation and/or other materials provided 110d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// with the distribution. 120d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// * Neither the name of Google Inc. nor the names of its 130d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// contributors may be used to endorse or promote products derived 140d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// from this software without specific prior written permission. 150d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// 160d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 170d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 180d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 190d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 200d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 210d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 220d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 230d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 240d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 250d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 260d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 270d5e116f6aee03185f237311a943491bb079a768Kristian Monsen 280d5e116f6aee03185f237311a943491bb079a768Kristian Monsen#ifndef GAY_PRECISION_H_ 290d5e116f6aee03185f237311a943491bb079a768Kristian Monsen#define GAY_PRECISION_H_ 300d5e116f6aee03185f237311a943491bb079a768Kristian Monsen 310d5e116f6aee03185f237311a943491bb079a768Kristian Monsennamespace v8 { 320d5e116f6aee03185f237311a943491bb079a768Kristian Monsennamespace internal { 330d5e116f6aee03185f237311a943491bb079a768Kristian Monsen 340d5e116f6aee03185f237311a943491bb079a768Kristian Monsenstruct PrecomputedPrecision { 350d5e116f6aee03185f237311a943491bb079a768Kristian Monsen double v; 360d5e116f6aee03185f237311a943491bb079a768Kristian Monsen int number_digits; 370d5e116f6aee03185f237311a943491bb079a768Kristian Monsen const char* representation; 380d5e116f6aee03185f237311a943491bb079a768Kristian Monsen int decimal_point; 390d5e116f6aee03185f237311a943491bb079a768Kristian Monsen}; 400d5e116f6aee03185f237311a943491bb079a768Kristian Monsen 410d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// Returns precomputed values of dtoa. The strings have been generated using 420d5e116f6aee03185f237311a943491bb079a768Kristian Monsen// Gay's dtoa in mode "precision". 430d5e116f6aee03185f237311a943491bb079a768Kristian MonsenVector<const PrecomputedPrecision> PrecomputedPrecisionRepresentations(); 440d5e116f6aee03185f237311a943491bb079a768Kristian Monsen 450d5e116f6aee03185f237311a943491bb079a768Kristian Monsen} } // namespace v8::internal 460d5e116f6aee03185f237311a943491bb079a768Kristian Monsen 470d5e116f6aee03185f237311a943491bb079a768Kristian Monsen#endif // GAY_PRECISION_H_ 48