Message-Id: <
200106030326.EAA18786@crypt.compulink.co.uk>
p4raw-id: //depot/perl@10397
#endif
+/* log(2) is pretty close to 0.30103, just in case anyone is grepping for it */
#define BIT_DIGITS(N) (((N)*146)/485 + 1) /* log2(10) =~ 146/485 */
#define TYPE_DIGITS(T) BIT_DIGITS(sizeof(T) * 8)
#define TYPE_CHARS(T) (TYPE_DIGITS(T) + 2) /* sign, NUL */
$lc = &POSIX::setlocale(&POSIX::LC_NUMERIC, 'C') if $Config{d_setlocale};
($n, $x) = &POSIX::strtod('3.14159_OR_SO');
# Using long double NVs may introduce greater accuracy than wanted.
- $n =~ s/^3.14158999\d*$/3.14159/
+ $n =~ s/^3.1415(8999|9000)\d*$/3.14159/
if $Config{uselongdouble} eq 'define';
print (($n == 3.14159) && ($x == 6) ? "ok 14\n" : "not ok 14\n");
&POSIX::setlocale(&POSIX::LC_NUMERIC, $lc) if $Config{d_setlocale};
(my $y = 12) =~ tr/1/3/;
($f = 1.5) =~ tr/1/3/;
(my $g = 1.5) =~ tr/1/3/;
-print "not " unless $x + $y + $f + $g == 71;
+print "not " unless $x + $y + $f + $g > 70.9;
print "ok 5\n";
# make sure tr is harmless if not updating - see [ID 20000511.005]