[libre-riscv-dev] bug in sfpy on FP16 integer initialisation
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Wed Jul 17 08:25:36 BST 2019
On Wed, Jul 17, 2019 at 8:22 AM Jacob Lifshay <programmerjake at gmail.com> wrote:
> bug resolved as instance of forgetting to read the docs, see comments on
> bugzilla
:)
still need your help, bill - i'm currently investigating the addition
of uin32_to_f32 (etc.) explicitly to sfpy.float:
--- a/sfpy/float.pyx
+++ b/sfpy/float.pyx
@@ -676,6 +676,11 @@ cdef class Float32:
cdef cfloat.float64_t f = cfloat.f32_to_f64(self._c_float)
return Float64.from_c_float(f)
+# integer conversions
+
+cpdef Float32 ui32_to_f32(uint32_t value):
+ cdef cfloat.float32_t f = cfloat.ui32_to_f32(value)
+ return Float32.from_c_float(f)
More information about the libre-riscv-dev
mailing list