1#! /usr/bin/bc -q 2 3t[0] = 0 4t[1] = 0.5 5t[2] = 1 6t[3] = 1.5 7t[4] = 1.74 8t[5] = 2 9t[6] = 3.2345 10t[7] = 100 11t[8] = -0.5 12t[9] = -1 13t[10] = -1.5 14t[11] = -1.74 15t[12] = -2 16t[13] = -3.2345 17t[14] = -100 18t[15] = 0.0000000000000000 19 20l = 16 21 22a[0] = t[0] 23 24for (i = 1; i < l; ++i) { 25 a[i * 2 - 1] = t[i] 26 a[i * 2] = -t[i] 27} 28 29l *= 2 30l -= 1 31 32for (i = 0; i < l; ++i) { 33 for (j = 0; j < l; ++j) { 34 print "j(", a[i] 35 if (a[i] == 0 && scale(a[i]) > 0) print ".0000000000000000" 36 print ", ", a[j] 37 if (a[j] == 0 && scale(a[j]) > 0) print ".0000000000000000" 38 print ")\n" 39 } 40} 41 42# These are specific tests that bc could not pass at one time. 43print "j(3, 0.75)\n" 44print "scale = 0; j(40, 0.75)\n" 45 46print "halt\n" 47 48halt 49