"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "jv_dtoa.c" between
jq-1.5.tar.gz and jq-1.6.tar.gz

About: jq is a lightweight and flexible command-line JSON processor.

jv_dtoa.c  (jq-1.5):jv_dtoa.c  (jq-1.6)
skipping to change at line 2322 skipping to change at line 2322
ret1: ret1:
#endif #endif
return; return;
} }
#endif /* NO_STRTOD_BIGCOMP */ #endif /* NO_STRTOD_BIGCOMP */
double double
jvp_strtod jvp_strtod
(struct dtoa_context* C, const char *s00, char **se) (struct dtoa_context* C, const char *s00, char **se)
{ {
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, e, e1; int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, e, e1, test_scale;
int esign, i, j, k, nd, nd0, nf, nz, nz0, nz1, sign; int esign, i, j, k, nd, nd0, nf, nz, nz0, nz1, sign;
CONST char *s, *s0, *s1; CONST char *s, *s0, *s1;
double aadj, aadj1; double aadj, aadj1;
Long L; Long L;
U aadj2, adj, rv, rv0; U aadj2, adj, rv, rv0;
ULong y, z; ULong y, z;
BCinfo bc; BCinfo bc;
Bigint *bb=0, *bb1, *bd=0, *bd0, *bs=0, *delta=0; Bigint *bb=0, *bb1, *bd=0, *bd0, *bs=0, *delta=0;
#ifdef Avoid_Underflow #ifdef Avoid_Underflow
ULong Lsb, Lsb1; ULong Lsb, Lsb1;
skipping to change at line 2936 skipping to change at line 2936
if (bc.dsign) { if (bc.dsign) {
adj.d = 1.; adj.d = 1.;
goto apply_adj; goto apply_adj;
} }
} }
else if (!bc.dsign) { else if (!bc.dsign) {
adj.d = -1.; adj.d = -1.;
if (!word1(&rv) if (!word1(&rv)
&& !(word0(&rv) & Frac_mask)) { && !(word0(&rv) & Frac_mask)) {
y = word0(&rv) & Exp_mask; y = word0(&rv) & Exp_mask;
test_scale = y;
#ifdef Avoid_Underflow #ifdef Avoid_Underflow
if (!bc.scale || y > 2*P*Exp_msk1 test_scale = (!bc.scale || y > 2*
) P*Exp_msk1);
#else
if (y)
#endif #endif
{ if (test_scale) {
delta = lshift(C, delta,Log2P); delta = lshift(C, delta,Log2P);
if (cmp(C, delta, bs) <= 0) if (cmp(C, delta, bs) <= 0)
adj.d = -0.5; adj.d = -0.5;
} }
} }
apply_adj: apply_adj:
#ifdef Avoid_Underflow /*{*/ #ifdef Avoid_Underflow /*{*/
if (bc.scale && (y = word0(&rv) & Exp_mas k) if (bc.scale && (y = word0(&rv) & Exp_mas k)
<= 2*P*Exp_msk1) <= 2*P*Exp_msk1)
word0(&adj) += (2*P+1)*Exp_msk1 - y; word0(&adj) += (2*P+1)*Exp_msk1 - y;
 End of changes. 4 change blocks. 
6 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)