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

Side by Side Diff: test/cctest/test-diy-fp.cc

Issue 1148007: Merge bleeding_edge from version 2.1.3 up to revision 4205... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 9 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 2
3 #include <stdlib.h> 3 #include <stdlib.h>
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "platform.h" 7 #include "platform.h"
8 #include "cctest.h" 8 #include "cctest.h"
9 #include "diy-fp.h" 9 #include "diy-fp.h"
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // Halfway cases are allowed to round either way. So don't check for it. 58 // Halfway cases are allowed to round either way. So don't check for it.
59 59
60 // Big numbers. 60 // Big numbers.
61 diy_fp1 = DiyFp(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF), 11); 61 diy_fp1 = DiyFp(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF), 11);
62 diy_fp2 = DiyFp(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF), 13); 62 diy_fp2 = DiyFp(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF), 13);
63 // 128bit result: 0xfffffffffffffffe0000000000000001 63 // 128bit result: 0xfffffffffffffffe0000000000000001
64 product = DiyFp::Times(diy_fp1, diy_fp2); 64 product = DiyFp::Times(diy_fp1, diy_fp2);
65 CHECK(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFe) == product.f()); 65 CHECK(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFe) == product.f());
66 CHECK_EQ(11 + 13 + 64, product.e()); 66 CHECK_EQ(11 + 13 + 64, product.e());
67 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698