User Tools

Site Tools


tangle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tangle [2026/05/03 16:45] – created - external edit 127.0.0.1tangle [2026/05/05 22:26] (current) admin
Line 26: Line 26:
  
 <code> <code>
-g<del> -O3 -std=c</del>17 -static -o tangle tangle.cpp float256.cpp -lm+g++ -O3 -std=c++17 -static -o tangle tangle.cpp float256.cpp -lm
 </code> </code>
  
Line 116: Line 116:
  
 Two custom fixed-point types provide the extended precision, both implemented as one IEEE double (carrying the sign, exponent, and top 52 mantissa bits) plus additional unsigned 64-bit integers ("uint64_t") words that extend the mantissa: Two custom fixed-point types provide the extended precision, both implemented as one IEEE double (carrying the sign, exponent, and top 52 mantissa bits) plus additional unsigned 64-bit integers ("uint64_t") words that extend the mantissa:
- +  
-**float128** — double + 1×uint64_t, giving ~117 bits of mantissa   precision. Used for orient2d, where the 2×2 determinant structure   requires at most ~106 bits for an exact sign determination. +  **float128** — double + 1×uint64_t, giving ~117 bits of mantissa   precision. Used for orient2d, where the 2×2 determinant structure   requires at most ~106 bits for an exact sign determination. 
-**float256** — double + 3×uint64_t, giving ~245 bits of mantissa   precision. Used for inCircle, where the 3×3 determinant with squared   terms requires up to ~212 bits.+  **float256** — double + 3×uint64_t, giving ~245 bits of mantissa   precision. Used for inCircle, where the 3×3 determinant with squared   terms requires up to ~212 bits.
  
 This two-tier approach (double → float128 or float256) avoids the robustness failures that plague naive floating-point implementations while keeping the common case fast. Over 99% of predicate calls are resolved at double precision, and the few that fall through use the narrowest exact type sufficient for the predicate.  This two-tier approach (double → float128 or float256) avoids the robustness failures that plague naive floating-point implementations while keeping the common case fast. Over 99% of predicate calls are resolved at double precision, and the few that fall through use the narrowest exact type sufficient for the predicate. 
tangle.1777848335.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki