view release on metacpan or search on metacpan
lib/Data/Sah/Format/js/iso8601_date.pm view on Meta::CPAN
my $res = {};
$res->{expr} = join(
"",
"$dt instanceof Date ? (isNaN($dt) ? d : $dt.toISOString().substring(0, 10)) : ",
$attempt_parse ? "(function(pd) { pd = new Date($dt); return isNaN(pd) ? $dt : pd.toISOString().substring(0, 10) })()" : "$dt",
);
$res;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Sah/Compiler/js/TH/date.pm view on Meta::CPAN
=back
But note that if the arguments are invalid, Date() will still return a Date
object, but if we try to do C<d.getMonth()> or C<d.getYear()> it will return
NaN. This can be used to check that a date is invalid: C<< isNaN(d.getYear()) >>
or simply C<<isNaN(d)>>.
To compare 2 Date object, we can use C<< d1 > d2 >>, C<< d1 < d2 >>, but for
anything involving equality check, we need to prefix using C<+>, C<+d1 === +d2>.
=for Pod::Coverage ^(clause_.+|superclause_.+|handle_.+|before_.+|after_.+)$
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Docs/Site_SVD/Data_SecsPack.pm view on Meta::CPAN
# Expected: 'U1[1] 80
U1[2] 128 0
'
The second group of failures the UUT C<unpack_float> subroutine
is always returning a NaN. This subroutine heavily uses the
native floating point for calcuations and it appears to
be limiting out with C<Not a Number> type error.
# Test 27 got: '0' (t/Data/SecsPackStress.t at line 396 fail #2)
# Expected: '1' (got: NaN, expected: -10.5
# actual tolerance: NaN, expected tolerance: 0.0001)
Check version of C<Math::BigInt> in the ActiveState Perl 5.06
distribution to those on CPAN. ActiveState C<Math::BigInt>
was 0.01 while CPAN was 1.70. The difference between the two
is night and day. Install C<Math::BigInt> 1.70.
lib/Docs/Site_SVD/Data_SecsPack.pm view on Meta::CPAN
# Expected: 'U1[1] 80
U1[2] 128 0
'
The second group of failures the UUT C<unpack_float> subroutine
is always returning a NaN. This subroutine heavily uses the
native floating point for calcuations and it appears to
be limiting out with C<Not a Number> type error.
# Test 27 got: '0' (t/Data/SecsPackStress.t at line 396 fail #2)
# Expected: '1' (got: NaN, expected: -10.5
# actual tolerance: NaN, expected tolerance: 0.0001)
Check version of C<Math::BigInt> in the ActiveState Perl 5.06
distribution to those on CPAN. ActiveState C<Math::BigInt>
was 0.01 while CPAN was 1.70. The difference between the two
is night and day. Install C<Math::BigInt> 1.70.
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
- remove "original" property from subroutine_modifier(), which seems
a waste of memory
- internal cleanup
0.42 Wed Dec 10 13:42:50 2008
- fix is_number()/is_integer() to refuse Infinity and NaN correctly
- fix a possible segfault on install_subrouitne()
- internal cleanup
0.41 Man Dec 8 11:36:38 2008
- change get_stash() to be able to take an object reference
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Validate/CSV/Column.pm view on Meta::CPAN
my ($value, $pattern, $decimal_char, $group_char) = @_;
$decimal_char //= '.';
$group_char //= ',';
$pattern =~ s/;+$//;
return 'NaN' if lc($value) eq 'nan';
return 'INF' if lc($value) eq 'inf';
return '-INF' if lc($value) eq '-inf';
my $regexp;
if (defined $pattern) {
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/Date/Lectionary/Day.pm view on Meta::CPAN
enum 'DayType', [qw(fixedFeast moveableFeast Sunday noLect)];
enum 'LectionaryType', [qw(acna rcl)];
enum 'MultiLect', [qw(yes no)];
enum 'IncludeFeasts', [qw(yes no)];
enum 'XianSeason', [qw(Advent Christmas Epiphany Ordinary Lent Easter Pentecost NaN)];
no Moose::Util::TypeConstraints;
=head1 SUBROUTINES/METHODS/ATTRIBUTES
=head2 ATTRIBUTES
lib/Date/Lectionary/Day.pm view on Meta::CPAN
The liturgical season the day falls within.
Valid values are 'Advent', 'Christmas', 'Epiphany', 'Ordinary', 'Lent', 'Easter', or 'Pentecost'.
If a date is given that is not a Sunday nor a pricipal holy day 'NaN' will be given for the season.
=cut
has 'date' => (
is => 'ro',
lib/Date/Lectionary/Day.pm view on Meta::CPAN
if ($yesterdayName) {
return (
commonName => $yesterdayName,
type => 'moveableFeast',
season => 'NaN'
);
}
my $fixedDayName = _buildFixedDays( $date, $lectionary );
if ($fixedDayName) {
lib/Date/Lectionary/Day.pm view on Meta::CPAN
my $moveableDayName = _buildMoveableDays( $date, $lectionary );
if ( $moveableDayName && $date->wday != 1 ) {
return (
commonName => $moveableDayName,
type => 'moveableFeast',
season => 'NaN'
);
}
return ( commonName => undef, type => undef, season => 'NaN' );
}
=head2 _buildMoveableDays
Private method that takes the Time::Piece date given at construction and determines if the date is one of many moveable feasts in the liturgical calendar. Feasts are taken from the Anglican Church in North America's revision of the revised common le...
lib/Date/Lectionary/Day.pm view on Meta::CPAN
#then there are no readings for that day.
if ( $date->wday != 1 ) {
return (
commonName => $date->fullday . ', ' . $date->fullmonth . ' ' . $date->mday . ', ' . $date->year,
type => 'noLect',
season => 'NaN'
);
}
#Sundays of the Liturgical Year
if ( $date < $ashWednesday ) {
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/DateTime/Fiction/JRRTolkien/Shire.pm view on Meta::CPAN
and return $self;
my %delta = $dur->deltas();
# This bit isn't quite right since DateTime::Infinite::Future -
# infinite duration should NaN (cribbed shamelessly from
# DateTime)
foreach my $val ( values %delta ) {
my $inf;
if ( $val == DateTime->INFINITY ) {
$inf = DateTime::Infinite::Future->new;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
# exponential => "E",
# group => ",",
# infinity => "â",
# list => ";",
# minus => "-",
# nan => "NaN",
# per_mille => "â°",
# percent => "%",
# plus => "+",
# superscript => "\xD7",
# time_separator => ":",
lib/DateTime/Locale/FromCLDR.pm view on Meta::CPAN
Note that, in the CLDR data, although it is always a visually identical representation, the character itself used varies, depending on the locale used. For example: C<-> (C<\x{2D}>) vs C<-> (C<\x{D8}\x{9C}\x{2D}>)
=item * C<nan>
The NaN sign. Corresponds to the IEEE NaN bit pattern.
For example C<NaN>, C<не ÑиÑло>
=item * C<per_mille>
"Symbol used to indicate a per-mille (1/1000th) amount."
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime/Math/bigfloat.pl view on Meta::CPAN
#
# number format
# canonical strings have the form /[+-]\d+E[+-]\d+/
# Input values can have inbedded whitespace
# Error returns
# 'NaN' An input parameter was "Not a Number" or
# divide by zero or sqrt of negative number
# Division is computed to
# max($div_scale,length(dividend)+length(divisor))
# digits by default.
# Also used for default sqrt scale
lib/DateTime/Math/bigfloat.pl view on Meta::CPAN
# Convert a number to canonical string form.
# Takes something that looks like a number and converts it to
# the form /^[+-]\d+E[+-]\d+$/.
sub DateTime::Math::fnorm { #(string) return fnum_str
local($_) = @_;
defined($_) or return 'NaN';
s/\s+//g; # strip white space
if (/^([+-]?)(\d*)(\.(\d*))?([Ee]([+-]?\d+))?$/ &&
($2 ne '' || defined($4))) {
my $x = defined($4) ? $4 : '';
my $y = defined($6) ? $6 : 0;
&norm(($1 ? "$1$2$x" : "+$2$x"), (($x ne '') ? $y-length($x) : $y));
} else {
'NaN';
}
}
# normalize number -- for internal use
sub norm { #(mantissa, exponent) return fnum_str
my ($mantissa, $exp) = @_;
defined($exp) or $exp = 0;
if ($mantissa eq 'NaN') {
'NaN';
} else {
# strip leading zeros
$mantissa =~ s/^([+-])0+/$1/;
if (length($mantissa) == 1) {
'+0E+0';
lib/DateTime/Math/bigfloat.pl view on Meta::CPAN
}
# multiplication
sub DateTime::Math::fmul { #(fnum_str, fnum_str) return fnum_str
my ($x,$y) = (&DateTime::Math::fnorm($_[0]),&DateTime::Math::fnorm($_[1]));
if ($x eq 'NaN' || $y eq 'NaN') {
'NaN';
} else {
my ($xm,$xe) = split('E',$x);
my ($ym,$ye) = split('E',$y);
&norm(&DateTime::Math::bmul($xm,$ym),$xe+$ye);
}
}
# addition
sub DateTime::Math::fadd { #(fnum_str, fnum_str) return fnum_str
my ($x,$y) = (&DateTime::Math::fnorm($_[0]),&DateTime::Math::fnorm($_[1]));
if ($x eq 'NaN' || $y eq 'NaN') {
'NaN';
} else {
my ($xm,$xe) = split('E',$x);
my ($ym,$ye) = split('E',$y);
($xm,$xe,$ym,$ye) = ($ym,$ye,$xm,$xe) if ($xe < $ye);
&norm(&DateTime::Math::badd($ym,$xm.('0' x ($xe-$ye))),$ye);
lib/DateTime/Math/bigfloat.pl view on Meta::CPAN
# args are dividend, divisor, scale (optional)
# result has at most max(scale, length(dividend), length(divisor)) digits
sub DateTime::Math::fdiv #(fnum_str, fnum_str[,scale]) return fnum_str
{
my ($x,$y,$scale) = (&DateTime::Math::fnorm($_[0]),&DateTime::Math::fnorm($_[1]),$_[2]);
if ($x eq 'NaN' || $y eq 'NaN' || $y eq '+0E+0') {
'NaN';
} else {
my ($xm,$xe) = split('E',$x);
my ($ym,$ye) = split('E',$y);
$scale = $div_scale if (!$scale);
$scale = length($xm)-1 if (length($xm)-1 > $scale);
lib/DateTime/Math/bigfloat.pl view on Meta::CPAN
}
# round int $q based on fraction $r/$base using $rnd_mode
sub round { #(int_str, int_str, int_str) return int_str
my ($q,$r,$base) = @_;
if ($q eq 'NaN' || $r eq 'NaN') {
'NaN';
} elsif ($rnd_mode eq 'trunc') {
$q; # just truncate
} else {
my $cmp = &DateTime::Math::bcmp(&DateTime::Math::bmul($r,'+2'),$base);
if ( $cmp < 0 ||
lib/DateTime/Math/bigfloat.pl view on Meta::CPAN
}
# round the mantissa of $x to $scale digits
sub DateTime::Math::fround { #(fnum_str, scale) return fnum_str
my ($x,$scale) = (&DateTime::Math::fnorm($_[0]),$_[1]);
if ($x eq 'NaN' || $scale <= 0) {
$x;
} else {
my ($xm,$xe) = split('E',$x);
if (length($xm)-1 <= $scale) {
$x;
lib/DateTime/Math/bigfloat.pl view on Meta::CPAN
}
# round $x at the 10 to the $scale digit place
sub DateTime::Math::ffround { #(fnum_str, scale) return fnum_str
my ($x,$scale) = (&DateTime::Math::fnorm($_[0]),$_[1]);
if ($x eq 'NaN') {
'NaN';
} else {
my ($xm,$xe) = split('E',$x);
if ($xe >= $scale) {
$x;
} else {
lib/DateTime/Math/bigfloat.pl view on Meta::CPAN
# compare 2 values returns one of undef, <0, =0, >0
# returns undef if either or both input value are not numbers
sub DateTime::Math::fcmp #(fnum_str, fnum_str) return cond_code
{
my ($x, $y) = (&DateTime::Math::fnorm($_[0]),&DateTime::Math::fnorm($_[1]));
if ($x eq "NaN" || $y eq "NaN") {
return;
} else {
# Compare signs between the two numbers.
my $ret = (ord($y) <=> ord($x));
$ret and return $ret;
lib/DateTime/Math/bigfloat.pl view on Meta::CPAN
}
# square root by Newtons method.
sub DateTime::Math::fsqrt { #(fnum_str[, scale]) return fnum_str
my ($x, $scale) = (&DateTime::Math::fnorm($_[0]), $_[1]);
if ($x eq 'NaN' || $x =~ /^-/) {
'NaN';
} elsif ($x eq '+0E+0') {
'+0E+0';
} else {
my ($xm, $xe) = split('E',$x);
$scale = $div_scale if (!$scale);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTime.pm view on Meta::CPAN
return $self if $dur->is_zero;
my %deltas = $dur->deltas;
# This bit isn't quite right since DateTime::Infinite::Future -
# infinite duration should NaN
for my $val ( values %deltas ) {
my $inf;
if ( $val == INFINITY ) {
$inf = DateTime::Infinite::Future->new;
}
lib/DateTime.pm view on Meta::CPAN
=head1 KNOWN BUGS
The tests in F<20infinite.t> seem to fail on some machines, particularly on
Win32. This appears to be related to Perl's internal handling of IEEE infinity
and NaN, and seems to be highly platform/compiler/phase of moon dependent.
If you don't plan to use infinite datetimes you can probably ignore this. This
will be fixed (perhaps) in future versions.
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DateTimeX/Lite/Arithmetic.pm view on Meta::CPAN
return $self if $dur->is_zero;
my %deltas = $dur->deltas;
# This bit isn't quite right since DateTimeX::Lite::Infinite::Future -
# infinite duration should NaN
foreach my $val ( values %deltas )
{
my $inf;
if ( $val == &DateTimeX::Lite::INFINITY )
{
view all matches for this distribution
view release on metacpan or search on metacpan
t/20infinite.t view on Meta::CPAN
my $dur = $pos - $pos;
my %deltas = $dur->deltas;
my @compare = qw( days seconds nanoseconds );
foreach (@compare) {
# NaN != NaN (but should stringify the same)
is(
$deltas{$_} . '', $nan_string,
"infinity - infinity = nan ($_)"
);
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-basic.t view on Meta::CPAN
);
# 9e9999 should be infinity.
my @list = (
9e9999 / 9e9999,
"NaN",
9e9999,
"Infinity",
"INF",
123_456_789,
-23_456_789.01,
t/01-basic.t view on Meta::CPAN
"Banana",
"CHERRY",
9e9999, # Can be inf, 1.#INF, or some other values
"INF",
"Infinity",
"NaN",
9e9999 / 9e9999, # Can be nan, -nan, 1.#IND, or some other values
),
);
is( \@sorted, \@expected, 'List sorts sensibly' )
or do {
view all matches for this distribution
view release on metacpan or search on metacpan
examples/web/jquery-1.5.2.js view on Meta::CPAN
// A crude way of determining if an object is a window
isWindow: function( obj ) {
return obj && typeof obj === "object" && "setInterval" in obj;
},
isNaN: function( obj ) {
return obj == null || !rdigit.test( obj ) || isNaN( obj );
},
type: function( obj ) {
return obj == null ?
String( obj ) :
examples/web/jquery-1.5.2.js view on Meta::CPAN
if ( typeof data === "string" ) {
try {
data = data === "true" ? true :
data === "false" ? false :
data === "null" ? null :
!jQuery.isNaN( data ) ? parseFloat( data ) :
rbrace.test( data ) ? jQuery.parseJSON( data ) :
data;
} catch( e ) {}
// Make sure we set the data so it isn't changed later
examples/web/jquery-1.5.2.js view on Meta::CPAN
name = jQuery.cssProps[ origName ] || origName;
// Check if we're setting a value
if ( value !== undefined ) {
// Make sure that NaN and null values aren't set. See: #7116
if ( typeof value === "number" && isNaN( value ) || value == null ) {
return;
}
// If a number was passed in, add 'px' to the (except for certain CSS properties)
if ( typeof value === "number" && !jQuery.cssNumber[ origName ] ) {
examples/web/jquery-1.5.2.js view on Meta::CPAN
// IE has trouble with opacity if it does not have layout
// Force it by setting the zoom level
style.zoom = 1;
// Set the alpha filter to set the opacity
var opacity = jQuery.isNaN(value) ?
"" :
"alpha(opacity=" + value * 100 + ")",
filter = style.filter || "";
style.filter = ralpha.test(filter) ?
examples/web/jquery-1.5.2.js view on Meta::CPAN
var parsed,
r = jQuery.css( this.elem, this.prop );
// Empty strings, null, undefined and "auto" are converted to 0,
// complex values such as "rotate(1rad)" are returned as is,
// simple values such as "10px" are parsed to Float.
return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
},
// Start an animation from one number to another
custom: function( from, to, unit ) {
var self = this,
examples/web/jquery-1.5.2.js view on Meta::CPAN
// Get or set width or height on the element
} else if ( size === undefined ) {
var orig = jQuery.css( elem, type ),
ret = parseFloat( orig );
return jQuery.isNaN( ret ) ? orig : ret;
// Set the width or height on the element (default to pixels if value is unitless)
} else {
return this.css( type, typeof size === "string" ? size : size + "px" );
}
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
$x->badd('advantageously infomediaries');
ok ($x->as_number(),292);
$x->badd(1); # can't add numbers
# ('1' is not a valid Math::String here!)
ok ($x->as_number(),'NaN');
ok ($x->order(),1); # SIMPLE
ok ($x->type(),1); # grouping
$x = Dev::Bollocks->new('carefully data');
$x = Dev::Bollocks->new('paradigmatically infomediaries'); $x->bzero();
ok (ref($x),'Dev::Bollocks'); ok ($x,''); ok ($x->sign(),'+');
$x = Dev::Bollocks->new('adaptively empower systems'); $x->bnan();
ok (ref($x),'Dev::Bollocks'); ok_undef ($x->bstr()); ok ($x->sign(),'NaN');
$x = Dev::Bollocks->new('advantageously disintermediate clusters'); $x->binf();
ok (ref($x),'Dev::Bollocks'); ok_undef ($x->bstr()); ok ($x->sign(),'+inf');
$x = Dev::Bollocks::bzero();
ok (ref($x),'Dev::Bollocks'); ok ($x,''); ok ($x->sign(),'+');
$x = Dev::Bollocks::bnan();
ok (ref($x),'Dev::Bollocks'); ok_undef ($x->bstr()); ok ($x->sign(),'NaN');
$x = Dev::Bollocks::binf();
ok (ref($x),'Dev::Bollocks'); ok_undef ($x->bstr()); ok ($x->sign(),'+inf');
##############################################################################
# accuracy/precicison
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