SQLite4
Check-in [555cdfbf52]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Create sqlite4_num_isinf
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | num_work
Files: files | file ages | folders
SHA1: 555cdfbf52187fd7e01826a6d6e848a5259c9a4b
User & Date: peterreid 2013-02-09 05:36:16
Context
2013-02-10
04:06
Add a few sqlite4_num tests. check-in: 6cc07d19e4 user: peterreid tags: num_work
2013-02-09
05:36
Create sqlite4_num_isinf check-in: 555cdfbf52 user: peterreid tags: num_work
05:35
Fix sqlite4_num_from_text in 0.000(many zeros)00123 case. check-in: 97728c04e8 user: peterreid tags: num_work
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/math.c.

   211    211     r.sign = A.sign ^ B.sign;
   212    212     r.approx = A.approx | B.approx;
   213    213     if( r.approx==0 && A.m%B.m!=0 ) r.approx = 1;
   214    214     r.m = A.m/B.m;
   215    215     r.e = A.e - B.e;
   216    216     return r;
   217    217   }
          218  +
          219  +/*
          220  +** Test if A is infinite.
          221  +*/
          222  +int sqlite4_num_isinf(sqlite4_num A){
          223  +  return A.e>SQLITE4_MX_EXP && A.m!=0;
          224  +}
   218    225   
   219    226   /*
   220    227   ** Test if A is NaN.
   221    228   */
   222    229   int sqlite4_num_isnan(sqlite4_num A){
   223    230     return A.e>SQLITE4_MX_EXP && A.m==0; 
   224    231   }