projects
/
sfpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
the beginnings of posit interface
[sfpy.git]
/
posit.pyx
diff --git a/posit.pyx
b/posit.pyx
new file mode 100644
(file)
index 0000000..
3bbeabf
--- /dev/null
+++ b/
posit.pyx
@@ -0,0
+1,11
@@
+cimport cposit
+
+cdef class Posit8:
+ cdef cposit.posit8_t _c_posit
+
+ def __cinit__(self):
+ self._c_posit = cposit.i64_to_p8(1)
+
+ cpdef show(self):
+ print(cposit.p8_to_i64(self._c_posit))
+