fix: support large min/max values without precision loss#152
fix: support large min/max values without precision loss#152trnila wants to merge 8 commits intooxibus:mainfrom
Conversation
Min/max values are no longer represented as f64 internally that caused precision loss or value that couldnt fit in u64. For example 2**64 was represented as 18446744073709552000 instead of 18446744073709551615.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
I did a bunch of small changes - see what you think. I still feel i don't have enough domain expertise to make judgement calls on what it actually should do - i.e. if multiplexor is |
|
Domain expert advise is needed: What should be the DBC multiplexer behavior if the min/max values are signed or floating point values? |
|
Thanks @nyurik - changes looks fine although I haven't personally used muxed messages deeply. |
|
The issue is that we must define our behavior for all of these - and it doesn'tt matter if we have seen these or not: in other words, it could be totally ok to generate an error if the user used Int or Double - which would avoid the problem completely - if that's the valid behavior. I am just not certain we should automatically fallback to u16::MAX if the user gave -1 as multiplexor - but I'm not an expert in this, so no idea what is "right" |
Min/max values are no longer represented as
f64internally that caused precision loss or value that couldnt fit inu64.For example
2**64was represented as18446744073709552000instead of18446744073709551615.