On 2018-03-12 18:53:37 +0100, Marco Bodrato wrote: > double > mpz_get_d (const mpz_t u) > { > static int c = 0; > static int __initialized = 0; > > if (__initialized != 1) { > c = gmp_tests_dbl_mant_bits (); > *((volatile int *) &__initialized) = 1; > }
FYI, this is not thread-safe. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel