Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Port of tests for goog.math.Long multiply tests to ClojureScript
(require '[clojure.test.check.random :as tcr])
; Long tests taken from Google Closure Libraries Long tests
; https://github.com/google/closure-library/blob/master/closure/goog/math/long_test.js
(def TEST_BITS
#js [
0x80000000, 0x00000000, 0xb776d5f5, 0x5634e2db, 0xffefffff, 0xffffffff,
0xfff00000, 0x00000000, 0xfffeffff, 0xffffffff, 0xffff0000, 0x00000000,
0xfffffffe, 0xffffffff, 0xffffffff, 0x00000000, 0xffffffff, 0xfeffffff,
0xffffffff, 0xff000000, 0xffffffff, 0xfffeffff, 0xffffffff, 0xffff0000,
0xffffffff, 0xffff7fff, 0xffffffff, 0xffff8000, 0xffffffff, 0xfffffffe,
0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00000002, 0x00000000, 0x00007fff, 0x00000000, 0x00008000,
0x00000000, 0x0000ffff, 0x00000000, 0x00010000, 0x00000000, 0x00ffffff,
0x00000000, 0x01000000, 0x00000000, 0x5634e2db, 0x00000000, 0xb776d5f5,
0x00000000, 0xffffffff, 0x00000001, 0x00000000, 0x0000ffff, 0xffffffff,
0x00010000, 0x00000000, 0x000fffff, 0xffffffff, 0x00100000, 0x00000000,
0x5634e2db, 0xb776d5f5, 0x7fffffff, 0xffffffff])
(def TEST_MUL_BITS
#js [
0x80000000, 0x00000000, 0x80000000, 0x00000000, 0x1ad92a0a, 0xa9cb1d25,
0x00000000, 0x00000000, 0xd2500000, 0x00000000, 0x00100000, 0x00000000,
0x80000000, 0x00000000, 0x65ae2a0a, 0xa9cb1d25, 0x00110000, 0x00000001,
0x00100000, 0x00000000, 0x00000000, 0x00000000, 0x1d250000, 0x00000000,
0x00010000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000,
0x80000000, 0x00000000, 0xf254472f, 0xa9cb1d25, 0x00100001, 0x00000001,
0x00100000, 0x00000000, 0x00010001, 0x00000001, 0x00010000, 0x00000000,
0x00000000, 0x00000000, 0xa9cb1d25, 0x00000000, 0x00000001, 0x00000000,
0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000,
0x00000001, 0x00000000, 0x80000000, 0x00000000, 0x5332f527, 0xcecb1d25,
0x00100000, 0x01000001, 0x00100000, 0x00000000, 0x00010000, 0x01000001,
0x00010000, 0x00000000, 0x01000001, 0x01000001, 0x01000001, 0x00000000,
0x00000000, 0x00000000, 0x0aa9cb1d, 0x25000000, 0x00000000, 0x01000000,
0x00000000, 0x00000000, 0x00000000, 0x01000000, 0x00000000, 0x00000000,
0x01000000, 0x01000000, 0x01000000, 0x00000000, 0x00010000, 0x01000000,
0x80000000, 0x00000000, 0x7293d3d5, 0xc6f01d25, 0x00100000, 0x00010001,
0x00100000, 0x00000000, 0x00010000, 0x00010001, 0x00010000, 0x00000000,
0x00010001, 0x00010001, 0x00010001, 0x00000000, 0x00000100, 0x01010001,
0x00000100, 0x01000000, 0x00000000, 0x00000000, 0x2a0aa9cb, 0x1d250000,
0x00000000, 0x00010000, 0x00000000, 0x00000000, 0x00000000, 0x00010000,
0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00010000, 0x00000000,
0x00000100, 0x00010000, 0x00000100, 0x00000000, 0x00000001, 0x00010000,
0x80000000, 0x00000000, 0xdd8e7ef0, 0x385d9d25, 0x00100000, 0x00008001,
0x00100000, 0x00000000, 0x80010000, 0x00008001, 0x80010000, 0x00000000,
0x00008001, 0x00008001, 0x00008001, 0x00000000, 0x00000080, 0x01008001,
0x00000080, 0x01000000, 0x00000000, 0x80018001, 0x00000000, 0x80010000,
0x00000000, 0x00000000, 0x950554e5, 0x8e928000, 0x00000000, 0x00008000,
0x00000000, 0x00000000, 0x80000000, 0x00008000, 0x80000000, 0x00000000,
0x00008000, 0x00008000, 0x00008000, 0x00000000, 0x00000080, 0x00008000,
0x00000080, 0x00000000, 0x00000000, 0x80008000, 0x00000000, 0x80000000,
0x00000000, 0x40008000, 0x00000000, 0x00000000, 0x91125415, 0x53963a4a,
0x00200000, 0x00000002, 0x00200000, 0x00000000, 0x00020000, 0x00000002,
0x00020000, 0x00000000, 0x00000002, 0x00000002, 0x00000002, 0x00000000,
0x00000000, 0x02000002, 0x00000000, 0x02000000, 0x00000000, 0x00020002,
0x00000000, 0x00020000, 0x00000000, 0x00010002, 0x00000000, 0x00010000,
0x80000000, 0x00000000, 0x48892a0a, 0xa9cb1d25, 0x00100000, 0x00000001,
0x00100000, 0x00000000, 0x00010000, 0x00000001, 0x00010000, 0x00000000,
0x00000001, 0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x01000001,
0x00000000, 0x01000000, 0x00000000, 0x00010001, 0x00000000, 0x00010000,
0x00000000, 0x00008001, 0x00000000, 0x00008000, 0x00000000, 0x00000002,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x80000000, 0x00000000, 0xb776d5f5, 0x5634e2db,
0xffefffff, 0xffffffff, 0xfff00000, 0x00000000, 0xfffeffff, 0xffffffff,
0xffff0000, 0x00000000, 0xfffffffe, 0xffffffff, 0xffffffff, 0x00000000,
0xffffffff, 0xfeffffff, 0xffffffff, 0xff000000, 0xffffffff, 0xfffeffff,
0xffffffff, 0xffff0000, 0xffffffff, 0xffff7fff, 0xffffffff, 0xffff8000,
0xffffffff, 0xfffffffe, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x6eedabea, 0xac69c5b6, 0xffdfffff, 0xfffffffe,
0xffe00000, 0x00000000, 0xfffdffff, 0xfffffffe, 0xfffe0000, 0x00000000,
0xfffffffd, 0xfffffffe, 0xfffffffe, 0x00000000, 0xffffffff, 0xfdfffffe,
0xffffffff, 0xfe000000, 0xffffffff, 0xfffdfffe, 0xffffffff, 0xfffe0000,
0xffffffff, 0xfffefffe, 0xffffffff, 0xffff0000, 0xffffffff, 0xfffffffc,
0xffffffff, 0xfffffffe, 0x00000000, 0x00000000, 0x00000000, 0x00000002,
0x80000000, 0x00000000, 0xb383d525, 0x1b389d25, 0x000fffff, 0xffff8001,
0x00100000, 0x00000000, 0x8000ffff, 0xffff8001, 0x80010000, 0x00000000,
0xffff8000, 0xffff8001, 0xffff8001, 0x00000000, 0xffffff80, 0x00ff8001,
0xffffff80, 0x01000000, 0xffffffff, 0x80008001, 0xffffffff, 0x80010000,
0xffffffff, 0xc0000001, 0xffffffff, 0xc0008000, 0xffffffff, 0xffff0002,
0xffffffff, 0xffff8001, 0x00000000, 0x00000000, 0x00000000, 0x00007fff,
0x00000000, 0x0000fffe, 0x00000000, 0x00000000, 0x6afaab1a, 0x716d8000,
0xffffffff, 0xffff8000, 0x00000000, 0x00000000, 0x7fffffff, 0xffff8000,
0x80000000, 0x00000000, 0xffff7fff, 0xffff8000, 0xffff8000, 0x00000000,
0xffffff7f, 0xffff8000, 0xffffff80, 0x00000000, 0xffffffff, 0x7fff8000,
0xffffffff, 0x80000000, 0xffffffff, 0xbfff8000, 0xffffffff, 0xc0000000,
0xffffffff, 0xffff0000, 0xffffffff, 0xffff8000, 0x00000000, 0x00000000,
0x00000000, 0x00008000, 0x00000000, 0x00010000, 0x00000000, 0x3fff8000,
0x80000000, 0x00000000, 0x1e7e803f, 0x8ca61d25, 0x000fffff, 0xffff0001,
0x00100000, 0x00000000, 0x0000ffff, 0xffff0001, 0x00010000, 0x00000000,
0xffff0000, 0xffff0001, 0xffff0001, 0x00000000, 0xffffff00, 0x00ff0001,
0xffffff00, 0x01000000, 0xffffffff, 0x00000001, 0xffffffff, 0x00010000,
0xffffffff, 0x7fff8001, 0xffffffff, 0x80008000, 0xffffffff, 0xfffe0002,
0xffffffff, 0xffff0001, 0x00000000, 0x00000000, 0x00000000, 0x0000ffff,
0x00000000, 0x0001fffe, 0x00000000, 0x7ffe8001, 0x00000000, 0x7fff8000,
0x00000000, 0x00000000, 0xd5f55634, 0xe2db0000, 0xffffffff, 0xffff0000,
0x00000000, 0x00000000, 0xffffffff, 0xffff0000, 0x00000000, 0x00000000,
0xfffeffff, 0xffff0000, 0xffff0000, 0x00000000, 0xfffffeff, 0xffff0000,
0xffffff00, 0x00000000, 0xfffffffe, 0xffff0000, 0xffffffff, 0x00000000,
0xffffffff, 0x7fff0000, 0xffffffff, 0x80000000, 0xffffffff, 0xfffe0000,
0xffffffff, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0x00010000,
0x00000000, 0x00020000, 0x00000000, 0x7fff0000, 0x00000000, 0x80000000,
0x00000000, 0xffff0000, 0x80000000, 0x00000000, 0x3ddf5eed, 0x84cb1d25,
0x000fffff, 0xff000001, 0x00100000, 0x00000000, 0x0000ffff, 0xff000001,
0x00010000, 0x00000000, 0xff000000, 0xff000001, 0xff000001, 0x00000000,
0xffff0000, 0x00000001, 0xffff0000, 0x01000000, 0xfffffeff, 0xff010001,
0xffffff00, 0x00010000, 0xffffff7f, 0xff008001, 0xffffff80, 0x00008000,
0xffffffff, 0xfe000002, 0xffffffff, 0xff000001, 0x00000000, 0x00000000,
0x00000000, 0x00ffffff, 0x00000000, 0x01fffffe, 0x0000007f, 0xfeff8001,
0x0000007f, 0xffff8000, 0x000000ff, 0xfeff0001, 0x000000ff, 0xffff0000,
0x00000000, 0x00000000, 0xf55634e2, 0xdb000000, 0xffffffff, 0xff000000,
0x00000000, 0x00000000, 0xffffffff, 0xff000000, 0x00000000, 0x00000000,
0xfeffffff, 0xff000000, 0xff000000, 0x00000000, 0xfffeffff, 0xff000000,
0xffff0000, 0x00000000, 0xfffffeff, 0xff000000, 0xffffff00, 0x00000000,
0xffffff7f, 0xff000000, 0xffffff80, 0x00000000, 0xffffffff, 0xfe000000,
0xffffffff, 0xff000000, 0x00000000, 0x00000000, 0x00000000, 0x01000000,
0x00000000, 0x02000000, 0x0000007f, 0xff000000, 0x00000080, 0x00000000,
0x000000ff, 0xff000000, 0x00000100, 0x00000000, 0x0000ffff, 0xff000000,
0x80000000, 0x00000000, 0xbc56e5ef, 0x15ff6759, 0xd24fffff, 0xa9cb1d25,
0xd2500000, 0x00000000, 0x1d24ffff, 0xa9cb1d25, 0x1d250000, 0x00000000,
0xa9cb1d24, 0xa9cb1d25, 0xa9cb1d25, 0x00000000, 0xffa9cb1c, 0xcecb1d25,
0xffa9cb1d, 0x25000000, 0xffffa9ca, 0xc6f01d25, 0xffffa9cb, 0x1d250000,
0xffffd4e5, 0x385d9d25, 0xffffd4e5, 0x8e928000, 0xffffffff, 0x53963a4a,
0xffffffff, 0xa9cb1d25, 0x00000000, 0x00000000, 0x00000000, 0x5634e2db,
0x00000000, 0xac69c5b6, 0x00002b1a, 0x1b389d25, 0x00002b1a, 0x716d8000,
0x00005634, 0x8ca61d25, 0x00005634, 0xe2db0000, 0x005634e2, 0x84cb1d25,
0x005634e2, 0xdb000000, 0x80000000, 0x00000000, 0x74756f10, 0x9f4f5297,
0xa0afffff, 0x48892a0b, 0xa0b00000, 0x00000000, 0x2a0affff, 0x48892a0b,
0x2a0b0000, 0x00000000, 0x48892a0a, 0x48892a0b, 0x48892a0b, 0x00000000,
0xff488929, 0x53892a0b, 0xff48892a, 0x0b000000, 0xffff4888, 0x72942a0b,
0xffff4889, 0x2a0b0000, 0xffffa443, 0xdd8eaa0b, 0xffffa444, 0x95058000,
0xfffffffe, 0x91125416, 0xffffffff, 0x48892a0b, 0x00000000, 0x00000000,
0x00000000, 0xb776d5f5, 0x00000001, 0x6eedabea, 0x00005bba, 0xb383aa0b,
0x00005bbb, 0x6afa8000, 0x0000b776, 0x1e7e2a0b, 0x0000b776, 0xd5f50000,
0x00b776d5, 0x3d892a0b, 0x00b776d5, 0xf5000000, 0x3dc7d297, 0x9f4f5297,
0x80000000, 0x00000000, 0x9ebe0ce5, 0xa9cb1d25, 0x000fffff, 0x00000001,
0x00100000, 0x00000000, 0x0000ffff, 0x00000001, 0x00010000, 0x00000000,
0x00000000, 0x00000001, 0x00000001, 0x00000000, 0xfeffffff, 0x01000001,
0xff000000, 0x01000000, 0xfffeffff, 0x00010001, 0xffff0000, 0x00010000,
0xffff7fff, 0x00008001, 0xffff8000, 0x00008000, 0xfffffffe, 0x00000002,
0xffffffff, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0xffffffff,
0x00000001, 0xfffffffe, 0x00007ffe, 0xffff8001, 0x00007fff, 0xffff8000,
0x0000fffe, 0xffff0001, 0x0000ffff, 0xffff0000, 0x00fffffe, 0xff000001,
0x00ffffff, 0xff000000, 0x5634e2da, 0xa9cb1d25, 0xb776d5f4, 0x48892a0b,
0x00000000, 0x00000000, 0x5634e2db, 0x00000000, 0xffffffff, 0x00000000,
0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000,
0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xfeffffff, 0x00000000,
0xff000000, 0x00000000, 0xfffeffff, 0x00000000, 0xffff0000, 0x00000000,
0xffff7fff, 0x00000000, 0xffff8000, 0x00000000, 0xfffffffe, 0x00000000,
0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x00000002, 0x00000000, 0x00007fff, 0x00000000, 0x00008000, 0x00000000,
0x0000ffff, 0x00000000, 0x00010000, 0x00000000, 0x00ffffff, 0x00000000,
0x01000000, 0x00000000, 0x5634e2db, 0x00000000, 0xb776d5f5, 0x00000000,
0xffffffff, 0x00000000, 0x80000000, 0x00000000, 0x2b642a0a, 0xa9cb1d25,
0x000f0000, 0x00000001, 0x00100000, 0x00000000, 0x00000000, 0x00000001,
0x00010000, 0x00000000, 0xffff0001, 0x00000001, 0x00000001, 0x00000000,
0xffff0000, 0x01000001, 0x00000000, 0x01000000, 0xffff0000, 0x00010001,
0x00000000, 0x00010000, 0x7fff0000, 0x00008001, 0x80000000, 0x00008000,
0xfffe0000, 0x00000002, 0xffff0000, 0x00000001, 0x00000000, 0x00000000,
0x0000ffff, 0xffffffff, 0x0001ffff, 0xfffffffe, 0x7ffeffff, 0xffff8001,
0x7fffffff, 0xffff8000, 0xfffeffff, 0xffff0001, 0xffffffff, 0xffff0000,
0xfffeffff, 0xff000001, 0xffffffff, 0xff000000, 0xe2daffff, 0xa9cb1d25,
0xd5f4ffff, 0x48892a0b, 0xfffeffff, 0x00000001, 0xffffffff, 0x00000000,
0x00000000, 0x00000000, 0xe2db0000, 0x00000000, 0xffff0000, 0x00000000,
0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0x00000000, 0x00000000,
0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000,
0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0x00000000, 0x00000000,
0x7fff0000, 0x00000000, 0x80000000, 0x00000000, 0xfffe0000, 0x00000000,
0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000,
0x00020000, 0x00000000, 0x7fff0000, 0x00000000, 0x80000000, 0x00000000,
0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000,
0x00000000, 0x00000000, 0xe2db0000, 0x00000000, 0xd5f50000, 0x00000000,
0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000,
0x80000000, 0x00000000, 0x76392a0a, 0xa9cb1d25, 0x00000000, 0x00000001,
0x00100000, 0x00000000, 0xfff10000, 0x00000001, 0x00010000, 0x00000000,
0xfff00001, 0x00000001, 0x00000001, 0x00000000, 0xfff00000, 0x01000001,
0x00000000, 0x01000000, 0xfff00000, 0x00010001, 0x00000000, 0x00010000,
0xfff00000, 0x00008001, 0x00000000, 0x00008000, 0xffe00000, 0x00000002,
0xfff00000, 0x00000001, 0x00000000, 0x00000000, 0x000fffff, 0xffffffff,
0x001fffff, 0xfffffffe, 0xffefffff, 0xffff8001, 0xffffffff, 0xffff8000,
0xffefffff, 0xffff0001, 0xffffffff, 0xffff0000, 0xffefffff, 0xff000001,
0xffffffff, 0xff000000, 0x2dafffff, 0xa9cb1d25, 0x5f4fffff, 0x48892a0b,
0xffefffff, 0x00000001, 0xffffffff, 0x00000000, 0xffef0000, 0x00000001,
0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0x2db00000, 0x00000000,
0xfff00000, 0x00000000, 0x00000000, 0x00000000, 0xfff00000, 0x00000000,
0x00000000, 0x00000000, 0xfff00000, 0x00000000, 0x00000000, 0x00000000,
0xfff00000, 0x00000000, 0x00000000, 0x00000000, 0xfff00000, 0x00000000,
0x00000000, 0x00000000, 0xfff00000, 0x00000000, 0x00000000, 0x00000000,
0xffe00000, 0x00000000, 0xfff00000, 0x00000000, 0x00000000, 0x00000000,
0x00100000, 0x00000000, 0x00200000, 0x00000000, 0xfff00000, 0x00000000,
0x00000000, 0x00000000, 0xfff00000, 0x00000000, 0x00000000, 0x00000000,
0xfff00000, 0x00000000, 0x00000000, 0x00000000, 0x2db00000, 0x00000000,
0x5f500000, 0x00000000, 0xfff00000, 0x00000000, 0x00000000, 0x00000000,
0xfff00000, 0x00000000, 0x00000000, 0x00000000, 0xfff00000, 0x00000000,
0x80000000, 0x00000000, 0x8a74d669, 0x9f4f5297, 0x4a7b1d24, 0x48892a0b,
0xa0b00000, 0x00000000, 0xd3d61d24, 0x48892a0b, 0x2a0b0000, 0x00000000,
0xf254472f, 0x48892a0b, 0x48892a0b, 0x00000000, 0xce13a64e, 0x53892a0b,
0x2448892a, 0x0b000000, 0xc6ef65ad, 0x72942a0b, 0x1d244889, 0x2a0b0000,
0x385d4168, 0xdd8eaa0b, 0x8e922444, 0x95058000, 0x53963a48, 0x91125416,
0xa9cb1d24, 0x48892a0b, 0x00000000, 0x00000000, 0x5634e2db, 0xb776d5f5,
0xac69c5b7, 0x6eedabea, 0x1b38f8df, 0xb383aa0b, 0x716ddbbb, 0x6afa8000,
0x8ca6d49b, 0x1e7e2a0b, 0xe2dbb776, 0xd5f50000, 0x858293fa, 0x3d892a0b,
0xdbb776d5, 0xf5000000, 0x53c739f0, 0x9f4f5297, 0x22ca6fa5, 0x36ad9c79,
0x6141f319, 0x48892a0b, 0xb776d5f5, 0x00000000, 0x7fc01d24, 0x48892a0b,
0xd5f50000, 0x00000000, 0x091b1d24, 0x48892a0b, 0x5f500000, 0x00000000,
0x80000000, 0x00000000, 0xc8892a0a, 0xa9cb1d25, 0x80100000, 0x00000001,
0x00100000, 0x00000000, 0x80010000, 0x00000001, 0x00010000, 0x00000000,
0x80000001, 0x00000001, 0x00000001, 0x00000000, 0x80000000, 0x01000001,
0x00000000, 0x01000000, 0x80000000, 0x00010001, 0x00000000, 0x00010000,
0x80000000, 0x00008001, 0x00000000, 0x00008000, 0x00000000, 0x00000002,
0x80000000, 0x00000001, 0x00000000, 0x00000000, 0x7fffffff, 0xffffffff,
0xffffffff, 0xfffffffe, 0x7fffffff, 0xffff8001, 0xffffffff, 0xffff8000,
0x7fffffff, 0xffff0001, 0xffffffff, 0xffff0000, 0x7fffffff, 0xff000001,
0xffffffff, 0xff000000, 0x7fffffff, 0xa9cb1d25, 0x7fffffff, 0x48892a0b,
0x7fffffff, 0x00000001, 0xffffffff, 0x00000000, 0x7fff0000, 0x00000001,
0xffff0000, 0x00000000, 0x7ff00000, 0x00000001, 0xfff00000, 0x00000000,
0x29cb1d24, 0x48892a0b])
(defn to32Bits [arr32]
(dotimes [i (alength arr32)]
(aset arr32 i (bit-and (aget arr32 i) 0xFFFFFFFF))))
(defn test-mul []
(to32Bits TEST_BITS)
(to32Bits TEST_MUL_BITS)
(let [count (array 0)]
(doseq [i (range 0 (alength TEST_BITS) 2)]
(let [vi (long/fromBits (aget TEST_BITS (inc i)) (aget TEST_BITS i))]
(doseq [j (range 0 i 2)]
(let [vj (long/fromBits (aget TEST_BITS (inc j)) (aget TEST_BITS j))
result (* vi vj)]
(when-not (identical? (.-high_ result) (aget TEST_MUL_BITS (aget count 0)))
(throw (js/Error. (str "High Multiplying " vi " and " vj " expected " (aget TEST_MUL_BITS (aget count 0)) " got " (.-high_ result)))))
(aset count 0 (inc (aget count 0)))
(when-not (identical? (.-low_ result) (aget TEST_MUL_BITS (aget count 0)))
(throw (js/Error. (str "Low Multiplying " vi " and " vj " expected " (aget TEST_MUL_BITS (aget count 0)) " got " (.-low_ result)))))
(aset count 0 (inc (aget count 0)))))))))
(test-mul)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.