@@ -111,14 +111,18 @@ def print_proper_powers():
111
111
print ("pub const MIN_E: i16 = {};" .format (MIN_E ))
112
112
print ("pub const MAX_E: i16 = {};" .format (MAX_E ))
113
113
print ()
114
+ print ("#[rustfmt::skip]" )
114
115
typ = "([u64; {0}], [i16; {0}])" .format (len (powers ))
115
- print ("pub const POWERS: " , typ , " = ([" , sep = '' )
116
+ print ("pub const POWERS: " , typ , " = (" , sep = '' )
117
+ print (" [" )
116
118
for z in powers :
117
- print (" 0x{:x}," .format (z .sig ))
118
- print ("], [" )
119
+ print (" 0x{:x}," .format (z .sig ))
120
+ print (" ]," )
121
+ print (" [" )
119
122
for z in powers :
120
- print (" {}," .format (z .exp ))
121
- print ("]);" )
123
+ print (" {}," .format (z .exp ))
124
+ print (" ]," )
125
+ print (");" )
122
126
123
127
124
128
def print_short_powers (num_bits , significand_size ):
@@ -127,6 +131,7 @@ def print_short_powers(num_bits, significand_size):
127
131
max_e = int (ceil (log (max_sig , 5 )))
128
132
e_range = range (max_e )
129
133
typ = "[f{}; {}]" .format (num_bits , len (e_range ))
134
+ print ("#[rustfmt::skip]" )
130
135
print ("pub const F" , num_bits , "_SHORT_POWERS: " , typ , " = [" , sep = '' )
131
136
for e in e_range :
132
137
print (" 1e{}," .format (e ))
0 commit comments