comparison lib/vasnprintf.c @ 9489:940605ef6e9e

Don't abort if the 'long double' type has excess precision.
author Bruno Haible <bruno@clisp.org>
date Mon, 26 Nov 2007 21:13:57 +0100
parents 7bbddc0fae4a
children a113e473cc98
comparison
equal deleted inserted replaced
9488:57c865858db0 9489:940605ef6e9e
869 y -= lo; 869 y -= lo;
870 if (!(y >= 0.0L && y < 1.0L)) 870 if (!(y >= 0.0L && y < 1.0L))
871 abort (); 871 abort ();
872 m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; 872 m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo;
873 } 873 }
874 #if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess
875 precision. */
874 if (!(y == 0.0L)) 876 if (!(y == 0.0L))
875 abort (); 877 abort ();
878 #endif
876 /* Normalise. */ 879 /* Normalise. */
877 while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) 880 while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0)
878 m.nlimbs--; 881 m.nlimbs--;
879 *mp = m; 882 *mp = m;
880 *ep = exp - LDBL_MANT_BIT; 883 *ep = exp - LDBL_MANT_BIT;