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

Side by Side Diff: runtime/lib/math.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 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
« no previous file with comments | « runtime/lib/double.cc ('k') | runtime/platform/c99_support_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4
5 #include <ctype.h> // isspace. 5 #include <ctype.h> // isspace.
6 6
7 #include "vm/bootstrap_natives.h" 7 #include "vm/bootstrap_natives.h"
8 8
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 DEFINE_NATIVE_ENTRY(Math_atan, 1) { 48 DEFINE_NATIVE_ENTRY(Math_atan, 1) {
49 GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0)); 49 GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
50 return Double::New(atan(operand.value())); 50 return Double::New(atan(operand.value()));
51 } 51 }
52 52
53 DEFINE_NATIVE_ENTRY(Math_atan2, 2) { 53 DEFINE_NATIVE_ENTRY(Math_atan2, 2) {
54 GET_NATIVE_ARGUMENT(Double, operand1, arguments->NativeArgAt(0)); 54 GET_NATIVE_ARGUMENT(Double, operand1, arguments->NativeArgAt(0));
55 GET_NATIVE_ARGUMENT(Double, operand2, arguments->NativeArgAt(1)); 55 GET_NATIVE_ARGUMENT(Double, operand2, arguments->NativeArgAt(1));
56 return Double::New(atan2(operand1.value(), operand2.value())); 56 return Double::New(atan2_ieee(operand1.value(), operand2.value()));
57 } 57 }
58 58
59 DEFINE_NATIVE_ENTRY(Math_exp, 1) { 59 DEFINE_NATIVE_ENTRY(Math_exp, 1) {
60 GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0)); 60 GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
61 return Double::New(exp(operand.value())); 61 return Double::New(exp(operand.value()));
62 } 62 }
63 63
64 DEFINE_NATIVE_ENTRY(Math_log, 1) { 64 DEFINE_NATIVE_ENTRY(Math_log, 1) {
65 GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0)); 65 GET_NATIVE_ARGUMENT(Double, operand, arguments->NativeArgAt(0));
66 return Double::New(log(operand.value())); 66 return Double::New(log(operand.value()));
67 } 67 }
68 68
69 } // namespace dart 69 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/double.cc ('k') | runtime/platform/c99_support_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698