Chromium Code Reviews| Index: runtime/lib/math_patch.dart |
| diff --git a/runtime/lib/math_patch.dart b/runtime/lib/math_patch.dart |
| index 89460cc394afe746a87413747eebed0174879bba..72b7bfb9502ab7f153ee136e87947b15b50fcdf2 100644 |
| --- a/runtime/lib/math_patch.dart |
| +++ b/runtime/lib/math_patch.dart |
| @@ -23,6 +23,7 @@ double _doublePow(double base, num exponent) { |
| if (exponent is! num) { |
|
floitsch
2013/08/20 10:56:23
remove the check.
Lasse Reichstein Nielsen
2013/08/20 12:18:11
Done.
|
| throw new ArgumentError(null); |
| } |
| + if (base == 1.0) return 1.0; |
| double doubleExponent = exponent.toDouble(); |
| if (base.isNaN || exponent.isNaN) { |
| return double.NAN; |