SQLite Forum

Fail to calculate long expression
Login
Each language defines its own set of casting rules and its operators semantics.

Your use of modulo (%) is what makes the results so different.