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

Unified Diff: runtime/lib/double.cc

Issue 11411188: Fix floating point issues on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ndx_x, ndx_y -> index_x, index_y. Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/math.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/double.cc
diff --git a/runtime/lib/double.cc b/runtime/lib/double.cc
index 76babac64b35730d097ccb36e223c41754792e7e..abadf124255b86ec809d729d2fb86a842699a8f3 100644
--- a/runtime/lib/double.cc
+++ b/runtime/lib/double.cc
@@ -87,7 +87,8 @@ DEFINE_NATIVE_ENTRY(Double_modulo, 2) {
double left = Double::CheckedHandle(arguments->NativeArgAt(0)).value();
GET_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
double right = right_object.value();
- double remainder = fmod(left, right);
+
+ double remainder = fmod_ieee(left, right);
if (remainder == 0.0) {
// We explicitely switch to the positive 0.0 (just in case it was negative).
remainder = +0.0;
@@ -106,7 +107,7 @@ DEFINE_NATIVE_ENTRY(Double_remainder, 2) {
double left = Double::CheckedHandle(arguments->NativeArgAt(0)).value();
GET_NATIVE_ARGUMENT(Double, right_object, arguments->NativeArgAt(1));
double right = right_object.value();
- return Double::New(fmod(left, right));
+ return Double::New(fmod_ieee(left, right));
}
« no previous file with comments | « no previous file | runtime/lib/math.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698