Révision 254 pobysoPythonSage/src/sageSLZ/runSLZ-53-binade.sage

runSLZ-53-binade.sage (revision 254)
90 90
        binade = int(eval(sys.argv[index]))
91 91
    elif index == 5:
92 92
        signAsString = sys.argv[index]
93
        signAsString = signAsString.lower()
93 94
    elif index == 6:
94 95
        debugMode = sys.argv[index].upper()
95 96
        debugMode = (debugMode == "DEBUG")
96 97
# Done with command line arguments collection.
97 98
#
98
## Debug printing
99
print "degree         :", degree
100
print "alpha          :", alpha
101
print "htrn           :", htrn
102
print "binade         :", binade
103
print "sign           :", signAsString
104
print "debug mode     :", debugMode
105
print
106
#
107 99
## Set the terminal window title.
108 100
terminalWindowTitle = ['stt', 
109 101
                        str(degree), 
......
114 106
call(terminalWindowTitle)
115 107
#
116 108
binadeUlp    = 2^(binade - precision + 1)
117
signAsString = signAsString.lower()
118 109
if signAsString == "pos": 
119 110
    lowerBound   = RRR(2^binade)
120 111
    upperBound   = RRR(2^(binade+1)) - binadeUlp
121 112
elif signAsString == "neg":
122 113
    lowerBound  = -RRR(2^(binade+1)) + binadeUlp
123 114
    upperBound  =  -RRR(2^binade)
124
    print lowerBound
125
    print upperBound
126 115
else:
127 116
    exceptionErrorMess = "\"" + signAsString + "\" is an invalid sign." \
128 117
    ". Aborting!\n"
129 118
    raise Exception(exceptionErrorMess)
119
#
120
## Debug printing
121
print "degree         :", degree
122
print "alpha          :", alpha
123
print "htrn           :", htrn
124
print "binade         :", binade
125
print "lower bound    :", lowerBound.str(truncate=False)
126
print "upper bound    :", upperBound.str(truncate=False)
127
print "sign           :", signAsString
128
print "debug mode     :", debugMode
129
print
130
#
130 131
srs_run_SLZ_v05(inputFunction=func, 
131 132
                     inputLowerBound         = lowerBound, 
132 133
                     inputUpperBound         = upperBound, 

Formats disponibles : Unified diff