HomeSort by relevance Sort by last modified time
    Searched refs:Decimal (Results 1 - 25 of 70) sorted by null

1 2 3

  /external/chromium_org/third_party/WebKit/Source/platform/
Decimal.h 45 // This class represents decimal base floating point number.
47 // FIXME: Once all C++ compiler support decimal type, we should replace this
48 // class to compiler supported one. See below URI for current status of decimal
50 class PLATFORM_EXPORT Decimal {
61 friend class Decimal;
97 Decimal(int32_t = 0);
98 Decimal(Sign, int exponent, uint64_t coefficient);
99 Decimal(const Decimal&);
101 Decimal& operator=(const Decimal&)
    [all...]
DecimalTest.cpp 32 #include "platform/Decimal.h"
41 std::ostream& operator<<(std::ostream& os, const Decimal& decimal)
43 Decimal::EncodedData data = decimal.value();
47 << ", " << (data.sign() == Decimal::Negative ? "Negative" : "Positive")
48 << ")=" << decimal.toString().ascii().data();
58 Decimal maximum;
59 Decimal minimum;
60 Decimal step
    [all...]
Decimal.cpp 32 #include "platform/Decimal.h"
51 // This class handles Decimal special values.
63 SpecialValueHandler(const Decimal& lhs, const Decimal& rhs);
65 Decimal value() const;
74 const Decimal& m_lhs;
75 const Decimal& m_rhs;
79 SpecialValueHandler::SpecialValueHandler(const Decimal& lhs, const Decimal& rhs)
89 const Decimal::EncodedData::FormatClass lhsClass = m_lhs.value().formatClass()
    [all...]
  /external/chromium_org/third_party/WebKit/Source/core/html/forms/
StepRange.h 24 #include "platform/Decimal.h"
65 Decimal defaultValue() const
73 StepRange(const Decimal& stepBase, const Decimal& minimum, const Decimal& maximum, const Decimal& step, const StepDescription&);
74 Decimal alignValueForStep(const Decimal& currentValue, const Decimal& newValue) const;
75 Decimal clampValue(const Decimal& value) const
    [all...]
StepRange.cpp 53 StepRange::StepRange(const Decimal& stepBase, const Decimal& minimum, const Decimal& maximum, const Decimal& step, const StepDescription& stepDescription)
67 Decimal StepRange::acceptableError() const
70 DEFINE_STATIC_LOCAL(const Decimal, twoPowerOfFloatMantissaBits, (Decimal::Positive, 0, UINT64_C(1) << FLT_MANT_DIG));
71 return m_stepDescription.stepValueShouldBe == StepValueShouldBeReal ? m_step / twoPowerOfFloatMantissaBits : Decimal(0);
74 Decimal StepRange::alignValueForStep(const Decimal& currentValue, const Decimal& newValue) cons
    [all...]
InputType.h 118 virtual void setValueAsDecimal(const Decimal&, TextFieldEventBehavior, ExceptionState&) const;
136 virtual Decimal defaultValueForStepUp() const;
140 virtual bool getAllowedValueStep(Decimal*) const;
145 virtual String rangeOverflowText(const Decimal& maximum) const;
146 virtual String rangeUnderflowText(const Decimal& minimum) const;
190 virtual Decimal findClosestTickMarkValue(const Decimal&);
196 // the Decimal value for the parsing result if the parsing
199 virtual Decimal parseToNumber(const String&, const Decimal& defaultValue) const
    [all...]
BaseDateAndTimeInputType.h 45 virtual Decimal parseToNumber(const String&, const Decimal&) const OVERRIDE;
52 virtual String serialize(const Decimal&) const OVERRIDE;
66 virtual String rangeOverflowText(const Decimal& maximum) const OVERRIDE;
67 virtual String rangeUnderflowText(const Decimal& minimum) const OVERRIDE;
68 virtual Decimal defaultValueForStepUp() const OVERRIDE;
NumberInputType.h 51 virtual void setValueAsDecimal(const Decimal&, TextFieldEventBehavior, ExceptionState&) const OVERRIDE;
58 virtual Decimal parseToNumber(const String&, const Decimal&) const OVERRIDE;
59 virtual String serialize(const Decimal&) const OVERRIDE;
66 virtual String rangeOverflowText(const Decimal& maxmum) const OVERRIDE;
67 virtual String rangeUnderflowText(const Decimal& minimum) const OVERRIDE;
RangeInputType.h 62 virtual Decimal parseToNumber(const String&, const Decimal&) const OVERRIDE;
63 virtual String serialize(const Decimal&) const OVERRIDE;
75 virtual Decimal findClosestTickMarkValue(const Decimal&) OVERRIDE;
78 Vector<Decimal> m_tickMarkValues;
RangeInputType.cpp 71 static Decimal ensureMaximum(const Decimal& proposedValue, const Decimal& minimum, const Decimal& fallbackValue)
109 setValueAsDecimal(Decimal::fromDouble(newValue), eventBehavior, exceptionState);
126 const Decimal stepBase = findStepBase(rangeDefaultStepBase);
127 const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), rangeDefaultMinimum);
128 const Decimal maximum = ensureMaximum(parseToNumber(element().fastGetAttribute(maxAttr), rangeDefaultMaximum), minimum, rangeDefaultMaximum);
130 const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr));
186 const Decimal current = parseToNumberOrNaN(element().value())
    [all...]
