Documentation Source Text

Check-in [dcd828be81]
Login

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

Overview
Comment:Tweaks to the floatingpoint.html page.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: dcd828be81b3efebde3bab827a13427df9ac29ef150020920ac1cecc3e556819
User & Date: drh 2020-07-15 15:03:46
Context
2020-07-18
16:35
Documentation for UPDATE FROM. (check-in: ba3810c515 user: drh tags: trunk)
2020-07-17
17:35
Revise syntax diagrams to include the FROM clause on UPDATE statements. (Closed-Leaf check-in: bd9cdee968 user: drh tags: update-from)
2020-07-15
15:03
Tweaks to the floatingpoint.html page. (check-in: dcd828be81 user: drh tags: trunk)
01:43
Merge fixes from the 3.32 branch. (check-in: bd3dff05f9 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/floatingpoint.in.

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
</b></blockquote>

<p>If you remember nothing else about floating-point values, 
please don't forget this one key idea.

<h3>Is it close enough?</h3>

<p>15 significant digits of precision are sufficient for most computations.
For example, if "47.49" represents a price and inflation is running
at 2% per year, then the price is going up by about 0.0000000301 dollars per
second.  The error in the recorded value of 47.49 represents about 65 nanoseconds
worth of inflation.  So if 47.49 price is exact
when you enter it, then the effects of inflation will cause the value actually stored
(47.4900000000000019895196601282805204391479492187) to be exact about
65 nanoseconds later.
Surely that level of precision is sufficient for most purposes?

<h1>Extensions For Dealing With Floating Point Numbers</h1>

<tcl>hd_fragment ieee754ext {ieee754 extension}</tcl>
<h2>The ieee754.c Extension</h2>








|


|
|

|
|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
</b></blockquote>

<p>If you remember nothing else about floating-point values, 
please don't forget this one key idea.

<h3>Is it close enough?</h3>

<p>The precision provided by IEEE 754 Binary64 is sufficient for most computations.
For example, if "47.49" represents a price and inflation is running
at 2% per year, then the price is going up by about 0.0000000301 dollars per
second.  The error in the recorded value of 47.49 represents about 66 nanoseconds
worth of inflation.  So if the 47.49 price is exact
when you enter it, then the effects of inflation will cause the value actually stored
(47.4900000000000019895196601282805204391479492187) to be exact less than 
one ten-millionth of a second later.
Surely that level of precision is sufficient for most purposes?

<h1>Extensions For Dealing With Floating Point Numbers</h1>

<tcl>hd_fragment ieee754ext {ieee754 extension}</tcl>
<h2>The ieee754.c Extension</h2>