-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fractional units #27
base: master
Are you sure you want to change the base?
Fractional units #27
Conversation
Add predicate function to test if a unit is compatible with a string representation of the unit. This allows you to add constrains to unit columns.
|
Hi, |
Plane-strain fracture toughness (K_ic) has the SI units MPa m^.5. Its definition and measurement are given in ASTM E399. |
Added a predicate function that, given a text parameter, will tell you if that is parseable unit.
Also added a function that prints out the value of UnitShifted as a double array...
|
TBH I need some time to think about this. Parts of me says "wtf physics doesn't like these", parts says "yeah people do use them". Then there's also the issue with breaking the on-disk format for people who have actually stored data in "unit" columns. I was actually pondering to halve the bit width of exponents to have room for more basic units (like € or $), this change would best be done with this one in parallel. |
…es to be in terms of cycles
A few more ideas that could be useful: add base unit for pixel and cycle. I changed the unit definitions for angle and solid angles to be defined in terms of the new cycle base unit. With these, it's possible to do things like this ...
|
This is an idea to allow fractional dimension units that are powers of 1/2 or 1/4. We use the same amount of storage and just shift all the unit definitions to the left two bits and use those two bits as the binary fractions .5 and .25.
For example we can represent fracture toughness this way...