SQLite supports mathematical functions like sin() and cos(), however they need to be explicitly enabled during compile time with the -DSQLITE_ENABLE_MATH_FUNCTIONS flag:
However this doesn't seem to be the case for the binary Qt (open source) releases, as "empirical tests" with both Qt 5.15.2 and the latest Qt 6.4 on both Windows and macOS have suggested (in each case the Qt stock binary open source distribution was used, as aquired via the Qt Maintenance Tool).
So the suggestion here would be to compile and provide the SQLite Qt plugin in upcoming binary releases (e.g. Qt 6.5 onwards) with the math functions enabled ( -DSQLITE_ENABLE_MATH_FUNCTIONS), if at this point the omission of this compiler flag was not a concious decision (e.g. to reduce the plugin size to a minimum).
While I cannot back this up, but I believe adding those additions math functions would merely affect the plugin size, but not the execution speed of SQL executed against SQLite (especially for existing SQL statements that wouldn't make use of those math functions like sin(), cos() etc.).
|For Gerrit Dashboard: QTBUG-108016|
|440378,4||SQLite: enable default features for the built-in version||dev||qt/qtbase||Status: MERGED||+2||0|