Giter Site home page Giter Site logo

Comments (6)

laurencelundblade avatar laurencelundblade commented on May 22, 2024 1

See #116

from qcbor.

laurencelundblade avatar laurencelundblade commented on May 22, 2024

thanks for the comment. I will look into it, but it will take a week or so.

from qcbor.

laurencelundblade avatar laurencelundblade commented on May 22, 2024

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.

DusterTheFirst avatar DusterTheFirst commented on May 22, 2024

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.

laurencelundblade avatar laurencelundblade commented on May 22, 2024

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.

laurencelundblade avatar laurencelundblade commented on May 22, 2024

Thanks for the review!

from qcbor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.