+################################################################################
+# run_test_add_scale #
+################################################################################
+
+def run_test_add_scale(skip=0)
+ length_a_B = skip+1
+ length_b_B = skip+1
+ begin
+ $size = length_a_B
+ (0..4).each do |i|
+ scales = [0, 300]
+ 16.times { scales << rand(301) }
+ scales.sort!
+ scales.each do |scale|
+ a = rand(256**length_a_B)
+ b = rand(256**length_a_B)
+ v = add_scale_test(a, b, scale)
+ screen_progress(v)
+ v = add_scale_test(b, a, scale)
+ screen_progress(v)
+ end
+ end
+ (0..4).each do |i|
+ scales = [0, 300]
+ 16.times { scales << rand(301) }
+ scales.sort!
+ scales.each do |scale|
+ b_size = rand(length_b_B+1)+1
+ a = rand(256**length_a_B)
+ b = rand(256**b_size)
+ v = add_scale_test(a, b, scale)
+ screen_progress(v)
+ v = add_scale_test(b, a, scale)
+ screen_progress(v)
+ end
+ end
+ length_a_B += 10
+ length_b_B += 10
+ end while length_a_B<4096/8
+end
+
+def run_test_add_scale_dummy(skip=0)
+ length_a_B = skip+1
+ length_b_B = skip+1
+ begin
+ $size = length_a_B
+ (0..4).each do |i|
+ scales = [0, 300]
+ 16.times { scales << rand(301) }
+ scales.sort!
+ scales.each do |scale|
+ a = rand(256**length_a_B)
+ b = rand(256**length_a_B)
+ v = add_scale_test_dummy(a, b, scale)
+ v = add_scale_test_dummy(b, a, scale)
+ end
+ end
+ (0..4).each do |i|
+ scales = [0, 300]
+ 16.times { scales << rand(301) }
+ scales.sort!
+ scales.each do |scale|
+ b_size = rand(length_b_B+1)
+ a = rand(256**length_a_B)
+ b = rand(256**b_size)
+ v = add_scale_test_dummy(a, b, scale)
+ v = add_scale_test_dummy(b, a, scale)
+ end
+ end
+ length_a_B += 10
+ length_b_B += 10
+ end while length_a_B<4096/8
+end
+