SQLite Forum

Bug: MSVC uses intrinsic versions of ceil and floor for floating-point modes precise and fast (diagnosed)
Login
I will note, however, that I have had my own "compiled in" extension which provided all the builtin math functions since forever, called by essentially the same method (calling a generic SQLite3 interface function and passing a pointer to the math function in the user_data).  When the these became available I simply added an #if !defined(SQLITE_MATH_FUNCTIONS) so that the builtins were used and my addins were not registered.

That code is here <http://www.dessus.com/files/sqlmath.c>


```
SQLite version 3.35.0 2020-12-31 19:46:00
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> select * from pragma_compile_options;
┌────────────────────────────────┐
│        compile_options         │
├────────────────────────────────┤
│ ALLOW_COVERING_INDEX_SCAN      │
│ ALLOW_URI_AUTHORITY            │
│ COMPILER=msvc-1928             │
│ DEFAULT_CACHE_SIZE=-1048576    │
│ DEFAULT_FOREIGN_KEYS           │
│ DEFAULT_PAGE_SIZE=4096         │
│ DEFAULT_RECURSIVE_TRIGGERS     │
│ DEFAULT_WAL_AUTOCHECKPOINT=256 │
│ DEFAULT_WAL_SYNCHRONOUS=1      │
│ DEFAULT_WORKER_THREADS=8       │
│ ENABLE_8_3_NAMES=1             │
│ ENABLE_API_ARMOR               │
│ ENABLE_BYTECODE_VTAB           │
│ ENABLE_COLUMN_METADATA         │
│ ENABLE_COLUMN_USED_MASK        │
│ ENABLE_COSTMULT                │
│ ENABLE_CURSOR_HINTS            │
│ ENABLE_DBSTAT_VTAB             │
│ ENABLE_FTS3                    │
│ ENABLE_FTS3_PARENTHESIS        │
│ ENABLE_FTS4                    │
│ ENABLE_FTS5                    │
│ ENABLE_JSON1                   │
│ ENABLE_LOAD_EXTENSION          │
│ ENABLE_LOCKING_STYLE=1         │
│ ENABLE_MATH_FUNCTIONS          │
│ ENABLE_MEMORY_MANAGEMENT       │
│ ENABLE_PREUPDATE_HOOK          │
│ ENABLE_RBU                     │
│ ENABLE_RTREE                   │
│ ENABLE_SESSION                 │
│ ENABLE_SNAPSHOT                │
│ ENABLE_STAT4                   │
│ ENABLE_STMT_SCANSTATUS         │
│ ENABLE_UNKNOWN_SQL_FUNCTION    │
│ ENABLE_UPDATE_DELETE_LIMIT     │
│ EXPLAIN_ESTIMATED_ROWS         │
│ EXTRA_INIT=core_init           │
│ LIKE_DOESNT_MATCH_BLOBS        │
│ MAX_ATTACHED=15                │
│ MAX_TRIGGER_DEPTH=100          │
│ MAX_WORKER_THREADS=16          │
│ SOUNDEX                        │
│ STAT4_SAMPLES=64               │
│ TEMP_STORE=1                   │
│ THREADSAFE=1                   │
│ USE_DATETIME_NEW               │
│ USE_PRECISE_TIME               │
│ USE_URI                        │
└────────────────────────────────┘
sqlite>
```

Also note that I build using nmake and not the hooey-gooey (if you can even use the hooey-gooey -- I know not because I don't use hooey-gooey's).