úÎ5§2l/      !"#$%&'()*+,-.(c) Edward Kmett 2013-2015BSD3Edward Kmett <ekmett@gmail.com> experimental non-portable Trustworthy/09;<=DMRT¤This provides a numeric data type with effectively doubled precision by using Knuth's error free transform and a number of custom compensated arithmetic circuits.@This construction can be iterated, doubling precision each time.Rround (Prelude.product [2..100] :: Compensated (Compensated (Compensated Double)))ž93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000Prelude.product [2..100]ž93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000This extracts both the  and  components of a  number.Used internally to construct + values that satisfy our residual contract.When in doubt, use  a b  instead of  a bThis  number is used to  Z the significand in half, so we can multiply them separately without losing precision in . a b k computes k x y such that x + y = a + b x = fl(a + b)Which is to say that x is the floating point image of (a + b) and y stores the residual error term. a b k computes k x y such that x + y = a + b x = fl(a + b)#but only under the assumption that / a 0 / b. If you aren't sure, use .Which is to say that x is the floating point image of (a + b) and y stores the residual error term. a b k computes k x y such that x + y = a * b x = fl(a * b)Which is to say that x is the floating point image of (a * b) and y stores the residual error term.FThis could be nicer if we had access to a hardware fused multiply-add.1"Priest's renormalization algorithm renorm a b c generates a  number assuming a 0 b 0 c.   a k computes k x y such that x + y = a * a x = fl(a * a)Which is to say that x is the floating point image of (a * a) and y stores the residual error term. 0Calculate a fast square of a compensated number. ;error-free split of a floating point number into two parts.%Note: these parts do not satisfy the  contract :Calculate a scalar + compensated sum with Kahan summation.Compute a *  ayThis provides the isomorphism between the compact representation we store these in internally and the naive pair of the  and  components.This 2 lets us edit the  directly, leaving the  untouched.This 2 lets us edit the  directly, leaving the  untouched. Extract the  component of a 8 value, when and if compensation is no longer required.$Perform Kahan summation over a list.TODO: do this right!NB:( Experimental and partially implemented.”Other than sqrt, the accuracy of these is basically uncalculated! In fact many of these are known to be wrong! Patches and improvements are welcome.<34567 1 89:; !"#$%&'()*+<,=->.    0 1 89:3;4 !"#$%&'()*+,<5-=6.>7?      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG(compensated-0.7.2-6c8v78gfl98GNzuPKXCmLONumeric.CompensatedOvercompensated Compensable Compensatedwith compensatedmagicaddfaddtimesdividesquaredsquaresplit+^*^ _Compensatedprimalresidual uncompensatedkahan$fPreciseCompensated$fFloatingCompensated$fVectorVectorCompensated$fMVectorMVectorCompensated$fStorableCompensated$fSafeCopyCompensated$fSerialCompensated$fSerializeCompensated$fBinaryCompensated$fRealFracCompensated$fRealCompensated$fFractionalCompensated$fEnumCompensated$fNumCompensated$fMonoidCompensated$fSemigroupCompensated$fOrdCompensated$fEqCompensated$fEachCompensatedCompensatedab$fReadCompensated$fShowCompensated$fNFDataCompensated$fDataCompensated$fHashableCompensated$fCompensableCompensated$fCompensableFloat$fCompensableDoublebaseGHC.Numabsghc-prim GHC.Classes>=renorm"lens-4.15.3-CKOZmcjeqfzKINQnbH4iubControl.Lens.TypeLens V_CompensatedMV_CompensatedCCCFCDcompensatedConstrcompensatedDataTypeD:R:VectorCompensated0D:R:MVectorsCompensated0D:R:CompensatedCompensated0D:R:CompensatedFloat0D:R:CompensatedDouble0