view release on metacpan or search on metacpan
result = (char*)string;
*retlen = len;
/* Allow some standard strings in */
if (0 != strncasecmp(string, "NaN", 4)
&& 0 != strncasecmp(string, "Infinity", 9)
&& 0 != strncasecmp(string, "-Infinity", 10)) {
while (len > 0 && *string != '\0') {
len--;
if (isdigit(*string)
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBD/SQLite/BundledExtensions.pm view on Meta::CPAN
than a number in the range of 0.0 to 100.0 inclusive then an
error is thrown.
(4) If any Y argument to percentile(Y,P) evaluates to a value that
is not NULL and is not numeric then an error is thrown.
(5) If any Y argument to percentile(Y,P) evaluates to plus or minus
infinity then an error is thrown. (SQLite always interprets NaN
values as NULL.)
(6) Both Y and P in percentile(Y,P) can be arbitrary expressions,
including CASE WHEN expressions.
(7) The percentile(Y,P) aggregate is able to handle inputs of at least
one million (1,000,000) rows.
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
while( realvalue>=1e8 && exp<=350 ){ realvalue *= 1e-8; exp+=8; }
while( realvalue>=10.0 && exp<=350 ){ realvalue *= 0.1; exp++; }
while( realvalue<1e-8 && exp>=-350 ){ realvalue *= 1e8; exp-=8; }
while( realvalue<1.0 && exp>=-350 ){ realvalue *= 10.0; exp--; }
if( exp>350 || exp<-350 ){
bufpt = "NaN";
length = 3;
break;
}
}
bufpt = buf;
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
t/63-bind-safety.t view on Meta::CPAN
# number format, per type, not "looks like a digit".
for my $case (
[ i => '007' ], [ i => '-3' ], [ i => '+5' ], [ i => 5 ], [ i => 0 ], [ i => undef ],
[ u => '255' ], [ big => '9223372036854775807' ],
[ f => '1e3' ], [ f => '1.50' ], [ f => '.5' ], [ f => '5.' ], [ f => '-inf' ],
[ f => 'NaN' ], [ f => 1.5 ], [ f => '007' ],
[ d => '1.50' ], [ d => '007' ], [ d => '1E3' ], [ d => undef ],
[ s => '' ], [ s => 'abc' ], [ s => '5x' ], [ b => '' ],
) {
my ($col, $value) = @$case;
my $shown = defined $value ? (length $value ? "'$value'" : q('')) : 'undef';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIO/PostgreSQL/PostGIS/Codec/WKB/Decoder.pm view on Meta::CPAN
$$pos += 8;
return _WIDE_NV ? _shortest_double($v) : $v;
}
# The point of a POINT, or of a MULTIPOINT or a collection: PostGIS writes
# POINT EMPTY as a point of NaN ordinates. That is no point; its
# coordinates are an empty list. (A point in a line is read by _read_point
# and is never empty.)
sub _read_geometry_point {
my ($c) = @_;
return [] if @$c >= 2 && $c->[0] != $c->[0] && $c->[1] != $c->[1];
lib/DBIO/PostgreSQL/PostGIS/Codec/WKB/Decoder.pm view on Meta::CPAN
name here. Throws for input that is refused.
C<is_empty> is true for what PostGIS calls empty (C<ST_IsEmpty>): a
geometry without parts -- a C<linestring> or C<polygon> with no points or
rings, a C<multi*> or C<geometrycollection> with no members -- a C<point>
whose X and Y are both NaN (this is how PostGIS writes C<POINT EMPTY>),
and a C<multi*> or C<geometrycollection> whose members are all empty,
C<MULTIPOINT(EMPTY)> for one. C<coords> of an empty geometry is C<[]>,
and so is that of an empty point: not C<[NaN, NaN]>. A point with just
one NaN ordinate is a point. C<is_empty> is C<undef>, not false, for a
value that is not decoded: nothing is known about it.
An empty member of a C<multi*> keeps its place in C<coords> as an empty
list: C<MULTIPOINT(EMPTY,(1 2))> is C<[[], [1,2]]>. The structure of a
C<multi*> is otherwise the plain coordinates of its parts.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIO/PostgreSQL/InflateColumn/Vector.pm view on Meta::CPAN
my $body = join(',', map { "$_:$values->{$_}" } sort { $a <=> $b } keys %$values);
return "{$body}/$d";
}
# Numeric-looking values come back as numbers (the natural Perl shape for a
# vector); 'NaN'/'Infinity' and anything else stay strings.
sub _coerce_number {
my ($class, $value) = @_;
return $value unless $value =~ /\A-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\z/;
return 0 + $value;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/BulkUtil.pm view on Meta::CPAN
$partially_failed++ if $1;
$failed++;
}
}
# "NaN" (literally "NaN") to numeric errors
# do not show up on STDOUT.
# So we may as well search the err file to count
# all CSLIB and CTLIB errors.
# Truncation errors do not show up in file, so we
# don't have to filter them out as we would if we
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
Bananafonana.pm view on Meta::CPAN
croak __PACKAGE__ . "::to_bananafonana -- invalid markup character ($markup)";
}
if ($blocksize < 0) {
croak __PACKAGE__ . "::to_bananafonana -- invalid blocksize ($blocksize)";
}
if ($num eq "NaN" ) {
croak __PACKAGE__ . "::to_bananafonana -- invalid number ($num)";
}
while ($num > 0) {
$q = $num / BAFO_BASE;
$r = $num % BAFO_BASE;
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
easyxs/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DNS/ZoneSerialNumber.pm view on Meta::CPAN
return 1;
}
# As per RFC 1982 there are value pairs that can not be logically compared.
# They are neither less than, greater than, nor equal to, each other. If we
# encounter one of these pairs, simply return undef. <=> returns undef when
# comparing against NaN, so returning undef from a compare function is not
# completely unheard of.
return undef;
}
sub _copy {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DSP/ppport.h view on Meta::CPAN
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
timetheese/tpl/stackoverflow_homepage.html view on Meta::CPAN
StackExchange.newsletterAd.loader(m[1], cs);
});
}
if (window.localStorage && showNewUser){
var c = parseInt(localStorage['nuCounter'],10);
c = isNaN(c) ? 1 : c+1;
window.localStorage['nuCounter'] = c;
showNewUser = c < 10;
}
})()
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
s++;
}
sawinf = 1;
} else if (*s == 'N' || *s == 'n') {
/* XXX TODO: There are signaling NaNs and quiet NaNs. */
s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
s++;
sawnan = 1;
} else
view all matches for this distribution
view release on metacpan or search on metacpan
public/javascripts/bootstrap-3/bootstrap.js view on Meta::CPAN
// manually read margins because getBoundingClientRect includes difference
var marginTop = parseInt($tip.css('margin-top'), 10)
var marginLeft = parseInt($tip.css('margin-left'), 10)
// we must check for NaN for ie 8/9
if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0
offset.top += marginTop
offset.left += marginLeft
// $.fn.offset doesn't round pixel values
view all matches for this distribution