Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch num_work Excluding Merge-Ins
This is equivalent to a diff from 9afc42d70d to 3cac6cdb86
2013-02-14
| ||
15:32 | Fold in Peter Reid's fixes and enhancements to the sqlite4_num object. check-in: 8ede88c1df user: drh tags: trunk | |
01:51 | Fix sqlite4_num_to_text when formatting an integer with a negative exponent. It was leaving an uninitialized byte in the destination string. Leaf check-in: 3cac6cdb86 user: peterreid tags: num_work | |
2013-02-11
| ||
14:03 | Add test fixture functions for sqlite4_num_isinf and sqlite4_num_isnan, and some related test cases. check-in: 58a9cfcb39 user: peterreid tags: num_work | |
2013-02-09
| ||
16:55 | Have worker clients and writers that discard an old in-memory tree update a read-lock slot before concluding their work or write transaction. This is required for read-only clients - which cannot set the value of their own read-lock slot. check-in: 798d9e23be user: dan tags: trunk | |
05:27 | Make LARGEST_UINT64 unsigned. This was causing adjustExponent to fail when compiled with msvc. check-in: 9ff6991d9f user: peterreid tags: num_work | |
2013-02-08
| ||
15:22 | Avoid extending the database file when truncating it to the minimum number of blocks required during system shutdown. check-in: 9afc42d70d user: dan tags: trunk | |
14:39 | Changes to lsm_unix.c to build on android: (a) do not use fdatasync() on android and (b) account for the fact that usleep() returns void on android. check-in: 302b222395 user: dan tags: trunk | |
Changes to src/math.c.
︙ | |||
211 212 213 214 215 216 217 218 219 220 221 222 223 224 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | + + + + + + + + + + + + + + | r.sign = A.sign ^ B.sign; r.approx = A.approx | B.approx; if( r.approx==0 && A.m%B.m!=0 ) r.approx = 1; r.m = A.m/B.m; r.e = A.e - B.e; return r; } /* ** Test if A is infinite. */ int sqlite4_num_isinf(sqlite4_num A){ return A.e>SQLITE4_MX_EXP && A.m!=0; } /* ** Test if A is NaN. */ int sqlite4_num_isnan(sqlite4_num A){ return A.e>SQLITE4_MX_EXP && A.m==0; } /* ** Compare numbers A and B. Return: ** ** 1 if A<B ** 2 if A==B ** 3 if A>B |
︙ | |||
237 238 239 240 241 242 243 244 245 246 247 248 249 250 | 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | + | return A.sign ? 1 : 3; } if( B.e>SQLITE4_MX_EXP ){ if( B.m==0 ) return 0; return B.sign ? 3 : 1; } if( A.sign!=B.sign ){ if ( A.m==0 && B.m==0 ) return 2; return A.sign ? 1 : 3; } adjustExponent(&A, &B); if( A.sign ){ sqlite4_num t = A; A = B; B = t; |
︙ | |||
319 320 321 322 323 324 325 | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | i = incr; }else if( zIn[0]=='+' ){ i = incr; }else{ i = 0; } if( nIn<=0 ) goto not_a_valid_number; |
︙ | |||
465 466 467 468 469 470 471 | 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | - - + + + + | zNum += m; n -= m; removeTrailingZeros(zNum, &n); if( n>0 ){ zOut[0] = '.'; memcpy(zOut+1, zNum, n); nOut += n; |
︙ |
Changes to src/sqlite.h.in.
︙ | |||
4343 4344 4345 4346 4347 4348 4349 | 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 | - + | ** Every number in SQLite is represented in memory by an instance of ** the following object. */ typedef struct sqlite4_num sqlite4_num; struct sqlite4_num { unsigned char sign; /* Sign of the overall value */ unsigned char approx; /* True if the value is approximate */ |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
460 461 462 463 464 465 466 | 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | - + | /* ** Constants for the largest and smallest possible 64-bit signed integers. ** These macros are designed to work correctly on both 32-bit and 64-bit ** compilers. */ #define LARGEST_INT64 (0xffffffff|(((i64)0x7fffffff)<<32)) #define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64) |
︙ |
Added test/num.test.