From 164b272fedbcd05d9f4ef22d6e0ad13fb8a897a1 Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 25 Jul 2018 14:07:14 -0700 Subject: [PATCH] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d815eec..d1814cf 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,10 @@ softfloat and softposit in Python * support for softposit posit8, quire8, posit16, and quire16 * no softfloat support yet, still WIP + ## Demo ``` ->>> from posit import Posit16, Quire16 +>>> from sfpy import Posit16, Quire16 >>> Posit16(1.3) + Posit16(1.4) Posit16(2.7001953125) >>> x = Posit16(7) @@ -22,7 +23,12 @@ Quire16(22.0) uA.ui : 29056 Posit16(22.0) ``` + +For a basic performance test of the API, try: `python timing.py` + ## Building The cython module can be built in place in the usual way: `python setup.py build_ext --inplace` This requires the submodules to be checked out, and the static library `SoftPosit/build/Linux-x86_64-GCC/softposit.a` to be built. Note that in order for cython to be able to build the shared object for the module, the static library must be compiled with -fPIC, which currently requires modifying the appropriate Makefile manually. + +The package can also be installed to a local Python distribution with pip, i.e. `pip install .` using the appropriate pip. -- 2.30.2