Result:
found more than 920 distributions - search limited to the first 2001 files matching your query ( run in 2.849 )


Dallycot

 view release on metacpan or  search on metacpan

c/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


Dancer-Layout-Bootstrap

 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


Dancer-Plugin-DebugToolbar

 view release on metacpan or  search on metacpan

share/debugtoolbar/js/jquery.min.js  view on Meta::CPAN

 * Copyright 2011, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Thu May 12 15:04:36 2011 -0400
 */
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!cj[a]){var b=f("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d===""){ck||(ck=c.createElement("iframe"),...
)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)...
b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bb.test(k))k=b.createTextNode(k);else{k=k.replace($,"<$1></$2>");var l=(_.exec(k)||["",""])[1].toLowerCase(...

 view all matches for this distribution


Dancer-SearchApp

 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


Dancer-Template-Mason

 view release on metacpan or  search on metacpan

t/apps/Foo/public/javascripts/jquery.js  view on Meta::CPAN

1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"appen...
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined"...
""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for...
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.ma...
c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a...
function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.n...
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="w...
"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filt...
a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="...
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/scrip...
"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f...

 view all matches for this distribution


Dancer-Template-TemplateDeclare

 view release on metacpan or  search on metacpan

t/apps/Foo/public/javascripts/jquery.js  view on Meta::CPAN

1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"appen...
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined"...
""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for...
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.ma...
c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a...
function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.n...
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="w...
"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filt...
a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="...
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/scrip...
"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f...

 view all matches for this distribution


Dancer2-Plugin-LiteBlog

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/LiteBlog/Scaffolder/Data.pm  view on Meta::CPAN

dN9y3t4wOScrluiggnJIBpfsKaR4h07xT8dvih400cnxBJqsfh+LTtIzdPF9lj3S2kPTeVd44y2Q
peNiTgZr18zx8cJSdKi0peXRHxPBvDVXOcYsxzCDlSjd3l9qV+3VdfwPp39nv9n/AMOfs6+Ao/Du
hCW7uZpDd6nq93zdaldt9+aVvU9AucKOOeSdD4y+P4PAvhO7lN3HZytE7vcu2BbQqpMkp/3QDj3r
yPxH8ZP2kPOmuNG+AFiNLXlIrnxbaNfsnr5Q/dhsfw7z6Zr5s+PvxL8ZftUeKPBfwMs4tQ8M6r4m
upH8Q2mp2i2l3ptnbgPIjAZyHALKwJVwFwSGNfGYWnGU/bVZJpa2vq/6Z/QGYzq+z+q0Itc2nMld
Jdet7220OM+AnhXVf2nPi/P8Vr3SJNQ8NaNM9r4S0m5i3x5RvmupNw2khsNznLnoRHX19N4Fl1nW
ni1y9uvEGs5Bk0vTiJWj/wCurk7EHJ+8R7DgV6l4f+Ftj4J8IWWiyXlt4a8I6XbJbQ6XpbfZ0WFB
gebcHDscdSuzJJznNVdQ+Kvh/wAG+H3bw7YWkekQ53ajcSLY6cnq3mty5/3AxNe3DG1NfYxvJ7v/
AIL/ACR8Djcjw1SopY2q1Tj8MOyXXlW7e7b6vYj8OfCI2dsZdVmg0HT1G57DS5Crlep866OGPuE2
Drya83+Mv7Znw6/Z+0NtO8Ow2uoXiAiGC1wkG7pnI5f3I4/2q+dfj/8AtvW8xurTSyfGl9Hg7rlG
t9Itm7eXbZElwf8AalIXn7pr42134v8AjzxhrV1q15c2k9zJtBlGnW4VUUAKqqY8KoCAAADv6nMS

 view all matches for this distribution


Darcs-Inventory

 view release on metacpan or  search on metacpan

t/darcs-old/darcs-changes.pl  view on Meta::CPAN

                   {
                     'hash' => '20071028114343-178ae-e4c6e4aa8dc0866926a93d55e3597d89e4aadaff.gz',
                     'inverted' => 'False',
                     'date' => '20071028114343',
                     'name' => [
                               '[position] replace dangerous while loop normalization (previously hung threads on NaN with -ffast-math!)'
                             ],
                     'author' => 'David Caldwell <david@example.com>',
                     'local_date' => 'Sun Oct 28 04:43:43 PDT 2007'
                   },
                   {

 view all matches for this distribution


Dash

 view release on metacpan or  search on metacpan

share/assets/dash_core_components/async~datepicker.js  view on Meta::CPAN

(window.webpackJsonpdash_core_components=window.webpackJsonpdash_core_components||[]).push([[2],Array(195).concat([function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function a(){return t.apply(null,arguments)}function o(e){return...
//# sourceMappingURL=async~datepicker.js.map

 view all matches for this distribution


Data-BLNS

 view release on metacpan or  search on metacpan

lib/Data/BLNS.pm  view on Meta::CPAN

  "--1",
  "-",
  "-.",
  "-,",
  ("9" x 96),
  "NaN",
  "Infinity",
  "-Infinity",
  "INF",
  "1#INF",
  "-1#IND",

 view all matches for this distribution


Data-BinaryBuffer

 view release on metacpan or  search on metacpan

databb-boost/boost/limits.hpp  view on Meta::CPAN

      BOOST_STATIC_CONSTANT(int, min_exponent10 = 0);
      BOOST_STATIC_CONSTANT(int, max_exponent = 0);
      BOOST_STATIC_CONSTANT(int, max_exponent10 = 0);

      BOOST_STATIC_CONSTANT(bool, has_infinity = false);
      BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false);
      BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false);
      BOOST_STATIC_CONSTANT(bool, has_denorm = false);
      BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false);
      static BOOST_LLT infinity() throw() { return 0; };
      static BOOST_LLT quiet_NaN() throw() { return 0; };
      static BOOST_LLT signaling_NaN() throw() { return 0; };
      static BOOST_LLT denorm_min() throw() { return 0; };

      BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
      BOOST_STATIC_CONSTANT(bool, is_bounded = true);
      BOOST_STATIC_CONSTANT(bool, is_modulo = true);

databb-boost/boost/limits.hpp  view on Meta::CPAN

      BOOST_STATIC_CONSTANT(int, min_exponent10 = 0);
      BOOST_STATIC_CONSTANT(int, max_exponent = 0);
      BOOST_STATIC_CONSTANT(int, max_exponent10 = 0);

      BOOST_STATIC_CONSTANT(bool, has_infinity = false);
      BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false);
      BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false);
      BOOST_STATIC_CONSTANT(bool, has_denorm = false);
      BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false);
      static BOOST_ULLT infinity() throw() { return 0; };
      static BOOST_ULLT quiet_NaN() throw() { return 0; };
      static BOOST_ULLT signaling_NaN() throw() { return 0; };
      static BOOST_ULLT denorm_min() throw() { return 0; };

      BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
      BOOST_STATIC_CONSTANT(bool, is_bounded = true);
      BOOST_STATIC_CONSTANT(bool, is_modulo = true);

 view all matches for this distribution


Data-Bucketeer

 view release on metacpan or  search on metacpan

lib/Data/Bucketeer.pm  view on Meta::CPAN

  my ($class, @rest) = @_;
  unshift @rest, '>' if ref $rest[0];

  my ($type, $buckets) = @rest;

  my @non_num = grep { ! Scalar::Util::looks_like_number($_) or /NaN/i }
                keys %$buckets;

  croak "non-numeric bucket boundaries: @non_num" if @non_num;

  my $guts = bless {

 view all matches for this distribution


Data-Buffer-Shared

 view release on metacpan or  search on metacpan

xt/longdouble_f64.t  view on Meta::CPAN

$buf->set(0, $beyond_double_max);
my $got = $buf->get(0);
ok $got > 1e308, "out-of-double-range value stored as +Inf";
ok !($got < 1e308 && $got > -1e308), "not accidentally truncated to finite";

# NaN / ±Inf via string-coerced literals roundtrip
for my $s ("Inf", "-Inf") {
    my $v = $s + 0;
    $buf->set(0, $v);
    cmp_ok $buf->get(0), '==', $v, "F64 $s roundtrip under long double";
}

my $nan = "NaN" + 0;
$buf->set(0, $nan);
my $got_nan = $buf->get(0);
ok $got_nan != $got_nan, "F64 NaN roundtrip under long double";

done_testing;

 view all matches for this distribution


Data-Checks

 view release on metacpan or  search on metacpan

src/constraints.c  view on Meta::CPAN

  }
  else if(SvPOK(value)) {
    if(!looks_like_number(value))
      return false;

    // reject NaN
    if(SvPVX(value)[0] == 'N' || SvPVX(value)[0] == 'n')
      return false;

    return true;
  }
  else {
    // reject NaN
    if(SvNOK(value) && Perl_isnan(SvNV(value)))
      return false;

    return true;
  }

 view all matches for this distribution


Data-Deque-Shared

 view release on metacpan or  search on metacpan

xt/timeout_validation.t  view on Meta::CPAN

use Time::HiRes qw(time);
use Data::Deque::Shared;

plan skip_all => 'AUTHOR_TESTING not set' unless $ENV{AUTHOR_TESTING};

# Boundary timeouts: negative, +Inf, NaN. None should crash; results
# should match documented behavior or croak cleanly.

my $h = Data::Deque::Shared::Int->new(undef, 4);

# Run each timeout in a child to detect signal-death.

xt/timeout_validation.t  view on Meta::CPAN

my $r2 = run_child('inf timeout',
    sub { local $SIG{ALRM} = sub { _exit(0) }; alarm 1; $h->pop_front_wait("Inf"+0) });
isnt $r2, 'signal_11', "inf timeout: no SIGSEGV (got $r2)";
isnt $r2, 'signal_6',  "inf timeout: no SIGABRT (got $r2)";

# NaN: implementation-defined, must not crash
my $r3 = run_child('nan timeout',
    sub { local $SIG{ALRM} = sub { _exit(0) }; alarm 1; $h->pop_front_wait("NaN"+0) });
isnt $r3, 'signal_11', "NaN timeout: no SIGSEGV (got $r3)";
isnt $r3, 'signal_6',  "NaN timeout: no SIGABRT (got $r3)";

done_testing;

 view all matches for this distribution


Data-Dmp-Prune

 view release on metacpan or  search on metacpan

lib/Data/Dmp/Prune.pm  view on Meta::CPAN

        } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
                     # perl does several normalizations to number literal, e.g.
                     # "+1" becomes 1, 0123 is octal literal, etc. make sure we
                     # only leave out quote when the number is not normalized
                     $val eq $val+0 &&
                     # perl also doesn't recognize Inf and NaN as numeric
                     # literals (ref: perldata) so these unquoted literals will
                     # choke under 'use strict "subs"
                     $val !~ /\A-?(?:inf(?:inity)?|nan)\z/i
                 ) {
            return $val;

 view all matches for this distribution


Data-Dmp

 view release on metacpan or  search on metacpan

lib/Data/Dmp.pm  view on Meta::CPAN

        } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
                     # perl does several normalizations to number literal, e.g.
                     # "+1" becomes 1, 0123 is octal literal, etc. make sure we
                     # only leave out quote when the number is not normalized
                     $val eq $val+0 &&
                     # perl also doesn't recognize Inf and NaN as numeric
                     # literals (ref: perldata) so these unquoted literals will
                     # choke under 'use strict "subs"
                     $val !~ /\A-?(?:inf(?:inity)?|nan)\z/i
                 ) {
            return $val;

 view all matches for this distribution


Data-Dump-HTML-Collapsible

 view release on metacpan or  search on metacpan

lib/Data/Dump/HTML/Collapsible.pm  view on Meta::CPAN

        } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
                     # perl does several normalizations to number literal, e.g.
                     # "+1" becomes 1, 0123 is octal literal, etc. make sure we
                     # only leave out quote when the number is not normalized
                     $val eq $val+0 &&
                     # perl also doesn't recognize Inf and NaN as numeric
                     # literals (ref: perldata) so these unquoted literals will
                     # choke under 'use strict "subs"
                     $val !~ /\A-?(?:inf(?:inity)?|nan)\z/i
                 ) {
            return $val;

 view all matches for this distribution


Data-Dump-HTML-PopUp

 view release on metacpan or  search on metacpan

lib/Data/Dump/HTML/PopUp.pm  view on Meta::CPAN

        } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
                     # perl does several normalizations to number literal, e.g.
                     # "+1" becomes 1, 0123 is octal literal, etc. make sure we
                     # only leave out quote when the number is not normalized
                     $val eq $val+0 &&
                     # perl also doesn't recognize Inf and NaN as numeric
                     # literals (ref: perldata) so these unquoted literals will
                     # choke under 'use strict "subs"
                     $val !~ /\A-?(?:inf(?:inity)?|nan)\z/i
                 ) {
            return $val;

 view all matches for this distribution


Data-Dump-SExpression

 view release on metacpan or  search on metacpan

lib/Data/Dump/SExpression.pm  view on Meta::CPAN

            if ($val == "Inf") {
                return "1.0e+INF";
            } elsif ($val == "-Inf") {
                return "-1.0e+INF";
            } elsif ($val =~ /nan/i) {
                return "1.0e+NaN";
            } else {
                return $val;
            }
        } else {
            return _double_quote($val);

 view all matches for this distribution


Data-Dump-Streamer

 view release on metacpan or  search on metacpan

lib/Data/Dump/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


Data-Dump

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


2021-06-25  Breno G. de Oliveira <garu@cpan.org>

   Release 1.24

   Strings like "NaN" are still strings

   Update maintainer and repository information



 view all matches for this distribution


Data-Dumper-Interp

 view release on metacpan or  search on metacpan

lib/Data/Dumper/Interp.pm  view on Meta::CPAN

         "\n    Unhandled warn/exception from unary & :$@\n"
      if $Debug;
    # Unknown problem, treat as a string
    return 0;
  }
  elsif (ref($uand_str_result) ne "" && $uand_str_result =~ /NaN|Inf/) {
    # unary & returned an object representing Nan or Inf
    # (e.g. Math::BigFloat) so $value must be numberish.
    return 1;
  }
  warn "# ".__PACKAGE__." : (value & \"...\") succeeded\n",

 view all matches for this distribution


