From aad580f51e7ffc32966507a9897ec575c389e3e6 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Wed, 23 Oct 2019 16:09:19 +0000 Subject: [PATCH] in ASin() and Gamma() there is used SetZeroNan() to suppress a warning about an uninitialized variable (for gcc) git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@1229 e52654a7-88a9-db11-a3e9-0013d4bc506e --- tests2/Makefile | 9 +++++++-- ttmath/ttmath.h | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) 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 {