Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Side by Side Diff: tests/lib/math/double_pow_test.dart

Issue 220723017: Add optimization for pow(base, 0.5) to the other architectures as well. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // VMOptions=--optimization-counter-threshold=10
zra 2014/04/03 17:04:46 Maybe also add a loop to ensure that this is being
srdjan 2014/04/03 19:33:18 Done.
4 5
5 library math_test; 6 library math_test;
6 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
7 import 'dart:math'; 8 import 'dart:math';
8 9
9 void checkVeryClose(double a, double b) { 10 void checkVeryClose(double a, double b) {
10 // We find a ulp (unit in the last place) by shifting the original number 11 // We find a ulp (unit in the last place) by shifting the original number
11 // to the right. This only works if we are not too close to infinity or if 12 // to the right. This only works if we are not too close to infinity or if
12 // we work with denormals. 13 // we work with denormals.
13 // We special case or 0.0, but not for infinity. 14 // We special case or 0.0, but not for infinity.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Underflow. 150 // Underflow.
150 Expect.identical(0.0, pow(10.0, -325.0)); 151 Expect.identical(0.0, pow(10.0, -325.0));
151 152
152 // Conversion to double. 153 // Conversion to double.
153 154
154 // The second argument is an odd integer as int, but not when converted 155 // The second argument is an odd integer as int, but not when converted
155 // to double. 156 // to double.
156 Expect.identical(Infinity, pow(-0.0, -9223372036854775809)); 157 Expect.identical(Infinity, pow(-0.0, -9223372036854775809));
157 } 158 }
158 159
OLDNEW
« runtime/vm/intermediate_language_mips.cc ('K') | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698