/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 acceptableError() const; 75 Decimal alignValueForStep(const Decimal& currentValue, const Decimal& newValue) const [all...] |
StepRange.cpp | 55 StepRange::StepRange(const Decimal& stepBase, const Decimal& minimum, const Decimal& maximum, const Decimal& step, const StepDescription& stepDescription) 69 Decimal StepRange::acceptableError() const 72 DEFINE_STATIC_LOCAL(const Decimal, twoPowerOfFloatMantissaBits, (Decimal::Positive, 0, UINT64_C(1) << FLT_MANT_DIG)); 73 return m_stepDescription.stepValueShouldBe == StepValueShouldBeReal ? m_step / twoPowerOfFloatMantissaBits : Decimal(0); 76 Decimal StepRange::alignValueForStep(const Decimal& currentValue, const Decimal& newValue) cons [all...] |
BaseDateAndTimeInputType.h | 45 virtual Decimal parseToNumber(const String&, const Decimal&) const OVERRIDE; 48 virtual String serialize(const Decimal&) const OVERRIDE; 58 virtual void setValueAsDecimal(const Decimal&, TextFieldEventBehavior, ExceptionState&) const OVERRIDE; 62 virtual String rangeOverflowText(const Decimal& maximum) const OVERRIDE; 63 virtual String rangeUnderflowText(const Decimal& minimum) const OVERRIDE; 64 virtual Decimal defaultValueForStepUp() const OVERRIDE;
|
RangeInputType.h | 51 virtual void setValueAsDecimal(const Decimal&, TextFieldEventBehavior, ExceptionState&) const OVERRIDE; 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;
|
InputType.h | 122 virtual void setValueAsDecimal(const Decimal&, TextFieldEventBehavior, ExceptionState&) const; 140 virtual Decimal defaultValueForStepUp() const; 144 virtual bool getAllowedValueStep(Decimal*) const; 149 virtual String rangeOverflowText(const Decimal& maximum) const; 150 virtual String rangeUnderflowText(const Decimal& minimum) const; 196 virtual Decimal findClosestTickMarkValue(const Decimal&); 200 // the Decimal value for the parsing result if the parsing 203 virtual Decimal parseToNumber(const String&, const Decimal& defaultValue) const [all...] |
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.cpp | 72 static Decimal ensureMaximum(const Decimal& proposedValue, const Decimal& minimum, const Decimal& fallbackValue) 108 void RangeInputType::setValueAsDecimal(const Decimal& newValue, TextFieldEventBehavior eventBehavior, ExceptionState&) const 127 const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), rangeDefaultMinimum); 128 const Decimal maximum = ensureMaximum(parseToNumber(element().fastGetAttribute(maxAttr), rangeDefaultMaximum), minimum, rangeDefaultMaximum); 132 const Decimal step = equalIgnoringCase(precisionValue, "float") ? Decimal::nan() : 1; 136 const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr) (…) [all...] |
BaseDateAndTimeInputType.cpp | 63 const Decimal value = parseToNumber(element().value(), Decimal::nan()); 67 void BaseDateAndTimeInputType::setValueAsDecimal(const Decimal& newValue, TextFieldEventBehavior eventBehavior, ExceptionState&) const 82 String BaseDateAndTimeInputType::rangeOverflowText(const Decimal& maximum) const 87 String BaseDateAndTimeInputType::rangeUnderflowText(const Decimal& minimum) const 92 Decimal BaseDateAndTimeInputType::defaultValueForStepUp() const 98 return Decimal::fromDouble(ms + (offset * msPerMinute)); 106 Decimal BaseDateAndTimeInputType::parseToNumber(const String& source, const Decimal& defaultValue) const 113 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 | 223 setValueAsDecimal(Decimal::fromDouble(doubleValue), eventBehavior, exceptionState); 226 void InputType::setValueAsDecimal(const Decimal&, TextFieldEventBehavior, ExceptionState& exceptionState) const 272 const Decimal numericValue = parseToNumberOrNaN(value); 284 const Decimal numericValue = parseToNumberOrNaN(value); 291 Decimal InputType::defaultValueForStepUp() const 311 const Decimal numericValue = parseToNumberOrNaN(value); 324 const Decimal numericValue = parseToNumberOrNaN(value); 337 const Decimal numericValue = parseToNumberOrNaN(value); 350 String InputType::rangeOverflowText(const Decimal&) const 356 String InputType::rangeUnderflowText(const Decimal&) cons [all...] |
NumberInputType.cpp | 76 static RealNumberRenderSize calculateRenderSize(const Decimal& value) 135 void NumberInputType::setValueAsDecimal(const Decimal& newValue, TextFieldEventBehavior eventBehavior, ExceptionState& exceptionState) const 138 const Decimal floatMax = Decimal::fromDouble(numeric_limits<float>::max()); 162 const Decimal floatMax = Decimal::fromDouble(numeric_limits<float>::max()); 174 const Decimal minimum = parseToDecimalForNumberType(element().fastGetAttribute(minAttr)); 178 const Decimal maximum = parseToDecimalForNumberType(element().fastGetAttribute(maxAttr)); 182 const Decimal step = parseToDecimalForNumberType(stepString, 1); 204 Decimal NumberInputType::parseToNumber(const String& src, const Decimal& defaultValue) cons [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);
|
TimeInputType.cpp | 74 Decimal TimeInputType::defaultValueForStepUp() const 86 return Decimal::fromDouble(milliseconds); 93 return InputType::createStepRange(anyStepHandling, 0, 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" 49 String serializeForNumberType(const Decimal&); 52 // Convert the specified string to a decimal/double. If the conversion fails, the return value is fallback value or NaN if not specified. 55 Decimal parseToDecimalForNumberType(const String&, const Decimal& fallbackValue = Decimal::nan());
|
HTMLParserIdioms.cpp | 76 String serializeForNumberType(const Decimal& number) 79 // Decimal::toString appends exponent, e.g. "0e-18" 92 Decimal parseToDecimalForNumberType(const String& string, const Decimal& fallbackValue) 101 const Decimal value = Decimal::fromString(string); 108 const Decimal floatMax = Decimal::fromDouble(std::numeric_limits<float>::max()); 113 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'))
|