BaseDateAndTimeInputType.cpp 62 const Decimal value = parseToNumber(element().value(), Decimal::nan());
68 setValueAsDecimal(Decimal::fromDouble(newValue), eventBehavior, exceptionState);
81 String BaseDateAndTimeInputType::rangeOverflowText(const Decimal& maximum) const
86 String BaseDateAndTimeInputType::rangeUnderflowText(const Decimal& minimum) const
91 Decimal BaseDateAndTimeInputType::defaultValueForStepUp() const
97 return Decimal::fromDouble(ms + (offset * msPerMinute));
105 Decimal BaseDateAndTimeInputType::parseToNumber(const String& source, const Decimal& defaultValue) const
112 return Decimal::fromDouble(msec)
    [all...]
MonthInputType.h 55 virtual Decimal parseToNumber(const String&, const Decimal&) const OVERRIDE;
56 virtual Decimal defaultValueForStepUp() const OVERRIDE;
InputType.cpp 211 void InputType::setValueAsDecimal(const Decimal& newValue, TextFieldEventBehavior eventBehavior, ExceptionState&) const
257 const Decimal numericValue = parseToNumberOrNaN(value);
269 const Decimal numericValue = parseToNumberOrNaN(value);
276 Decimal InputType::defaultValueForStepUp() const
296 const Decimal numericValue = parseToNumberOrNaN(value);
309 const Decimal numericValue = parseToNumberOrNaN(value);
322 const Decimal numericValue = parseToNumberOrNaN(value);
335 String InputType::rangeOverflowText(const Decimal&) const
341 String InputType::rangeUnderflowText(const Decimal&) const
381 const Decimal numericValue = parseToNumberOrNaN(value)
    [all...]
MonthInputType.cpp 87 Decimal MonthInputType::defaultValueForStepUp() const
99 return Decimal::fromDouble(months);
106 return InputType::createStepRange(anyStepHandling, Decimal::fromDouble(monthDefaultStepBase), Decimal::fromDouble(DateComponents::minimumMonth()), Decimal::fromDouble(DateComponents::maximumMonth()), stepDescription);
109 Decimal MonthInputType::parseToNumber(const String& src, const Decimal& defaultValue) const
116 return Decimal::fromDouble(months);
NumberInputType.cpp 75 static RealNumberRenderSize calculateRenderSize(const Decimal& value)
128 void NumberInputType::setValueAsDecimal(const Decimal& newValue, TextFieldEventBehavior eventBehavior, ExceptionState& exceptionState) const
147 const Decimal doubleMax = Decimal::fromDouble(std::numeric_limits<double>::max());
159 const Decimal minimum = parseToDecimalForNumberType(element().fastGetAttribute(minAttr));
163 const Decimal maximum = parseToDecimalForNumberType(element().fastGetAttribute(maxAttr));
167 const Decimal step = parseToDecimalForNumberType(stepString, 1);
189 Decimal NumberInputType::parseToNumber(const String& src, const Decimal& defaultValue) const
194 String NumberInputType::serialize(const Decimal& value) cons
    [all...]
