Quadruple 128-bit Floating Point Libraryhttp://quadruple.codeplex.com/project/feeds/rss128-bit floating point library with 64 effective bits of precision (vs. 53 for the built-in Double type) and a 64 bit exponent (vs. 11 for Doubles). Greater range avoids under/overflows and makes log arithmetic unnecessary.Reviewed: Quadruple 2.0 (Sep 08, 2016)https://quadruple.codeplex.com/releases/view/77204#ReviewBy-polanddmRated 5 Stars (out of 5) - Very nice library. I have used it for some hobbyist numerical research and it has performed admirably. Any thoughts on adding trigonometric functions? I have faked it currently (casting to double, I know, cheat) but was curious.polanddmThu, 08 Sep 2016 21:20:47 GMTReviewed: Quadruple 2.0 (Sep 08, 2016) 20160908092047PReviewed: Quadruple 2.0 (Jan 16, 2016)https://quadruple.codeplex.com/releases/view/77204#ReviewBy-real3dRated 3 Stars (out of 5) - I would recommend double128 (http://www.cg-inc.com/Product/Double128)real3dSun, 17 Jan 2016 03:52:25 GMTReviewed: Quadruple 2.0 (Jan 16, 2016) 20160117035225AReviewed: Quadruple 2.0 (Oct 30, 2014)https://quadruple.codeplex.com/releases/view/77204#ReviewBy-scrambleRated 3 Stars (out of 5) - The library's name is somewhat misleading... It would be good if author stressed that his implemetation of quadruple-precision floats does not follow the IEEE 754 standard. As a result, arithmetic precision (machine epsilon) of the Quad-type numbers is that of 80-bit extended precision floats (i.e ca. 1.084E-19), and not that of IEEE-standard 128-bit floats (ca. 1.926E-34). scrambleThu, 30 Oct 2014 17:05:17 GMTReviewed: Quadruple 2.0 (Oct 30, 2014) 20141030050517PReviewed: Quadruple 2.0 (Jul 09, 2013)https://quadruple.codeplex.com/releases/view/77204#ReviewBy-shawnsnyderRated 5 Stars (out of 5) - Having created my own bignum math library, I know how much work is involved in creating and optimizing something like this. Well documented and he's letting the public freely use his hours and hours of labor. Appreciated.shawnsnyderTue, 09 Jul 2013 14:55:25 GMTReviewed: Quadruple 2.0 (Jul 09, 2013) 20130709025525PSource code checked in, #15166http://quadruple.codeplex.com/SourceControl/changeset/changes/15166Upgrade: New Version of LabDefaultTemplate.xaml. To upgrade your build definitions, please visit the following link: http://go.microsoft.com/fwlink/?LinkId=254563Project Collection Service AccountsMon, 01 Oct 2012 21:15:16 GMTSource code checked in, #15166 20121001091516PSource code checked in, #15165http://quadruple.codeplex.com/SourceControl/changeset/changes/15165Checked in by server upgradeProject Collection Service AccountsMon, 01 Oct 2012 21:13:14 GMTSource code checked in, #15165 20121001091314PReviewed: Quadruple 2.0 (Aug 08, 2012)http://quadruple.codeplex.com/releases/view/77204#ReviewBy-AlexKvenRated 4 Stars (out of 5) - This is great! This is the only quadruple precision solution I found, and this would work great in a new math library I am making. The only things I have problems with is that it should be an immutable type, like doubles, and since my mathlibrary is portable, I can't use any unsafe code :-(AlexKvenWed, 08 Aug 2012 20:33:13 GMTReviewed: Quadruple 2.0 (Aug 08, 2012) 20120808083313PReviewed: Quadruple 2.0 (Aug 08, 2012)http://quadruple.codeplex.com/releases/view/77204#ReviewBy-AlexKvenRated 5 Stars (out of 5) - This is great! This is the only quadruple precision solution I found, and this would work great in a new math library I am making.AlexKvenWed, 08 Aug 2012 19:46:06 GMTReviewed: Quadruple 2.0 (Aug 08, 2012) 20120808074606PSource code checked in, #11324http://quadruple.codeplex.com/SourceControl/changeset/changes/11324Updated AssemblyInfojeffpasternackSun, 13 May 2012 04:04:33 GMTSource code checked in, #11324 20120513040433ASource code checked in, #11323http://quadruple.codeplex.com/SourceControl/changeset/changes/11323Added ICompare<Quad> interface, Quad.Sign() method.jeffpasternackSun, 13 May 2012 04:02:39 GMTSource code checked in, #11323 20120513040239AUpdated Wiki: Homehttp://quadruple.codeplex.com/wikipage?version=17<div class="wikidoc">Signed 128-bit floating point data type library, with 64 effective bits of precision (vs. 53 for Doubles) and a 64 bit exponent (vs. 11 for Doubles). Quads have greater precision and far greater range than Doubles and are especially useful when dealing with very large or very small values, such as those in probabilistic models. As of version 2.0, all Quad arithmetic is checked (underflowing to 0, overflowing to +/- infinity), has special PositiveInfinity, NegativeInfinity, and NaN values, and follows the same rules as .Net Double arithmetic and comparison operators (e.g. 1/0 == PositiveInfinity, 0 * PositiveInfinity == NaN, NaN != NaN), making it a convenient drop-in replacement for Doubles in existing code.<br /><br />Adopting a larger fixed precision rather than an arbitrary precision type (such as Java's BigDecimal) means that, while still slower than built-in arithmetic, the penalty is only an order of magnitude or less and thus still feasible in many math-heavy applications. For example, on an Intel Core i5-2410M laptop, 10 billion multiplications take 17 seconds with Double values, 163 seconds with Quad values using the overloaded * operator, 134 seconds with the Multiply() method (faster than * due to the poor inlining logic of the .Net compiler/JIT optimizer), and just 105 seconds with the MultiplyUnchecked() method which assumes no underflow or overflow. By comparison, the commonly-used workaround for multiplication underflow and overflow, summing logarithms, takes 140 seconds. In addition to being faster and more precise than log arithmetic, Quads also simplify code by eliminating the need to remember which variables are log'd and converting back and forth to log'd values. <a href="http://quadruple.codeplex.com/wikipage?title=Version%201.0&referringTitle=Home">Version 1.0</a> of the library is even faster (up to ~25%) and is still available, but lacks the underflow and overflow detection of v.2.0; future revisions to v.2.0 should narrow the performance gap as branch misprediction is reduced by reordering code.<br /><br />The Quadruple library is written in C# and targets .Net 4.0; it should also be easily portable to .Net 2.0 and similar languages (such as Java) with straightforward modifications.</div><div class="ClearBoth"></div>jeffpasternackMon, 21 Nov 2011 04:16:00 GMTUpdated Wiki: Home 20111121041600AUpdated Wiki: Homehttp://quadruple.codeplex.com/wikipage?version=16<div class="wikidoc">Signed 128-bit floating point data type library, with 64 effective bits of precision (vs. 53 for Doubles) and a 64 bit exponent (vs. 11 for Doubles). Quads have greater precision and far greater range than Doubles and are especially useful when dealing with very large or very small values, such as those in probabilistic models. As of version 2.0, all Quad arithmetic is checked (underflowing to 0, overflowing to +/- infinity), has special PositiveInfinity, NegativeInfinity, and NaN values, and follows the same rules as .Net Double arithmetic and comparison operators (e.g. 1/0 == PositiveInfinity, 0 * PositiveInfinity == NaN, NaN != NaN), making it a convenient drop-in replacement for Doubles in existing code.<br /><br />Adopting a larger fixed precision rather than an arbitrary precision type (such as Java's BigDecimal) means that, while still slower than built-in arithmetic, the penalty is only an order of magnitude or less and thus still feasible in many math-heavy applications. For example, on an Intel Core i5-2410M laptop, 10 billion multiplications take 17 seconds with Double values, 163 seconds with Quad values using the overloaded * operator, 134 seconds with the Multiply() method (faster than * due to the poor inlining logic of the .Net compiler/JIT optimizer), and just 105 seconds with the MultiplyUnchecked() method which assumes no underflow or overflow. By comparison, the commonly-used workaround for multiplication underflow and overflow, summing logarithms, takes 130 seconds. In addition to being faster and more precise than log arithmetic, Quads also simplify code by eliminating the need to remember which variables are log'd and converting back and forth to log'd values. <a href="http://quadruple.codeplex.com/wikipage?title=Version%201.0&referringTitle=Home">Version 1.0</a> of the library is even faster (up to ~25%) and is still available, but lacks the underflow and overflow detection of v.2.0; future revisions to v.2.0 should narrow the performance gap as branch misprediction is reduced by reordering code.<br /><br />The Quadruple library is written in C# and targets .Net 4.0; it should also be easily portable to .Net 2.0 and similar languages (such as Java) with straightforward modifications.</div><div class="ClearBoth"></div>jeffpasternackMon, 21 Nov 2011 02:08:46 GMTUpdated Wiki: Home 20111121020846AUpdated Wiki: Homehttp://quadruple.codeplex.com/wikipage?version=15<div class="wikidoc">Signed 128-bit floating point data type library, with 64 effective bits of precision (vs. 53 for Doubles) and a 64 bit exponent (vs. 11 for Doubles). Quads have greater precision and far greater range than Doubles and are especially useful when dealing with very large or very small values, such as those in probabilistic models. As of version 2.0, all Quad arithmetic is checked (underflowing to 0, overflowing to +/- infinity), has special PositiveInfinity, NegativeInfinity, and NaN values, and follows the same rules as .Net Double arithmetic and comparison operators (e.g. 1/0 == PositiveInfinity, 0 * PositiveInfinity == NaN, NaN != NaN), making it a convenient drop-in replacement for Doubles in existing code.<br /><br />Adopting a larger fixed precision rather than an arbitrary precision type (such as Java's BigDecimal) means that, while still slower than built-in arithmetic, the penalty is only an order of magnitude or less and thus still feasible in many math-heavy applications. For example, on an Intel Core i5-2410M laptop, 10 billion multiplications take 17 seconds with Double values, 163 seconds with Quad values using the overloaded * operator, 134 seconds with the Multiply() method (faster than * due to the poor inlining logic of the .Net compiler/JIT optimizer), and just 105 seconds with the MultiplyUnchecked() method which assumes no underflow or overflow. By comparison, the commonly-used workaround for multiplication underflow and overflow, summing logarithms, takes 130 seconds. In addition to being faster and more precise than log arithmetic, Quads also simplify code by eliminating the need to remember which variables are log'd and converting back and forth to log'd values. <a href="http://quadruple.codeplex.com/wikipage?title=Version%201.0&referringTitle=Home">Version 1.0</a> of the library is even faster (up to ~25%) and is still available, but lacks the underflow and overflow detection of v.2.0; future revisions to v.2.0 will narrow the gap as branch misprediction is reduced by reordering code.<br /><br />The Quadruple library is written in C# and targets .Net 4.0; it should also be easily portable to .Net 2.0 and similar languages (such as Java) with straightforward modifications.</div><div class="ClearBoth"></div>jeffpasternackMon, 21 Nov 2011 02:08:23 GMTUpdated Wiki: Home 20111121020823AUpdated Wiki: Homehttp://quadruple.codeplex.com/wikipage?version=14<div class="wikidoc">Signed 128-bit floating point data type library, with 64 effective bits of precision (vs. 53 for Doubles) and a 64 bit exponent (vs. 11 for Doubles). Quads have greater precision and far greater range than Doubles and are especially useful when dealing with very large or very small values, such as those in probabilistic models. As of version 2.0, all Quad arithmetic is checked (underflowing to 0, overflowing to +/- infinity), has special PositiveInfinity, NegativeInfinity, and NaN values, and follows the same rules as .Net Double arithmetic and comparison operators (e.g. 1/0 == PositiveInfinity, 0 * PositiveInfinity == NaN, NaN != NaN), making it a convenient drop-in replacement for Doubles in existing code.<br /><br />Adopting a larger fixed precision rather than an arbitrary precision type (such as Java's BigDecimal) means that, while still slower than built-in arithmetic, the penalty is only an order of magnitude or less and thus still feasible in many math-heavy applications. For example, on an Intel Core i5-2410M laptop, 10 billion multiplications take 17 seconds with Double values, 163 seconds with Quad values using the overloaded * operator, 134 seconds with the Multiply() method (faster than * due to the poor inlining logic of the .Net compiler/JIT optimizer), and just 105 seconds with the MultiplyUnchecked() method which assumes no underflow or overflow. By comparison, the commonly-used workaround for multiplication underflow and overflow, summing logarithms, takes 130 seconds. In addition to being faster and more precise than log arithmetic, Quads also simplify code by eliminating the need to remember which variables are log'd and converting back and forth to log'd values. <a href="http://quadruple.codeplex.com/wikipage?title=Version%201.0&referringTitle=Home">Version 1.0</a> of the library is even faster (up to ~25%) and is still available, but lacks the underflow and overflow detection of v.2.0.<br /><br />The Quadruple library is written in C# and targets .Net 4.0; it should also be easily portable to .Net 2.0 and similar languages (such as Java) with straightforward modifications.</div><div class="ClearBoth"></div>jeffpasternackMon, 21 Nov 2011 01:36:19 GMTUpdated Wiki: Home 20111121013619AUpdated Wiki: Homehttp://quadruple.codeplex.com/wikipage?version=13<div class="wikidoc">Signed 128-bit floating point data type library, with 64 effective bits of precision (vs. 53 for Doubles) and a 64 bit exponent (vs. 11 for Doubles). Quads have greater precision and far greater range than Doubles and are especially useful when dealing with very large or very small values, such as those in probabilistic models. As of version 2.0, all Quad arithmetic is checked (underflowing to 0, overflowing to +/- infinity), has special PositiveInfinity, NegativeInfinity, and NaN values, and follows the same rules as .Net Double arithmetic and comparison operators (e.g. 1/0 == PositiveInfinity, 0 * PositiveInfinity == NaN, NaN != NaN), making it a convenient drop-in replacement for Doubles in existing code.<br /><br />Adopting a larger fixed precision rather than an arbitrary precision type (such as Java's BigDecimal) means that, while still slower than built-in arithmetic, the penalty is only an order of magnitude or less and thus still feasible in many math-heavy applications. For example, on an Intel Core i5-2410M laptop, 10 billion multiplications take 17 seconds with Double values, 163 seconds with Quad values using the overloaded * operator, 134 seconds with the Multiply() method (faster than * due to the poor inlining logic of the .Net compiler/JIT optimizer), and just 105 seconds with the MultiplyUnchecked() method which assumes no underflow or overflow. By comparison, the commonly-used workaround for multiplication underflow and overflow, summing logarithms, takes 130 seconds. In addition to being faster and more precise than log arithmetic, Quads also simplify code by eliminating the need to remember which variables are log'd and converting back and forth to log'd values. [Version 1.0] of the library is even faster (up to ~25%) and is still available, but lacks the underflow and overflow detection of v.2.0.<br /><br />The Quadruple library is written in C# and targets .Net 4.0; it should also be easily portable to .Net 2.0 and similar languages (such as Java) with straightforward modifications. </div><div class="ClearBoth"></div>jeffpasternackMon, 21 Nov 2011 01:36:04 GMTUpdated Wiki: Home 20111121013604AUpdated Wiki: Homehttp://quadruple.codeplex.com/wikipage?version=12<div class="wikidoc">Signed 128-bit floating point data type library, with 64 effective bits of precision (vs. 53 for Doubles) and a 64 bit exponent (vs. 11 for Doubles). Quads have greater precision and far greater range than Doubles and are especially useful when dealing with very large or very small values, such as those in probabilistic models. As of version 2.0, all Quad arithmetic is checked (underflowing to 0, overflowing to +/- infinity), has special PositiveInfinity, NegativeInfinity, and NaN values, and follows the same rules as .Net Double arithmetic and comparison operators (e.g. 1/0 == PositiveInfinity, 0 * PositiveInfinity == NaN, NaN != NaN), making it a convenient drop-in replacement for Doubles in existing code.<br /><br />Adopting a larger fixed precision rather than an arbitrary precision type (such as Java's BigDecimal) means that, while still slower than built-in arithmetic, the penalty is only an order of magnitude or less and thus still feasible in many math-heavy applications. For example, on an Intel Core i5-2410M laptop, 10 billion multiplications take 17 seconds with Double values, 163 seconds with Quad values using the overloaded * operator, 134 seconds with the Multiply() method (faster than * due to the poor inlining logic of the .Net compiler/JIT optimizer), and just 105 seconds with the MultiplyUnchecked() method which assumes no underflow or overflow. By comparison, the commonly-used workaround for multiplication underflow and overflow, summing logarithms, takes 130 seconds. In addition to being faster and more precise than log arithmetic, Quads also simplify code by eliminating the need to remember which variables are log'd and converting back and forth to log'd values. [Version 1.0] of the library is even faster (up to ~25%) and is still available, but lacks the underflow and overflow detection of v.2.0.<br /><br />The Quadruple library is written in C# and targets .Net 4.0; it should also be easily portable to .Net 2.0 and similar languages (such as Java) with straightforward modifications. </div><div class="ClearBoth"></div>jeffpasternackMon, 21 Nov 2011 01:33:18 GMTUpdated Wiki: Home 20111121013318AUpdated Wiki: Homehttp://quadruple.codeplex.com/wikipage?version=11<div class="wikidoc">Signed 128-bit floating point data type library, with 64 effective bits of precision (vs. 53 for Doubles) and a 64 bit exponent (vs. 11 for Doubles). Quads thus have greater precision and far greater range than Doubles and are especially useful when dealing with very large or very small values, such as those in probabilistic models. As of version 2.0, all Quad arithmetic is checked (underflowing to 0, overflowing to +/- infinity), has special PositiveInfinity, NegativeInfinity, and NaN values, and follows the same rules as .Net Double arithmetic and comparison operators (e.g. 1/0 == PositiveInfinity, 0 * PositiveInfinity == NaN, NaN != NaN), making it a convenient drop-in replacement for Doubles in existing code.<br /><br />Adopting a larger fixed precision rather than an arbitrary precision type (such as Java's BigDecimal) means that, while still slower than built-in arithmetic, the penalty is only an order of magnitude or less and thus still feasible in many math-heavy applications. For example, on an Intel Core i5-2410M laptop, 10 billion multiplications take 17 seconds with Double values, 163 seconds with Quad values using the overloaded * operator, 134 seconds with the Multiply() method (faster than * due to the poor inlining logic of the .Net compiler/JIT optimizer), and just 105 seconds with the MultiplyUnchecked() method which assumes no underflow or overflow. By comparison, the commonly-used workaround for multiplication underflow and overflow, summing logarithms, takes 130 seconds. In addition to being faster and more precise than log arithmetic, Quads also simplify code by eliminating the need to remember which variables are log'd and converting back and forth to log'd values. [Version 1.0] of the library is even faster (up to ~25%) and is still available, but lacks the underflow and overflow detection of v.2.0.<br /><br />The Quadruple library is written in C# and targets .Net 4.0; it should also be easily portable to .Net 2.0 and similar languages (such as Java) with straightforward modifications. </div><div class="ClearBoth"></div>jeffpasternackMon, 21 Nov 2011 01:32:53 GMTUpdated Wiki: Home 20111121013253AUpdated Wiki: Version 1.0http://quadruple.codeplex.com/wikipage?title=Version 1.0&version=1<div class="wikidoc"><h1>Notes on v.1.0</h1>
Version 1.0 of the library is still available and is forward-compatible to v.2.0 (a v.2.0 Quad may be initialized with the significant and exponent of a v.1.0 Quad and will have the same value; the reverse is also true except for the special PositiveInfinity, NegativeInfinity, and NaN values, which do not exist in v.1.0). Quadruple v.1.0 arithmetic is faster than Quadruple 2.0 arithmetic because there are no overflow or underflow checks or special values, although the advantage is small except in multiplication, where v.1.0 Multiply() takes only 76 seconds for 10 billion multiplication, about 25% faster than the v.2.0 MultiplyUnchecked(). Unless speed is vital and you are confident that you will not underflow or overflow (or will check for this yourself), use v.2.0. </div><div class="ClearBoth"></div>jeffpasternackMon, 21 Nov 2011 01:29:12 GMTUpdated Wiki: Version 1.0 20111121012912AUpdated Wiki: Homehttp://quadruple.codeplex.com/wikipage?version=10<div class="wikidoc"><h1>Quadruple</h1>
Signed 128-bit floating point data type library, with 64 effective bits of precision (vs. 53 for Doubles) and a 64 bit exponent (vs. 11 for Doubles). Quads thus have greater precision and far greater range than Doubles and are especially useful when dealing with very large or very small values, such as those in probabilistic models. As of version 2.0, all Quad arithmetic is checked (underflowing to 0, overflowing to +/- infinity), has special PositiveInfinity, NegativeInfinity, and NaN values, and follows the same rules as .Net Double arithmetic and comparison operators (e.g. 1/0 == PositiveInfinity, 0 * PositiveInfinity == NaN, NaN != NaN), making it a convenient drop-in replacement for Doubles in existing code.<br /><br />Adopting a larger fixed precision rather than an arbitrary precision type (such as Java's BigDecimal) means that, while still slower than built-in arithmetic, the penalty is only an order of magnitude or less and thus still feasible in many math-heavy applications. For example, on an Intel Core i5-2410M laptop, 10 billion multiplications take 17 seconds with Double values, 163 seconds with Quad values using the overloaded * operator, 134 seconds with the Multiply() method (faster than * due to the poor inlining logic of the .Net compiler/JIT optimizer), and just 105 seconds with the MultiplyUnchecked() method which assumes no underflow or overflow. By comparison, the commonly-used workaround for multiplication underflow and overflow, summing logarithms, takes 130 seconds. In addition to being faster and more precise than log arithmetic, Quads also simplify code by eliminating the need to remember which variables are log'd and converting back and forth to log'd values.<br />
<h1>Compatibility</h1>
The Quadruple library is written in C# and targets .Net 4.0; it should also be easily portable to .Net 2.0 and similar languages (such as Java) with straightforward modifications.</div><div class="ClearBoth"></div>jeffpasternackMon, 21 Nov 2011 01:28:30 GMTUpdated Wiki: Home 20111121012830AUpdated Wiki: Homehttp://quadruple.codeplex.com/wikipage?version=9<div class="wikidoc"><h1>Quadruple</h1>
Signed 128-bit floating point data type library, with 64 effective bits of precision (vs. 53 for Doubles) and a 64 bit exponent (vs. 11 for Doubles). Quads thus have greater precision and far greater range than Doubles and are especially useful when dealing with very large or very small values, such as those in probabilistic models. As of version 2.0, all Quad arithmetic is checked (underflowing to 0, overflowing to +/- infinity), has special PositiveInfinity, NegativeInfinity, and NaN values, and follows the same rules as .Net Double arithmetic and comparison operators (e.g. 1/0 == PositiveInfinity, 0 * PositiveInfinity == NaN, NaN != NaN), making it a convenient drop-in replacement for Doubles in existing code.<br /><br />Adopting a larger fixed precision rather than an arbitrary precision type (such as Java's BigDecimal) means that, while still slower than built-in arithmetic, the penalty is only an order of magnitude or less and thus still feasible in many math-heavy applications. For example, on an Intel Core i5-2410M laptop, 10 billion multiplications take 17 seconds with Double values, 163 seconds with Quad values using the overloaded * operator, 134 seconds with the Multiply() method (faster than * due to the poor inlining logic of the .Net compiler/JIT optimizer), and just 105 seconds with the MultiplyUnchecked() method which assumes no underflow or overflow. By comparison, the commonly-used workaround for multiplication underflow and overflow, summing logarithms, takes 130 seconds. In addition to being faster and more precise than log arithmetic, Quads also simplify code by eliminating the need to remember which variables are log'd and converting back and forth to log'd values.<br />
<h1>Previous Version</h1>
Version 1.0 of the library is still available and is forward-compatible to v.2.0 (a v.2.0 Quad may be initialized with the significant and exponent of a v.1.0 Quad and will have the same value; the reverse is also true except for the special PositiveInfinity, NegativeInfinity, and NaN values, which do not exist in v.1.0). Quadruple v.1.0 arithmetic is faster than Quadruple 2.0 arithmetic because there are no overflow or underflow checks or special values, although the advantage is small except in multiplication, where v.1.0 Multiply() takes only 76 seconds for 10 billion multiplication, about 25% faster than the v.2.0 MultiplyUnchecked(). Unless speed is vital and you are confident that you will not underflow or overflow (or will check for this yourself), use v.2.0. <br />
<h1>Compatibility</h1>
The Quadruple library is written in C# and targets .Net 4.0; it should also be easily portable to .Net 2.0 and similar languages (such as Java) with straightforward modifications.</div><div class="ClearBoth"></div>jeffpasternackMon, 21 Nov 2011 01:26:59 GMTUpdated Wiki: Home 20111121012659A