SQLite Forum

Fail to calculate long expression
Login
I'm not the OP, but, long story short: I'm pretty sure the issue boils down to how SQLite handles modulus operations on floating point values:

In Python (and a other languages I know of that allow `%` on a floating point value):

```
>>> 0.1 % 2.0
0.1
>>> 1.0 / (0.1 % 2.0)
10.0
```

Where as, in SQLite:

```
sqlite> select 0.1 % 2.0;
0.0
sqlite> select 1.0 / (0.1 % 2.0);

sqlite>
```