LEFT | RIGHT |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package big | 5 package big |
6 | 6 |
7 import ( | 7 import ( |
8 "io" | 8 "io" |
9 "runtime" | 9 "runtime" |
10 "strings" | 10 "strings" |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 t.Errorf("got 0x%s.trailingZeroBits() = %d; want %d", y.
string(lowercaseDigits[0:16]), n, i) | 707 t.Errorf("got 0x%s.trailingZeroBits() = %d; want %d", y.
string(lowercaseDigits[0:16]), n, i) |
708 } | 708 } |
709 y = y.shl(y, 1) | 709 y = y.shl(y, 1) |
710 } | 710 } |
711 } | 711 } |
712 | 712 |
713 var expNNTests = []struct { | 713 var expNNTests = []struct { |
714 x, y, m string | 714 x, y, m string |
715 out string | 715 out string |
716 }{ | 716 }{ |
| 717 {"0", "0", "0", "1"}, |
717 {"0", "0", "1", "0"}, | 718 {"0", "0", "1", "0"}, |
718 {"1", "1", "1", "0"}, | 719 {"1", "1", "1", "0"}, |
719 {"2", "1", "1", "0"}, | 720 {"2", "1", "1", "0"}, |
720 {"2", "2", "1", "0"}, | 721 {"2", "2", "1", "0"}, |
721 {"10", "100000000000", "1", "0"}, | 722 {"10", "100000000000", "1", "0"}, |
722 {"0x8000000000000000", "2", "", "0x40000000000000000000000000000000"}, | 723 {"0x8000000000000000", "2", "", "0x40000000000000000000000000000000"}, |
723 {"0x8000000000000000", "2", "6719", "4944"}, | 724 {"0x8000000000000000", "2", "6719", "4944"}, |
724 {"0x8000000000000000", "3", "6719", "5447"}, | 725 {"0x8000000000000000", "3", "6719", "5447"}, |
725 {"0x8000000000000000", "1000", "6719", "1603"}, | 726 {"0x8000000000000000", "1000", "6719", "1603"}, |
726 {"0x8000000000000000", "1000000", "6719", "3199"}, | 727 {"0x8000000000000000", "1000000", "6719", "3199"}, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 func BenchmarkExp3Power0x10(b *testing.B) { ExpHelper(b, 3, 0x10) } | 762 func BenchmarkExp3Power0x10(b *testing.B) { ExpHelper(b, 3, 0x10) } |
762 func BenchmarkExp3Power0x40(b *testing.B) { ExpHelper(b, 3, 0x40) } | 763 func BenchmarkExp3Power0x40(b *testing.B) { ExpHelper(b, 3, 0x40) } |
763 func BenchmarkExp3Power0x100(b *testing.B) { ExpHelper(b, 3, 0x100) } | 764 func BenchmarkExp3Power0x100(b *testing.B) { ExpHelper(b, 3, 0x100) } |
764 func BenchmarkExp3Power0x400(b *testing.B) { ExpHelper(b, 3, 0x400) } | 765 func BenchmarkExp3Power0x400(b *testing.B) { ExpHelper(b, 3, 0x400) } |
765 func BenchmarkExp3Power0x1000(b *testing.B) { ExpHelper(b, 3, 0x1000) } | 766 func BenchmarkExp3Power0x1000(b *testing.B) { ExpHelper(b, 3, 0x1000) } |
766 func BenchmarkExp3Power0x4000(b *testing.B) { ExpHelper(b, 3, 0x4000) } | 767 func BenchmarkExp3Power0x4000(b *testing.B) { ExpHelper(b, 3, 0x4000) } |
767 func BenchmarkExp3Power0x10000(b *testing.B) { ExpHelper(b, 3, 0x10000) } | 768 func BenchmarkExp3Power0x10000(b *testing.B) { ExpHelper(b, 3, 0x10000) } |
768 func BenchmarkExp3Power0x40000(b *testing.B) { ExpHelper(b, 3, 0x40000) } | 769 func BenchmarkExp3Power0x40000(b *testing.B) { ExpHelper(b, 3, 0x40000) } |
769 func BenchmarkExp3Power0x100000(b *testing.B) { ExpHelper(b, 3, 0x100000) } | 770 func BenchmarkExp3Power0x100000(b *testing.B) { ExpHelper(b, 3, 0x100000) } |
770 func BenchmarkExp3Power0x400000(b *testing.B) { ExpHelper(b, 3, 0x400000) } | 771 func BenchmarkExp3Power0x400000(b *testing.B) { ExpHelper(b, 3, 0x400000) } |
LEFT | RIGHT |