Branch Coverage

NV.xs
Criterion Covered Total %
branch 66 166 39.7


line true false branch
46 0 4 if(SvUOK(a)) return newSVuv(1);
47 0 4 if(SvIOK(a)) return newSVuv(2);
48 0 4 if(SvNOK(a)) return newSVuv(3);
49 4 0 if(SvPOK(a)) return newSVuv(4);
63 2 2 double num = strtod (SvPV_nolen(str), &unparsed);
66 4 0 if(!SvIV(get_sv("Math::NV::no_warn", 0))) {
2 2 if(!SvIV(get_sv("Math::NV::no_warn", 0))) {
67 0 2 if(SvUV(_itsa(aTHX_ str)) != 4)
0 2 if(SvUV(_itsa(aTHX_ str)) != 4)
72 4 0 if(GIMME == G_ARRAY) {
1 3 if(GIMME == G_ARRAY) {
73 0 1 EXTEND(SP, 1);
74 1 0 if(unparsed)
108 4 0 if(d == d) return 0;
120 1 0 ARGTYPE d = (ARGTYPE)SvNV(ld);
128 0 1 if(Isnan_ld(d)) {
129 0 0 XPUSHs(sv_2mortal(newSVpv("@NaN@", 0)));
130 0 0 XPUSHs(sv_2mortal(newSViv(exp)));
131 0 0 XPUSHs(sv_2mortal(newSViv(prec)));
135 0 1 if (d < (ARGTYPE) 0.0 || (d == (ARGTYPE) 0.0 && (1.0 / (double) d < 0.0))) {
0 0 if (d < (ARGTYPE) 0.0 || (d == (ARGTYPE) 0.0 && (1.0 / (double) d < 0.0))) {
0 0 if (d < (ARGTYPE) 0.0 || (d == (ARGTYPE) 0.0 && (1.0 / (double) d < 0.0))) {
136 0 1 XPUSHs(sv_2mortal(newSVpv("-", 0)));
144 1 0 if (Isnan_ld (d - d) || (d > 1 && d * 0.5 == d)) {
1 0 if (Isnan_ld (d - d) || (d > 1 && d * 0.5 == d)) {
0 1 if (Isnan_ld (d - d) || (d > 1 && d * 0.5 == d)) {
145 0 0 XPUSHs(sv_2mortal(newSVpv("@Inf@", 0)));
146 0 0 XPUSHs(sv_2mortal(newSViv(exp)));
147 0 0 XPUSHs(sv_2mortal(newSViv(prec)));
152 0 1 if (d == (ARGTYPE) 0.0) {
153 0 0 XPUSHs(sv_2mortal(newSVpv("0.0", 0)));
154 0 0 XPUSHs(sv_2mortal(newSViv(exp)));
155 0 0 XPUSHs(sv_2mortal(newSViv(prec)));
162 0 1 while (e > d) {
168 9 1 while (d >= e + e) {
174 0 1 XPUSHs(sv_2mortal(newSVpv("0.", 0)));
177 12 1 while (d > (ARGTYPE) 0.0) {
179 12 0 if(d >= e) {
180 0 12 XPUSHs(sv_2mortal(newSVpv("1", 0)));
185 0 0 XPUSHs(sv_2mortal(newSVpv("0", 0)));
191 0 1 XPUSHs(sv_2mortal(newSViv(exp)));
192 0 1 XPUSHs(sv_2mortal(newSViv(prec)));
218 0 1 if(Isnan_ld(d)) {
219 0 0 XPUSHs(sv_2mortal(newSVpv("@NaN@", 0)));
220 0 0 XPUSHs(sv_2mortal(newSViv(exp)));
221 0 0 XPUSHs(sv_2mortal(newSViv(prec)));
225 0 1 if (d < (ARGTYPE) 0.0 || (d == (ARGTYPE) 0.0 && (1.0 / (double) d < 0.0))) {
0 0 if (d < (ARGTYPE) 0.0 || (d == (ARGTYPE) 0.0 && (1.0 / (double) d < 0.0))) {
0 0 if (d < (ARGTYPE) 0.0 || (d == (ARGTYPE) 0.0 && (1.0 / (double) d < 0.0))) {
226 0 1 XPUSHs(sv_2mortal(newSVpv("-", 0)));
234 1 0 if (Isnan_ld (d - d) || (d > 1 && d * 0.5 == d)) {
1 0 if (Isnan_ld (d - d) || (d > 1 && d * 0.5 == d)) {
0 1 if (Isnan_ld (d - d) || (d > 1 && d * 0.5 == d)) {
235 0 0 XPUSHs(sv_2mortal(newSVpv("@Inf@", 0)));
236 0 0 XPUSHs(sv_2mortal(newSViv(exp)));
237 0 0 XPUSHs(sv_2mortal(newSViv(prec)));
242 0 1 if (d == (ARGTYPE) 0.0) {
243 0 0 XPUSHs(sv_2mortal(newSVpv("0.0", 0)));
244 0 0 XPUSHs(sv_2mortal(newSViv(exp)));
245 0 0 XPUSHs(sv_2mortal(newSViv(prec)));
252 0 1 while (e > d) {
258 9 1 while (d >= e + e) {
264 0 1 XPUSHs(sv_2mortal(newSVpv("0.", 0)));
267 12 1 while (d > (ARGTYPE) 0.0) {
269 12 0 if(d >= e) {
270 0 12 XPUSHs(sv_2mortal(newSVpv("1", 0)));
275 0 0 XPUSHs(sv_2mortal(newSVpv("0", 0)));
281 0 1 XPUSHs(sv_2mortal(newSViv(exp)));
282 0 1 XPUSHs(sv_2mortal(newSViv(prec)));
289 1 0 prec = SvIV(precision);
292 0 1 ARGTYPE exp = (ARGTYPE)SvNV(exponent);
293 12 1 for(i = 0; i < prec; i++) {
294 0 12 if(SvIV(*(av_fetch((AV*)SvRV(bin), i, 0))))
12 0 if(SvIV(*(av_fetch((AV*)SvRV(bin), i, 0))))
335 1 0 printf(fmt, (ARGTYPE)SvNV(nv));
343 0 1 if(out == NULL) croak("Failed to allocate memory in Csprintf function");
347 1 0 sprintf(out, fmt, (ARGTYPE)SvNV(nv));
360 0 0 if(looks_like_number(x)) return 1;
388 0 4 if (PL_markstack_ptr != temp) {
415 0 1 if (PL_markstack_ptr != temp) {
431 0 1 if (PL_markstack_ptr != temp) {
471 1 0 if (PL_markstack_ptr != temp) {
489 0 1 if (PL_markstack_ptr != temp) {