TimeInputType.cpp 74 Decimal TimeInputType::defaultValueForStepUp() const
86 return Decimal::fromDouble(milliseconds);
93 return InputType::createStepRange(anyStepHandling, timeDefaultStepBase, Decimal::fromDouble(DateComponents::minimumTime()), Decimal::fromDouble(DateComponents::maximumTime()), stepDescription);
TimeInputType.h 53 virtual Decimal defaultValueForStepUp() const OVERRIDE;
WeekInputType.cpp 70 return InputType::createStepRange(anyStepHandling, weekDefaultStepBase, Decimal::fromDouble(DateComponents::minimumWeek()), Decimal::fromDouble(DateComponents::maximumWeek()), stepDescription);
  /prebuilts/python/darwin-x86/2.7.5/lib/python2.7/test/
test_decimal.py 11 These are the test cases for the Decimal module.
14 the Decimal arithmetic using the tests provided by Mike Cowlishaw. The latter
19 www2.hursley.ibm.com/decimal/dectest.zip
32 from decimal import *
90 # Decimal behaves differently from decNumber for these testcases so these
148 # Name adapter to be able to change the Decimal and Context
189 # The following functions return True/False rather than a Decimal instance
206 """Class which tests the Decimal class against the test cases.
338 v = Decimal(v, self.context)
412 # The following classes test the behaviour of Decimal according to PEP 32
    [all...]
test_fractions.py 3 from decimal import Decimal
167 _components(F(Decimal('1.1'))))
169 _components(F(Decimal('3.5e-2'))))
171 _components(F(Decimal('.000e20'))))
172 self.assertRaises(TypeError, F, Decimal('nan'))
173 self.assertRaises(TypeError, F, Decimal('snan'))
174 self.assertRaises(TypeError, F, Decimal('inf'))
175 self.assertRaises(TypeError, F, Decimal('-inf'))
279 self.assertEqual(F(0), F.from_decimal(Decimal("-0"))
    [all...]
  /prebuilts/python/linux-x86/2.7.5/lib/python2.7/test/
test_decimal.py 11 These are the test cases for the Decimal module.
14 the Decimal arithmetic using the tests provided by Mike Cowlishaw. The latter
19 www2.hursley.ibm.com/decimal/dectest.zip
32 from decimal import *
90 # Decimal behaves differently from decNumber for these testcases so these
148 # Name adapter to be able to change the Decimal and Context
189 # The following functions return True/False rather than a Decimal instance
206 """Class which tests the Decimal class against the test cases.
338 v = Decimal(v, self.context)
412 # The following classes test the behaviour of Decimal according to PEP 32
    [all...]
  /external/chromium_org/third_party/WebKit/Source/core/html/parser/
HTMLParserIdioms.h 29 #include "platform/Decimal.h"
48 String serializeForNumberType(const Decimal&);
51 // Convert the specified string to a decimal/double. If the conversion fails, the return value is fallback value or NaN if not specified.
54 Decimal parseToDecimalForNumberType(const String&, const Decimal& fallbackValue = Decimal::nan());
HTMLParserIdioms.cpp 80 String serializeForNumberType(const Decimal& number)
83 // Decimal::toString appends exponent, e.g. "0e-18"
96 Decimal parseToDecimalForNumberType(const String& string, const Decimal& fallbackValue)
104 const Decimal value = Decimal::fromString(string);
109 const Decimal doubleMax = Decimal::fromDouble(std::numeric_limits<double>::max());
114 return value.isZero() ? Decimal(0) : value;
  /prebuilts/python/darwin-x86/2.7.5/lib/python2.7/json/tests/
test_decode.py 1 import decimal namespace
9 rval = self.loads('1.1', parse_float=decimal.Decimal)
10 self.assertTrue(isinstance(rval, decimal.Decimal))
11 self.assertEqual(rval, decimal.Decimal('1.1'))
  /prebuilts/python/linux-x86/2.7.5/lib/python2.7/json/tests/
test_decode.py 1 import decimal namespace
9 rval = self.loads('1.1', parse_float=decimal.Decimal)
10 self.assertTrue(isinstance(rval, decimal.Decimal))
11 self.assertEqual(rval, decimal.Decimal('1.1'))

Completed in 829 milliseconds

1 2 3