| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 } | 1021 } |
| 1022 } | 1022 } |
| 1023 return builder.toString(); | 1023 return builder.toString(); |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 Decimal Decimal::zero(Sign sign) | 1026 Decimal Decimal::zero(Sign sign) |
| 1027 { | 1027 { |
| 1028 return Decimal(EncodedData(sign, EncodedData::ClassZero)); | 1028 return Decimal(EncodedData(sign, EncodedData::ClassZero)); |
| 1029 } | 1029 } |
| 1030 | 1030 |
| 1031 std::ostream& operator<<(std::ostream& ostream, const Decimal& decimal) |
| 1032 { |
| 1033 Decimal::EncodedData data = decimal.value(); |
| 1034 return ostream |
| 1035 << "encode(" << String::number(data.coefficient()).ascii().data() |
| 1036 << ", " << String::number(data.exponent()).ascii().data() |
| 1037 << ", " << (data.getSign() == Decimal::Negative ? "Negative" : "Positive
") |
| 1038 << ")=" << decimal.toString().ascii().data(); |
| 1039 } |
| 1040 |
| 1031 } // namespace blink | 1041 } // namespace blink |
| OLD | NEW |