Comments (6)
See #116
from qcbor.
thanks for the comment. I will look into it, but it will take a week or so.
from qcbor.
I will keep looking at it, but what happened when you defined QCBOR_DISABLE_FLOAT_HW_USE?
With QCBOR_DISABLE_FLOAT_HW_USE it should compile and run and be able to decode floating point numbers. What it can't do is convert floating point to integer, double to float and handle floating point dates. Most of these are pretty uncommon needs.
This only disables QCBOR's use of HW floating point. Your application can still use it.
Encoding and decoding CBOR floating point doesn't require floating point HW or even a library. It's essentially a cast of an int * to a float *. A good compiler should be able to do this without floating point library or HW.
from qcbor.
That does make sense and fits with what I found. In my opinion the functions that require fenv.h
should probbably be removed if the QCBOR_DISABLE_FLOAT_HW_USE
define is added as to prevent users from accidentally using them and getting weird crashes at run time. The documentation could also explain in further detail the functions that are disabled with the addition of QCBOR_DISABLE_FLOAT_HW_USE
. Other than that this seems to be less of a problem than I thought of it at first, since its just those specific niche functioins which are impacted.
from qcbor.
Yes, agree with you on the QCBOR_DISABLE_FLOAT_HW_USE documentation.I tried reading the documentation (that I wrote) to understand, but had to read the source code (that I wrote) to figure it out. :-)
I believe the functions that need fenv.h will return error codes when QCBOR_DISABLE_FLOAT_HW_USE is defined. They still do useful stuff even with QCBOR_DISABLE_FLOAT_HW_USE so they shouldn't be removed.
I will update the documentation and do some more cross-checking in the next week or so.
Thanks very much for filing the issue and checking back!
from qcbor.
Thanks for the review!
from qcbor.
Related Issues (20)
- Bugs in ieee754.c HOT 12
- Fail to decode an indefinite-length string with a zero-length first chunk. HOT 1
- BstrWrapErrorTest failing on ARM FVP AN521 (release v1.0) HOT 2
- Build error if ARM microlib is used HOT 3
- Enhancement: release QCBOR as MDK Software Pack
- How to decode null terminated string? HOT 2
- UsefulBuf.h gives warnings when used with MSVC HOT 4
- ENCRYPTO should be ENCRYPT0 HOT 1
- Need BKM to use CBOR HOT 2
- Writing an empty null buffer triggers undefined behaviour. HOT 2
- Streaming encoding on the fly HOT 4
- CMake should support installation
- How to use cmake's disable float options? HOT 4
- Warnings when building release tag version 1.2 HOT 9
- Backward compatibility is broken HOT 4
- License file/Github setting HOT 2
- QCBOR should have QCBORDecode_SetError() HOT 4
- Provide public API to determine decoder item offsets HOT 6
- QCBORDecode_EnterArrayFromMapN should return array item
- QCBOREncode_Finish() should set internal error state HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qcbor.