mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Added comment on floating point precision compile option for MSVC. (CVS 5448)
FossilOrigin-Name: e20f2b8c6a13aa826703441cf340d0ee03bf9f64
This commit is contained in:
12
src/util.c
12
src/util.c
@@ -14,7 +14,7 @@
|
||||
** This file contains functions for allocating memory, comparing
|
||||
** strings, and stuff like that.
|
||||
**
|
||||
** $Id: util.c,v 1.238 2008/07/11 16:19:10 drh Exp $
|
||||
** $Id: util.c,v 1.239 2008/07/22 05:15:53 shane Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <stdarg.h>
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
/*
|
||||
** Return true if the floating point value is Not a Number.
|
||||
** Return true if the floating point value is Not a Number (NaN).
|
||||
*/
|
||||
int sqlite3IsNaN(double x){
|
||||
/* This NaN test sometimes fails if compiled on GCC with -ffast-math.
|
||||
@@ -33,6 +33,14 @@ int sqlite3IsNaN(double x){
|
||||
** -O option since it can result in incorrect output for programs
|
||||
** which depend on an exact implementation of IEEE or ISO
|
||||
** rules/specifications for math functions.
|
||||
**
|
||||
** Under MSVC, this NaN test may fail if compiled with a floating-
|
||||
** point precision mode other than /fp:precise. From the MSDN
|
||||
** documentation:
|
||||
**
|
||||
** The compiler [with /fp:precise] will properly handle comparisons
|
||||
** involving NaN. For example, x != x evaluates to true if x is NaN
|
||||
** ...
|
||||
*/
|
||||
#ifdef __FAST_MATH__
|
||||
# error SQLite will not work correctly with the -ffast-math option of GCC.
|
||||
|
||||
Reference in New Issue
Block a user