Coder Social home page Coder Social logo

Comments (2)

vpochapuis avatar vpochapuis commented on June 30, 2024

I think I might found my answer, it must be related to the normalization to the base unit.

A consequence of normalizing values to the base unit is that some values may not be able to be represented or can't be precisely represented for floating point and rational underlying storage types. For example if the base unit of length is meter and the underlying storage type is i32 then values like 1 centimeter or 1.1 meter cannot be represented. 1 centimeter is normalized to 0.01 meter which can't be stored in an i32. uom only allows units to be used safely. Users of this library will still need to be aware of implementation details of the underlying storage type including limits and precision.

I should try to find and understand how to set a lower base unit for my Electrical Quantities.

If you have any insight on the usage of the ISQ! macro to set the base unit, it would be very welcome!

from uom.

vpochapuis avatar vpochapuis commented on June 30, 2024

Ok I found the necessary information at:

ISQ! crate documentation

Repository example

Hope it can also help other new people having the same issue.

from uom.

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.