diff --git a/tests2/Makefile b/tests2/Makefile index d2a5ebc..6fb00ec 100644 --- a/tests2/Makefile +++ b/tests2/Makefile @@ -1,6 +1,11 @@ -#CC = g++ +#CC = g++6 +#CFLAGS = -Wall -pedantic -O3 -s -I.. -Wl,-rpath=/usr/local/lib/gcc6 +#CFLAGS = -Wall -pedantic -O3 -DTTMATH_NOASM -s -I.. -Wl,-rpath=/usr/local/lib/gcc6 + CC = clang++ -CFLAGS = -Wall -pedantic -O2 -I.. +CFLAGS = -Wall -pedantic -O3 -s -I.. +#CFLAGS = -Wall -pedantic -O3 -DTTMATH_NOASM -s -I.. + .SUFFIXES: .cpp .o diff --git a/ttmath/ttmath.h b/ttmath/ttmath.h index 94630a7..a064ad3 100644 --- a/ttmath/ttmath.h +++ b/ttmath/ttmath.h @@ -873,7 +873,8 @@ namespace ttmath if( err ) *err = err_improper_argument; - return result; // NaN is set by default + result.SetZeroNan(); + return result; } if( x.IsSign() ) @@ -2710,7 +2711,7 @@ namespace ttmath if( n.IsZero() ) { err_tmp = err_improper_argument; - result.SetNan(); + result.SetZeroNan(); } else {