Data-Dumper-Limited

 view release on metacpan or  search on metacpan

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


Data-Dumper

 view release on metacpan or  search on metacpan

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


Data-EventStream

 view release on metacpan or  search on metacpan

t/lib/Averager.pm  view on Meta::CPAN

    },
);

sub value {
    my $self = shift;
    return $self->_count ? sprintf( "%.6g", $self->_sum / $self->_count ) : 'NaN';
}

sub enter {
    my ( $self, $event ) = @_;
    my $val = $self->value_sub->($event);

 view all matches for this distribution


Data-Float-DoubleDouble

 view release on metacpan or  search on metacpan

DoubleDouble.pm  view on Meta::CPAN

  my $hex = NV2H($_[0]);

  my $raw = @_ == 2 && $_[1] eq 'raw' ? 1 : 0;

  # If the 2nd arg is 'raw' we do the calculations for the arg
  # even if it is an Inf/NaN.
  unless($raw) {
    if($hex eq '7ff00000000000000000000000000000') { # +inf
      return ('+', 'inf', 1024);
    }
    if($hex eq 'fff00000000000000000000000000000') { # -inf

DoubleDouble.pm  view on Meta::CPAN

}

##############################
##############################
# Return a hex string representation as per perl Data::Float
# For NaN and Inf returns 'nan' or 'inf' (prefixed with either
# '+' or '-' as appropriate) unless an additional arg of 'raw'
# has been provided - in which case it does the calculations
# and returns the hex string it has calculated.
# This function returns a hex representation of the *actual*
# value - even if that value requires more than 106 bits.

DoubleDouble.pm  view on Meta::CPAN


}

##############################
##############################
# Return true iff at least one argument is a NaN.

sub are_nan {

  for(@_) {
    return 0 if $_ == $_;

DoubleDouble.pm  view on Meta::CPAN


  @bin = NV2binary($nv);

   Another way of arriving at (almost) the same binary representation
   of the NV -ie as an array consisting of (sign, mantissa, exponent).
   The mantissa if Infs and NaNs will be returned as 'inf' or 'nan'
   respectively and the sign associated with the nan will always
   be '+'.
   With this function, trailing zeroes are stripped from the mantissa
   and exponents for 0, inf and nan might not match the other binary
   representations.

DoubleDouble.pm  view on Meta::CPAN

  #############################################

  $bool = are_nan(@nv); # Aliased to float_is_nan.

   Returns true if and only if all of the (NV) arguments are
   NaNs. Else returns false.

  #############################################

  $hex = dd_bytes($nv);

DoubleDouble.pm  view on Meta::CPAN


  #############################################

  $bool = float_is_nan($nv); # Alias for are_nan()

   Returns true if $nv is a NaN.
   Else returns false.

  #############################################

  $bool = float_is_infinite($nv); # Alias for are_inf()

DoubleDouble.pm  view on Meta::CPAN


  #############################################

  $bool = float_is_finite($nv);

   Returns true if NV is neither infinite nor a NaN.
   Else returns false.

  #############################################

  $bool = float_is_nzfinite($nv);

   Returns true if NV is neither infinite, nor a NaN, nor zero.
   Else returns false.

  #############################################

  $bool = float_is_zero($nv);

DoubleDouble.pm  view on Meta::CPAN

   equal to $nv1. Infinite values are regarded as being adjacent to
   the largest representable finite values. Zero counts as one value,
   even if it is signed, and it is adjacent to the positive and
   negative smallest representable finite values. If a zero is returned
   then it has the same sign as $nv1. Returns
   NaN if either argument is a NaN.

  #############################################

  $nv = nextup($nv1);

DoubleDouble.pm  view on Meta::CPAN

   the largest representable finite values. Zero counts as one value,
   even if it is signed, and it is adjacent to the smallest
   representable positive and negative finite values. If a zero is
   returned, because $nv1 is the smallest representable negative
   value, and zeroes are signed, it is a negative zero that is
   returned. Returns NaN if $nv1 is a NaN.

  #############################################

  $nv = nextdown($nv1);

DoubleDouble.pm  view on Meta::CPAN

   no such value. Infinite values are regarded as being adjacent to the
   largest representable finite values. Zero counts as one value, even
   if it is signed, and it is adjacent to the smallest representable
   positive and negative finite values. If a zero is returned, because
   $nv is the smallest representable positive value, and zeroes are
   signed, it is a positive zero that is returned. Returns NaN if VALUE
   is a NaN.

  #############################################
  #############################################

=head1 TODO

 view all matches for this distribution


Data-Float

 view release on metacpan or  search on metacpan

lib/Data/Float.pm  view on Meta::CPAN


Perl does not always generate infinite values when normal floating point
behaviour calls for it.  For example, the division C<1.0/0.0> causes an
exception rather than returning an infinity.

=item not-a-number (NaN)

This type of value exists in some floating point formats to indicate
error conditions.  Mathematically undefined operations may generate NaNs,
and NaNs propagate through all arithmetic operations.  A NaN has the
distinctive property of comparing numerically unequal to all floating
point values, including itself.

Perl does not always generate NaNs when normal floating point behaviour
calls for it.  For example, the division C<0.0/0.0> causes an exception
rather than returning a NaN.

Perl has only (at most) one NaN value, even if the underlying system
supports different NaNs.  (IEEE 754 arithmetic has NaNs which carry a
quiet/signal bit, a sign bit (yes, a sign on a not-number), and many
bits of implementation-defined data.)

=back

lib/Data/Float.pm  view on Meta::CPAN


Truth value indicating whether there are infinite floating point values.

=item have_nan

Truth value indicating whether there are NaN floating point values.

It is difficult to reliably generate a NaN in Perl, so in some unlikely
circumstances it is possible that there might be NaNs that this module
failed to detect.  In that case this constant would be false but a NaN
might still turn up somewhere.  What this constant reliably indicates
is the availability of the C<nan> constant below.

=back

lib/Data/Float.pm  view on Meta::CPAN

The negative infinite value.  (Exists only if there are infinite values,
as indicated by the C<have_infinite> constant.)

=item nan

Not-a-number.  (Exists only if NaN values were detected, as indicated
by the C<have_nan> constant.)

=back

=cut

lib/Data/Float.pm  view on Meta::CPAN

sub float_is_subnormal($) { float_class($_[0]) eq "SUBNORMAL" }

=item float_is_nzfinite(VALUE)

Returns true iff VALUE is a non-zero finite value (either normal or
subnormal; not zero, infinite, or NaN).

=cut

sub float_is_infinite($);

lib/Data/Float.pm  view on Meta::CPAN

}

=item float_is_finite(VALUE)

Returns true iff VALUE is a finite value (either normal, subnormal,
or zero; not infinite or NaN).

=cut

sub float_is_finite($) {
	my($val) = @_;

lib/Data/Float.pm  view on Meta::CPAN

	return $val == $pos_infinity || $val == $neg_infinity;
}

=item float_is_nan(VALUE)

Returns true iff VALUE is a NaN.

=cut

sub float_is_nan($) {
	my($val) = @_;

lib/Data/Float.pm  view on Meta::CPAN

=over

=item float_sign(VALUE)

Returns "B<+>" or "B<->" to indicate the sign of VALUE.  An unsigned
zero returns the sign "B<+>".  C<die>s if VALUE is a NaN.

=cut

sub signbit($);

sub float_sign($) {
	my($val) = @_;
	croak "can't get sign of a NaN" if $val != $val;
	return signbit($val) ? "-" : "+";
}

=item signbit(VALUE)

VALUE must be a floating point value.  Returns the sign bit of VALUE:
0 if VALUE is positive or a positive or unsigned zero, or 1 if VALUE is
negative or a negative zero.  Returns an unpredictable value if VALUE
is a NaN.

This is an IEEE 754 standard function.  According to the standard NaNs
have a well-behaved sign bit, but Perl can't see that bit.

=cut

sub signbit($) {

lib/Data/Float.pm  view on Meta::CPAN


The string that is returned for an infinite magnitude.  Default "B<inf>".

=item B<nan_string>

The string that is returned for a NaN value.  Default "B<nan>".

=item B<neg_sign>

The string that is prepended to a negative value (including negative
zero).  Default "B<->".

lib/Data/Float.pm  view on Meta::CPAN

represent then an infinity is returned, or the largest finite value if
there are no infinities.

Additional input formats are accepted for special values.
"[I<s>]B<inf>[B<inity>]" returns an infinity, or C<die>s if there are
no infinities.  "[I<s>][B<s>]B<nan>" returns a NaN, or C<die>s if there
are no NaNs available.

All input formats are understood case insensitively.  The function
correctly interprets all possible outputs from C<float_hex> with default
settings.

lib/Data/Float.pm  view on Meta::CPAN

0, or +1, indicating whether A is to be sorted before, the same as,
or after B.

The ordering is of the identities of floating point values, not their
numerical values.  If zeroes are signed, then the two types are considered
to be distinct.  NaNs compare equal to each other, but different from
all numeric values.  The exact ordering provided is mostly numerical
order: NaNs come first, followed by negative infinity, then negative
finite values, then negative zero, then positive (or unsigned) zero,
then positive finite values, then positive infinity.

In addition to sorting, this function can be useful to check for a zero
of a particular sign.

lib/Data/Float.pm  view on Meta::CPAN


This is a comparison function supplying a total ordering of floating point
values.  A and B must both be floating point values.  Returns a truth value
indicating whether A is to be sorted before-or-the-same-as B.  That is,
it is a <= predicate on the total ordering.  The ordering is the same as
that provided by C<float_id_cmp>: NaNs come first, followed by negative
infinity, then negative finite values, then negative zero, then positive
(or unsigned) zero, then positive finite values, then positive infinity.

This is an IEEE 754r standard function.  According to the standard it
is meant to distinguish different kinds of NaNs, based on their sign
bit, quietness, and payload, but this function (like the rest of Perl)
perceives only one NaN.

=cut

sub totalorder($$) { float_id_cmp($_[0], $_[1]) <= 0 }

lib/Data/Float.pm  view on Meta::CPAN


VALUE and SIGN_FROM must both be floating point values.  Returns a
floating point value with the magnitude of VALUE and the sign of
SIGN_FROM.  If SIGN_FROM is an unsigned zero then it is treated as
positive.  If VALUE is an unsigned zero then it is returned unchanged.
If VALUE is a NaN then it is returned unchanged.  If SIGN_FROM is a NaN
then the sign copied to VALUE is unpredictable.

This is an IEEE 754 standard function.  According to the standard NaNs
have a well-behaved sign bit, which can be read and modified by this
function, but Perl only perceives one NaN and can't see its sign bit,
so behaviour on NaNs is not standard-conforming.

=cut

sub copysign($$) {
	my($val, $signfrom) = @_;

lib/Data/Float.pm  view on Meta::CPAN

no such value.  Infinite values are regarded as being adjacent to the
largest representable finite values.  Zero counts as one value, even if
it is signed, and it is adjacent to the smallest representable positive
and negative finite values.  If a zero is returned, because VALUE is
the smallest representable negative value, and zeroes are signed, it is
a negative zero that is returned.  Returns NaN if VALUE is a NaN.

This is an IEEE 754r standard function.

=cut

lib/Data/Float.pm  view on Meta::CPAN

no such value.  Infinite values are regarded as being adjacent to the
largest representable finite values.  Zero counts as one value, even if
it is signed, and it is adjacent to the smallest representable positive
and negative finite values.  If a zero is returned, because VALUE is
the smallest representable positive value, and zeroes are signed, it is
a positive zero that is returned.  Returns NaN if VALUE is a NaN.

This is an IEEE 754r standard function.

=cut

lib/Data/Float.pm  view on Meta::CPAN

direction of DIRECTION, or returns DIRECTION if it is numerically
equal to VALUE.  Infinite values are regarded as being adjacent to
the largest representable finite values.  Zero counts as one value,
even if it is signed, and it is adjacent to the positive and negative
smallest representable finite values.  If a zero is returned and zeroes
are signed then it has the same sign as VALUE.  Returns NaN if either
argument is a NaN.

This is an IEEE 754 standard function.

=cut

lib/Data/Float.pm  view on Meta::CPAN

maintains negative and integer zeroes.  If a negative zero gets partially
transformed into an integer zero, as described above, the stringification
that it gets is based on its state at the first occasion on which the
scalar was stringified.

NaN handling is generally not well defined in Perl.  Arithmetic with
a mathematically undefined result may either C<die> or generate a NaN.
Avoid relying on any particular behaviour for such operations, even if
your hardware's behaviour is known.

As of Perl 5.8.7 the B<%> operator truncates its arguments to integers, if
the divisor is within the range of the native integer type.  It therefore

 view all matches for this distribution


Data-Hash-Diff-Smart

 view release on metacpan or  search on metacpan

t/edge_cases.t  view on Meta::CPAN

=head1 DESCRIPTION

These tests probe the limits of the public API: empty structures, undef
values, extremely deep nesting, very long strings, Unicode, mixed types,
blessed objects, coderefs, IO handles, duplicate keys (impossible in Perl
but simulated via tied hashes), NaN/Inf, overloaded objects, zero/false
values, and adversarial option inputs.

Every test calls only the public interface.

=cut

t/edge_cases.t  view on Meta::CPAN

	};

};

# ===========================================================================
# 4. Numeric edge cases: floats, NaN, Inf
# ===========================================================================

subtest 'Numeric edge cases' => sub {

	subtest 'integer vs float with same string repr: no change' => sub {

 view all matches for this distribution


Data-Heap-Shared

 view release on metacpan or  search on metacpan

xt/timeout_validation.t  view on Meta::CPAN

use Time::HiRes qw(time);
use Data::Heap::Shared;

plan skip_all => 'AUTHOR_TESTING not set' unless $ENV{AUTHOR_TESTING};

# Boundary timeouts: negative, +Inf, NaN. None should crash; results
# should match documented behavior or croak cleanly.

my $h = Data::Heap::Shared->new(undef, 4);

# Run each timeout in a child to detect signal-death.

xt/timeout_validation.t  view on Meta::CPAN

my $r2 = run_child('inf timeout',
    sub { local $SIG{ALRM} = sub { _exit(0) }; alarm 1; $h->pop_wait("Inf"+0) });
isnt $r2, 'signal_11', "inf timeout: no SIGSEGV (got $r2)";
isnt $r2, 'signal_6',  "inf timeout: no SIGABRT (got $r2)";

# NaN: implementation-defined, must not crash
my $r3 = run_child('nan timeout',
    sub { local $SIG{ALRM} = sub { _exit(0) }; alarm 1; $h->pop_wait("NaN"+0) });
isnt $r3, 'signal_11', "NaN timeout: no SIGSEGV (got $r3)";
isnt $r3, 'signal_6',  "NaN timeout: no SIGABRT (got $r3)";

done_testing;

 view all matches for this distribution


( run in 2.849 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )