@@ -22,20 +22,20 @@ def getFtoIBounds(floatBits, intBits, signed):
22
22
23
23
class SwiftFloatType (object ):
24
24
25
- def __init__ (self , name , significandBits , exponentBits , significandSize , totalBits ):
25
+ def __init__ (self , name , cFuncSuffix , significandBits , exponentBits , significandSize , totalBits ):
26
26
self .stdlib_name = name
27
+ self .cFuncSuffix = cFuncSuffix
27
28
self .significand_bits = significandBits
28
29
self .significand_size = significandSize
29
30
self .exponent_bits = exponentBits
30
31
self .explicit_significand_bits = significandBits + 1
31
32
self .bits = totalBits
32
33
33
-
34
34
def floating_point_bits_to_type ():
35
35
return {
36
- 32 : SwiftFloatType (name = "Float" , significandBits = 23 , exponentBits = 8 , significandSize = 32 , totalBits = 32 ),
37
- 64 : SwiftFloatType (name = "Double" , significandBits = 52 , exponentBits = 11 , significandSize = 64 , totalBits = 64 ),
38
- 80 : SwiftFloatType (name = "Float80" , significandBits = 63 , exponentBits = 15 , significandSize = 64 , totalBits = 80 ),
36
+ 32 : SwiftFloatType (name = "Float" , cFuncSuffix = "f" , significandBits = 23 , exponentBits = 8 , significandSize = 32 , totalBits = 32 ),
37
+ 64 : SwiftFloatType (name = "Double" , cFuncSuffix = "" , significandBits = 52 , exponentBits = 11 , significandSize = 64 , totalBits = 64 ),
38
+ 80 : SwiftFloatType (name = "Float80" , cFuncSuffix = "l" , significandBits = 63 , exponentBits = 15 , significandSize = 64 , totalBits = 80 ),
39
39
}
40
40
41
41
def all_floating_point_types ():
0 commit comments