-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Dynamic::Var
silently loses precision on int->float conversion
#4423
Comments
aleks-f
changed the title
Dynamic:Var silently loses precision on int->float conversion
Jan 29, 2024
Dynamic::Var
silently loses precision on int->float conversion
Should Poco consider migrating to |
aleks-f
added a commit
that referenced
this issue
Jan 29, 2024
|
aleks-f
added a commit
that referenced
this issue
Jan 29, 2024
aleks-f
added a commit
that referenced
this issue
Jan 31, 2024
* feat(format): Add string_view format type spec #4409 * chore(Types): add demangle * fix(Data): Oracle failing ODBC tests #4368 * fix some CQL and fuzz warnings; add Var::typeName() * fix(build): -std=c++17 and c11 * fix windows build * fix(Foundation): test apps vs projects c++17 * chore(build): remove uneeded compiler flag * fix(VarHolder): number of digits range check for int->float conversion (reported by CIFuzz) * fix(test): CIFuzz * fix(CIFuzz): another attempt * fix(progen): add LanguageStandard (stdcpp17, stdc11); regenerate vs170 projects * fix(CiFuzz): add int->float precision loss barrier; fix erroneous number of digits logic * enh(Var): silent loss of precision on int->float conversion #4423 * enh(Var): silent loss of precision on int->float conversion #4423 * chore(build): remove old build files * chore: fix missing parens warning * enh(Thread_POSIX): prevent double-joining; add error description to exceptions * fix(Data): unresolved Column<long> linkage in test * fix(demangle): determine type name from template parameter; add eror diagnostic for demangling failures * chore(buildwin): remove old vs versions from build and progen scripts; update documentation * chore(buildwin): remove leftover closing curly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
As stated - on integral to floating point conversion, loss of precision is suppressed and ignored.
To Reproduce
Assign an
int
value occupying more than 23 bits (on most platforms) to afloat
.Expected behavior
Precision loss should be allowed (as is in the language type system). However, it should be possible to enforce strict no-precision-loss policy for integral to floating point conversions.
The text was updated successfully, but these errors were encountered: