correcting use of uint32_t where uint64_t should be used master
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 18 Jul 2019 13:44:12 +0000 (14:44 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 18 Jul 2019 13:44:12 +0000 (14:44 +0100)
sfpy/float.pyx

index 7367696b916a37dca42c9e8d71e21e93bb4822b5..d1e7134b2e18563e07fcc6e5b88a5f0aef1150db 100644 (file)
@@ -742,31 +742,31 @@ cpdef int32_t f64_to_i32(Float64 a1):
 
 # u/i64 <-> f16
 
-cpdef Float16 i64_to_f16(int32_t value):
+cpdef Float16 i64_to_f16(int64_t value):
     cdef cfloat.float16_t f = cfloat.i64_to_f16(value)
     return Float16.from_c_float(f)
 
-cpdef Float16 ui64_to_f16(uint32_t value):
+cpdef Float16 ui64_to_f16(uint64_t value):
     cdef cfloat.float16_t f = cfloat.ui64_to_f16(value)
     return Float16.from_c_float(f)
 
-cpdef uint32_t f16_to_ui64(Float16 a1):
-    cdef uint32_t i = cfloat.f16_to_ui64(a1._c_float,
+cpdef uint64_t f16_to_ui64(Float16 a1):
+    cdef uint64_t i = cfloat.f16_to_ui64(a1._c_float,
                                        cfloat.softfloat_roundingMode, True)
     return i
 
-cpdef int32_t f16_to_i64(Float16 a1):
-    cdef int32_t i = cfloat.f16_to_i64(a1._c_float,
+cpdef int64_t f16_to_i64(Float16 a1):
+    cdef int64_t i = cfloat.f16_to_i64(a1._c_float,
                                        cfloat.softfloat_roundingMode, True)
     return i
 
 # u/i64 <-> f32
 
-cpdef Float32 i64_to_f32(int32_t value):
+cpdef Float32 i64_to_f32(int64_t value):
     cdef cfloat.float32_t f = cfloat.i64_to_f32(value)
     return Float32.from_c_float(f)
 
-cpdef Float32 ui64_to_f32(uint32_t value):
+cpdef Float32 ui64_to_f32(uint64_t value):
     cdef cfloat.float32_t f = cfloat.ui64_to_f32(value)
     return Float32.from_c_float(f)