g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  Trustworthy < Et cetera=#A precision of 3 significant digits>#A precision of 2 significant digits?A precision of (p 2) significant digits@A precision of (p + 1) significant digitsA"A precision of 1 significant digitB+A precision of unlimited significant digitsC(A subclass of precisions that are finiteDXPrecision indicates the maximum number of significant decimal digits a number may have.)Return the precision of the argument, or  if the precision is infinite.^Return the maximum exponent for a number in scientific notation with the given precision, or  if the exponent has no limit.^Return the minimum exponent for a number in scientific notation with the given precision, or  if the exponent has no limit.O  !"#$%&'()*+,-./0123456789:;<=>?@ABCDD  !"#$%&'()*+,-./0123456789:;<=>?@ABCDL  !"#$%&'()*+,-./0123456789:;<=>?@ABCD Trustworthy X.(Round zero or five away from 0.) The same as Y, except that rounding up only occurs if the digit to be rounded up is 0 or 5, and after overflow the result is the same as for _.Y(Round away from 0.) If all of the discarded digits are zero the result is unchanged. Otherwise, the result coefficient should be incremented by 1 (rounded up).ZIf the discarded digits represent greater than half (0.5) of the value of a one in the next left position then the result coefficient should be incremented by 1 (rounded up). Otherwise (the discarded digits are 0.5 or less) the discarded digits are ignored.[F(Round toward "".) If all of the discarded digits are zero or if the signo is 0 the result is unchanged. Otherwise, the sign is 1 and the result coefficient should be incremented by 1.\F(Round toward +".) If all of the discarded digits are zero or if the signj is 1 the result is unchanged. Otherwise, the result coefficient should be incremented by 1 (rounded up).]*If the discarded digits represent greater than half (0.5) the value of a one in the next left position then the result coefficient should be incremented by 1 (rounded up). If they represent less than half, then the result coefficient is not adjusted (that is, the discarded digits are ignored).Otherwise (they represent exactly half) the result coefficient is unaltered if its rightmost digit is even, or incremented by 1 (rounded up) if its rightmost digit is odd (to make an even digit).^If the discarded digits represent greater than or equal to half (0.5) of the value of a one in the next left position then the result coefficient should be incremented by 1 (rounded up). Otherwise the discarded digits are ignored._W(Round toward 0; truncate.) The discarded digits are ignored; the result is unchanged.`pA rounding algorithm to use when the result of an arithmetic operation exceeds the precision of the result typea4A value representation of a rounding algorithm (cf. `).Round a _ to the precision of the arithmetic context using the rounding mode of the arithmetic context."XYZ[\]^_`abcdefghiXYZ[\]^_`acdgefhibXYZ[\]^_`abcdefghi Trustworthy:QA decimal floating point number with selectable precision and rounding algorithmPositive or non-negativeNegative4Return the number of decimal digits of the argument.7A decimal floating point number with infinite precisionNA decimal floating point number with selectable precision, rounding half evenMA decimal floating point number with 9 digits of precision, rounding half upCompute a generalized continued fraction to maximum precision. A hint is used to indicate the minimum number of terms that should be generated before (expensively) examining the results for convergence.0Compute an infinite series to maximum precision. YCompute the inverse tangent of the argument to maximum precision using series expansion. VCompute the inverse sine of the argument to maximum precision using series expansion. LCompute the inverse tangent of the (decimal) argument to maximum precision. tCompute the inverse tangent of the (rational) argument to maximum precision using a generalized continued fraction. >Compute the inverse sine of the argument to maximum precision.@Compute the inverse cosine of the argument to maximum precision.GCompute  to maximum precision using the inverse sine series expansion.HCompute  to maximum precision using the best-known Machin-like formula.Compute  to maximum precision using a generalized continued fraction that converges linearly, adding at least three decimal digits of precision per four terms.)Precomputed  to a precision of 50 digits!Compute /2 to maximum precision.!Compute /4 to maximum precision.OCompute (cos , sin ) to maximum precision using Volder's algorithm (CORDIC).ZCast a number to a number with two additional digits of precision and rounding half even.wCast a number with two additional digits of precision down to a number with the desired precision, rounding half even.Cast a number with two additional digits of precision down to a number with the desired precision, rounding half even, but returning a number type with arbitrary rounding.A  representing the value zeroA  representing the value A  representing the value A  representing the value oneA  representing the value twoA  representing the value threeA  representing the value ten A $ representing the value negative one!A ) representing the value positive infinity"A  representing undefined results# A signaling  representing undefined results$Negate the given  by directly flipping its sign.Cast a  to another precision and/or rounding algorithm, immediately rounding if necessary to the new precision using the new algorithm.%Cast a X to another rounding algorithm, maintaining the same precision. No new rounding occurs.&Is the sign of the given  positive?'Is the sign of the given  negative?(Does the given  represent a finite value?)Does the given  represent the value zero?* Is the given  normal?+ Is the given  subnormal?Return 0 or 1 if the argument is , or -0, respectively. This is basically an optimized . . /9 and allows an all-decimal usage of the operations from Numeric.Decimal.Operation that return a 0.1Return ,% if the argument is zero or NaN, and - otherwise.Return -1, 0, or 1 if the argument is 2, 3, or 4J, respectively. This allows an all-decimal usage of the operations from Numeric.Decimal.Operation that return an 5.61Upper limit on the absolute value of the exponent73Minimum value of the exponent for subnormal results8$Range of permissible exponent values9The :8 instance makes use of the logical operations from the (General Decimal Arithmetic Specification using a  digit-wise# representation of bits where the sign is non-negative, the exponent& is 0, and each decimal digit of the  coefficient must be either 0 or 1.; The constant < is precision-dependent.=Unlike the instances for > and ?, the lists returned by the @ and A methods in this instance terminate with the last element strictly less than (greater than in the case of a negative increment) or equal to the given bound.BUnlike the instances for > and ?, the CU method in this instance uses a total ordering over all possible values. Note that C x y == 3 does not imply x == y (and similarly for 2 and 4) in the cases where x or y are NaN values.DFNote that NaN values are not equal to any value, including other NaNs.EThe F instance uses the E operation from Numeric.Decimal.Conversion2 and rounds the result to the required precision.GThe H instance uses the F operation from Numeric.Decimal.Conversion.[IJKLMNOPQRSTUVWXYZ[\      !"#$%]&'()*+1678^_`a9b;cdef=BDgEGh*IJKNLMOPQRSTU !"#$&'()*+^_Q IJKLMNLLOPQRSTUVWXYZ[\      !"#$%]&'()*+1678^_`a9b;cdef=BDgEGh Trustworthy9;<=$G,A representation of an exceptional conditionIRaised when the exponent of a result has been altered or constrained in order to fit the constraints of a specific concrete representationJ2Raised when a non-zero dividend is divided by zeroKkRaised when a result is not exact (one or more non-zero coefficient digits were discarded during rounding)L5Raised when a result would be undefined or impossibleMCRaised when the exponent of a result is too large to be representedNiRaised when a result has been rounded (that is, some zero or non-zero coefficient digits were discarded)OHRaised when a result is subnormal (its adjusted exponent is less than Emin), before any roundingP2Raised when a result is both subnormal and inexactQ:A decimal arithmetic monad parameterized by the precision p and rounding mode rR}A context for decimal arithmetic, carrying signal flags, trap enabler state, and a trap handler, parameterized by precision p and rounding mode rS1The defined result for the exceptional conditionTSet the given signal flag in the context of the current arithmetic computation, and call the trap handler if the trap for this signal is currently enabled.U3Return the precision of the arithmetic context (or  if the precision is infinite).VEvaluate an arithmetic computation in the given context and return the final value or exception, discarding the resulting context.WJReturn a new context with all signal flags cleared and all traps disabled.A trap handler function may return a substitute result for the operation that caused the exceptional condition, or it may call i" to pass control to an enclosing j0 handler (or abort the arithmetic computation)./A group of signals can be manipulated as a set./The signal raised by the exceptional condition'The current signal flags of the contextk)The trap handler function for the contextRReturn a new context with all signal flags cleared, all traps enabled except for K, N, and Oi, using a precision of 9 significant decimal digits, and rounding half up. Trapped signals simply call i with the corresponding G, and can be caught using j.Return a new context with all signal flags cleared, all traps disabled (IEEE 854 7), using selectable precision, and rounding half even (IEEE 754 4.3.3).yEvaluate an arithmetic computation in the given context and return the final value (or exception) and resulting context.CPerform a subcomputation using a different precision and/or rounding mode. The subcomputation is evaluated within a new context with all flags cleared and all traps disabled. Any flags set in the context of the subcomputation are ignored, but if an exception is returned it will be re-raised within the current context.3Return the rounding mode of the arithmetic context.)Create a set of signals from a singleton.$Create a set of signals from a list.A set containing every signall#Enumerate the given set of signals.m0Remove the first set of signals from the second.0Determine whether a signal is a member of a set.UClear the given signal flags from the context of the current arithmetic computation.6Evaluate an arithmetic computation within a modified context that enables the given signals to be trapped by the given handler. The previous trap handler (and enabler state) will be restored during any trap, as well as upon completion. Any existing trap handlers for signals not mentioned remain in effect.The R7 of an arithmetic computation may be manipulated using n and oE, et al. For example, the current signal flags can be observed with p .Traps (vis--vis  ) may call i: to abort the arithmetic computation (or be caught using j)..GHIJKLMNOPQqRSTUVWrstklm)GSHMPIJKLNOQRTUVWacdgefhib,RWUabcdefghiQVGSSHIJKLMNOPTGsSHIJKLMNOPQqRtkTUVWrlm TrustworthyEConvert a string to a number, as defined by its abstract representation. The string is expected to conform to the numeric string syntax described here.FRConvert a number to a string, using scientific notation if an exponent is needed.SConvert a number to a string, using engineering notation if an exponent is needed.EFuvEFFEEFuv Trustworthy9;A type (with a D9 instance) for specifying interchange format parameters k and coefficient encoding cHSpecify a binary encoding for the coefficient (currently unimplemented)./Specify a decimal encoding for the coefficient.w+A class encapsulating coefficient encodingsParameters for a decimal{k 2} interchange formatParameters for a decimal{k + 32} interchange formatParameters for the  decimal128 interchange formatParameters for the  decimal64 interchange formatParameters for the  decimal32 interchange formatRInterchange format parameters used to define an encoding and derive the format's  precision and EmaxxkW/32, the primary format parameter defining the encoding width as a multiple of 32 bits A type with D instance specifying  decimal128 interchange format parameters (using a decimal encoding for the coefficient) having an effective precision of 34 decimal digits A type with D instance specifying  decimal64 interchange format parameters (using a decimal encoding for the coefficient) having an effective precision of 16 decimal digits A type with D instance specifying  decimal32 interchange format parameters (using a decimal encoding for the coefficient) having an effective precision of 7 decimal digitsA decimal floating point number with 34 digits of precision, rounding half even, and a 128-bit encoded representation using the  decimal128B interchange format (with a decimal encoding for the coefficient)A decimal floating point number with 16 digits of precision, rounding half even, and a 64-bit encoded representation using the  decimal64B interchange format (with a decimal encoding for the coefficient)A decimal floating point number with 7 digits of precision, rounding half even, and a 32-bit encoded representation using the  decimal32B interchange format (with a decimal encoding for the coefficient)yp, precision in digitszemax{bias, E " q|w%, combination field width in bits " 5}t9/10, trailing significand field width in 10-bit multiplesA ~: instance is defined for interchange formats for which a . instance exists, and covers particularly the , , and  types.This D% instance automatically computes the  precision and Emax) of decimal numbers that use this format.,wxyz{|}&wxyz{|}  Trustworthy This occurs and signals N whenever the result of an operation is rounded (that is, some zero or non-zero digits were discarded from the coefficient), or if an overflow or underflow condition occurs. The result in all cases is unchanged.The N} signal may be tested (or trapped) to determine if a given operation (or sequence of operations) caused a loss of precision.This occurs and signals K whenever the result of an operation is not exact (that is, it needed to be rounded and any discarded digits were non-zero), or if an overflow or underflow condition occurs. The result in all cases is unchanged.The Kn signal may be tested (or trapped) to determine if a given operation (or sequence of operations) was inexact.This occurs and signals I0 if the exponent of a result has been altered in order to fit the constraints of a specific concrete representation. This may occur when the exponent of a zero result would be outside the bounds of a representation, or (in the IEEE 754 interchange formats) when a large normal number would have an encoded exponent that cannot be represented. In this latter case, the exponent is reduced to fit and the corresponding number of zero digits are appended to the coefficient ( fold-down ). The condition always occurs when a subnormal value rounds to zero.This occurs and signals Lr if a string is being converted to a number and it does not conform to the numeric string syntax. The result is [0,qNaN].This occurs and signals JA if division of a finite number by zero was attempted (during a   or   operation, or a  M operation with negative right-hand operand), and the dividend was not zero.The result of the operation is [sign,inf], where signj is the exclusive or of the signs of the operands for divide, or is 1 for an odd power of "0, for power.This occurs and signals L if the integer result of a   or  6 operation had too many digits (would be longer than  precision). The result is [0,qNaN].This occurs and signals L. if division by zero was attempted (during a  ,  , or  ; operation), and the dividend is also zero. The result is [0,qNaN].VFor many implementations, storage is needed for calculations and intermediate results, and on occasion an arithmetic operation may fail due to lack of storage. This is considered an operating environment error, which can be either be handled as appropriate for the environment, or treated as an Invalid operation condition. The result is [0,qNaN].This occurs and signals L if an invalid context was detected during an operation. This can occur if contexts are not checked on creation and either the  precision` exceeds the capability of the underlying concrete representation or an unknown or unsupported rounding{ was specified. These aspects of the context need only be checked when the values are required to be used. The result is [0,qNaN].This occurs and signals L if: an operand to an operation is [s,sNaN] or  [s,sNaN,d] (any  signaling NaN)an attempt is made to add [0,inf] to [1,inf]- during an addition or subtraction operation$an attempt is made to multiply 0 by [0,inf] or [1,inf]$an attempt is made to divide either [0,inf] or [1,inf] by either [0,inf] or [1,inf]-the divisor for a remainder operation is zero1the dividend for a remainder operation is either [0,inf] or [1,inf]either operand of the , operation is infinite, or the result of a = operation would require greater precision than is availablethe operand of the  or the  operation is less than zerothe operand of the  operation has a sign of 1 and a non-zero  coefficientboth operands of the   operation are zero, or if the left-hand operand is less than zero and the right-hand operand does not have an integral value or is infinitean operand is invalid; for example, certain values of concrete representations may not correspond to numbers  an implementation is permitted (but is not required) to detect these invalid values and raise this condition.FThe result of the operation after any of these invalid operations is [0,qNaN]H except when the cause is a signaling NaN, in which case the result is [s,qNaN] or  [s,qNaN,d]B where the sign and diagnostic are copied from the signaling NaN.This occurs and signals M if the adjusted exponent of a result (from a conversion or from an operation that is not an attempt to divide by zero), after rounding, would be greater than the largest value that can be handled by the implementation (the value Emax).(The result depends on the rounding mode:For ^ and ] (and for Z and Y8, if implemented), the result of the operation is [sign,inf ], where sign( is the sign of the intermediate result.For _, (and Xc, if implemented), the result is the largest finite number that can be represented in the current  precision,, with the sign of the intermediate result.For \ , the result is the same as for _5 if the sign of the intermediate result is 1, or is [0,inf] otherwise.For [ , the result is the same as for _5 if the sign of the intermediate result is 0, or is [1,inf] otherwise.In all cases,  and  will also be raised.Note: IEEE 854 7.3 requires that the result delivered to a trap handler be different, depending on whether the overflow was the result of a conversion or of an arithmetic operation. This specification deviates from IEEE 854 in this respect; however, an implementation could comply with IEEE 854 by providing a separate mechanism for the special result to a trap handler. IEEE 754 has no such requirement.This occurs and signals Oo whenever the result of a conversion or operation is subnormal (that is, its adjusted exponent is less than Emin=, before any rounding). The result in all cases is unchanged.The O signal may be tested (or trapped) to determine if a given or operation (or sequence of operations) yielded a subnormal result.This occurs and signals P! if a result is inexact and the adjusted exponent of the result would be smaller (more negative) than the smallest value that can be handled by the implementation (the value Emin5). That is, the result is both inexact and subnormal.xThe result after an underflow will be a subnormal number rounded, if necessary, so that its exponent is not less than EtinyU. This may result in 0 with the sign of the intermediate result and an exponent of Etiny.In all cases, , , and  will also be raised.Note: IEEE 854 7.4 requires that the result delivered to a trap handler be different, depending on whether the underflow was the result of a conversion or of an arithmetic operation. This specification deviates from IEEE 854 in this respect; however, an implementation could comply with IEEE 854 by providing a separate mechanism for the result to a trap handler. IEEE 754 has no such requirement.    Trustworthy<jjE takes two operands. The second operand must be an integer (with an exponent of 0) in the range  "precision through  precision. If the first operand is a NaN then the general arithmetic rules apply, and if it is infinite then the result is the Infinity unchanged.@Otherwise (the first operand is finite) the result has the same sign and exponent as the first operand, and a  coefficient which is a rotated copy of the digits in the coefficient of the first operand. The number of places of rotation is taken from the absolute value of the second operand, with the rotation being to the left if the second operand is positive or to the right otherwise.7If the coefficient of the first operand has fewer than  precisionS digits, it is treated as though it were padded on the left with zeros to length  precisionX before the rotation. Similarly, if the coefficient of the first operand has more than  precision1 digits, it is truncated on the left before use. The only flag that might be set is LC (set if the first operand is an sNaN or the second is not valid).The kB operation can be used to shift rather than rotate a coefficient.kkE takes two operands. The second operand must be an integer (with an exponent of 0) in the range  "precision through  precision. If the first operand is a NaN then the general arithmetic rules apply, and if it is infinite then the result is the Infinity unchanged.@Otherwise (the first operand is finite) the result has the same sign and exponent as the first operand, and a  coefficient6 which is a shifted copy of the digits in the coefficient of the first operand. The number of places to shift is taken from the absolute value of the second operand, with the shift being to the left if the second operand is positive or to the right otherwise. Digits shifted into the coefficient are zeros. The only flag that might be set is LC (set if the first operand is an sNaN or the second is not valid).The jB operation can be used to rotate rather than shift a coefficient.llW is a logical operation which takes one logical operand. The result is the digit-wise  inversion of the operand; each digit of the result is the inverse of the corresponding digit of the operand. A result digit is 1 if the corresponding operand digit is 0; otherwise it is 0.mmX is a logical operation which takes two logical operands. The result is the digit-wise  exclusive or of the two operands; each digit of the result is the logical exclusive-or of the corresponding digits of the operands, aligned at the least-significant digit. A result digit is 1 if one of the corresponding operand digits is 1 and the other is 0; otherwise it is 0.nnX is a logical operation which takes two logical operands. The result is the digit-wise  inclusive or of the two operands; each digit of the result is the logical or of the corresponding digits of the operands, aligned at the least-significant digit. A result digit is 1 if either or both of the corresponding operand digits is 1; otherwise it is 0.ooX is a logical operation which takes two logical operands. The result is the digit-wise and of the two operands; each digit of the result is the logical and of the corresponding digits of the operands, aligned at the least-significant digit. A result digit is 1 if both of the corresponding operand digits are 1; otherwise it is 0.pp( takes one operand. If the operand is a  special value then the general rules apply.Otherwise, the ideal exponent of the result is defined to be half the exponent of the operand (rounded to an integer, towards "Infinity, if necessary) and then:JIf the operand is less than zero an Invalid operation condition is raised.If the operand is greater than zero, the result is the square root of the operand. If no rounding is necessary (the exact result requires  precision digits or fewer) then the coefficient and exponent giving the correct value and with the exponent closest to the ideal exponent is used. If the result must be inexact, it is rounded using the ]2 algorithm and the coefficient will have exactly  precisionf digits (unless the result is subnormal), and the exponent will be set to maintain the correct value.Otherwise (the operand is equal to zero), the result will be the zero with the same sign as the operand and with the ideal exponent.qq~ takes two operands, and raises a number (the left-hand operand) to a power (the right-hand operand). If either operand is a  special value7 then the general rules apply, except as stated below.The following rules apply:If both operands are zero, or if the left-hand operand is less than zero and the right-hand operand does not have an integral value or is infinite, an Invalid operation condition is raised, the result is NaN, and the following rules do not apply.If the left-hand operand is infinite, the result will be exact and will be infinite if the right-hand side is positive, 1 if the right-hand side is a zero, and 0 if the right-hand side is negative.If the left-hand operand is a zero, the result will be exact and will be infinite if the right-hand side is negative or 0 if the right-hand side is positive.DIf the right-hand operand is a zero, the result will be 1 and exact.In cases not covered above, the result will be inexact unless the right-hand side has an integral value and the result is finite and can be expressed exactly within  precisionO digits. In this latter case, if the result is unrounded then its exponent will be that which would result if the operation were calculated by repeated multiplication (if the second operand is negative then the reciprocal of the first operand is used, with the absolute value of the second operand determining the multiplications).jInexact finite results should be correctly rounded, but may be up to 1 ulp (unit in last place) in error.The signz of the result will be 1 only if the right-hand side has an integral value and is odd (and is not infinite) and also the sign6 of the left-hand side is 1. In all other cases, the sign of the result will be 0.rr takes two operands, compares their values numerically, and returns the maximum. If either operand is a NaN then the general rules apply, unless one is a quiet NaN and the other is numeric, in which case the numeric operand is returned.ss takes two operands, compares their values numerically, and returns the minimum. If either operand is a NaN then the general rules apply, unless one is a quiet NaN and the other is numeric, in which case the numeric operand is returned.ttp takes two operands and compares them using their abstract representation rather than their numerical value. A total ordering is defined for all possible abstract representations, as described below. If the first operand is lower in the total order than the second operand then the result is 2L, if the operands have the same abstract representation then the result is 3d, and if the first operand is higher in the total order than the second operand then the result is 4,. The total ordering is defined as follows. EThe following items describe the ordering for representations whose sign is 0. If the sign7 is 1, the order is reversed. A representation with a sign6 of 1 is always lower in the ordering than one with a sign of 0.Numbers (representations which are not NaNs) are ordered such that a larger numerical value is higher in the ordering. If two representations have the same numerical value then the exponent is taken into account; larger (more positive) exponents are higher in the ordering.HAll quiet NaNs are higher in the total ordering than all signaling NaNs.=Quiet NaNs and signaling NaNs are ordered according to their payload.; a larger payload is higher in the ordering.FFor example, the following values are ordered from lowest to highest: Z-NaN -sNaN -Infinity -127 -1 -1.00 -0 -0.000 0 1.2300 1.23 1E+9 Infinity sNaN NaN NaN456.uuS takes two operands and compares their values numerically. If either operand is a  special valueV then the general rules apply. No flags are set unless an operand is a signaling NaN.0Otherwise, the operands are compared, returning  2( if the first is less than the second,  3 if they are equal, or  4) if the first is greater than the second.A d value is returned if the result is NaN, indicating an unordered  comparison (see IEEE 754 5.11).vvU takes one operand. If the operand is negative, the result is the same as using the wK operation on the operand. Otherwise, the result is the same as using the  operation on the operand.KNote that the result of this operation is affected by context and may set flags. The . operation may be used if this is not desired.ww[ takes one operand, and corresponds to the prefix minus operator in programming languages.KNote that the result of this operation is affected by context and may set flags. The " operation may be used instead of w if this is not desired.xx] takes one operand. If the operand is a NaN then the general rules for special values apply.Otherwise, the operand must be a zero or positive, and the result is the base 10 logarithm of the operand, with the following cases:<If the operand is a zero, the result is "Infinity and exact.?If the operand is +Infinity, the result is +Infinity and exact.mIf the operand equals an integral power of ten (including 10^0 and negative powers) and there is sufficient  precisiong to hold the integral part of the result, the result is an integer (with an exponent of 0) and exact.?Otherwise the result is inexact and will be rounded using the ]. algorithm. The coefficient will have exactly  precision digits (unless the result is subnormal). These inexact results should be correctly rounded, but may be up to 1 ulp (unit in last place) in error.yy] takes one operand. If the operand is a NaN then the general rules for special values apply.XOtherwise, the operand must be a zero or positive, and the result is the natural (base e5) logarithm of the operand, with the following cases:<If the operand is a zero, the result is "Infinity and exact.?If the operand is +Infinity, the result is +Infinity and exact.5If the operand equals one, the result is 0 and exact.?Otherwise the result is inexact and will be rounded using the ]. algorithm. The coefficient will have exactly  precision digits (unless the result is subnormal). These inexact results should be correctly rounded, but may be up to 1 ulp (unit in last place) in error.zz] takes one operand. If the operand is a NaN then the general rules for special values apply.Otherwise, the result is e? raised to the power of the operand, with the following cases:7If the operand is "Infinity, the result is 0 and exact.4If the operand is a zero, the result is 1 and exact.?If the operand is +Infinity, the result is +Infinity and exact.?Otherwise the result is inexact and will be rounded using the ]. algorithm. The coefficient will have exactly  precision digits (unless the result is subnormal). These inexact results should be correctly rounded, but may be up to 1 ulp (unit in last place) in error.{{, takes two operands. If either operand is a  special value then the general rules apply.Otherwise, if the divisor is zero then either the Division undefined condition is raised (if the dividend is zero) and the result is NaN, or the Division by zero condition is raised and the result is an Infinity with a sign which is the  exclusive or of the signs of the operands.)Otherwise, a long division  is effected.The result is then rounded to  precision) digits, if necessary, according to the roundingD algorithm and taking into account the remainder from the division.||, takes two operands. If either operand is a  special value then the general rules apply. Otherwise, the operands are multiplied together ( long multiplication ), resulting in a number which may be as long as the sum of the lengths of the two operands.The result is then rounded to  precisionN digits if necessary, counting from the most significant digit of the result.}}, takes two operands. If either operand is a  special value then the general rules apply.6Otherwise, the operands are added after inverting the sign used for the second operand.The result is then rounded to  precisionN digits if necessary, counting from the most significant digit of the result.~~, takes two operands. If either operand is a  special value then the general rules apply."Otherwise, the operands are added.The result is then rounded to  precisionN digits if necessary, counting from the most significant digit of the result. Quiet NaN Signaling NaNZeroSubnormal finite numberNormal finite numberInfinityNumber (finite or infinite)!Not a number (quiet or signaling)Z takes one operand, and corresponds to the prefix plus operator in programming languages.KNote that the result of this operation is affected by context and may set flags.E takes three operands; the first two are multiplied together, using |[, with sufficient precision and exponent range that the result is exact and unrounded. No flags are set by the multiplication unless one of the first two operands is a signaling NaN or one is a zero and the other is an infinity.oUnless the multiplication failed, the third operand is then added to the result of that multiplication, using ~, under the current context.In other words, fusedMultiplyAdd x y z delivers a result which is  (x y) + z$ with only the one, final, rounding.[ takes two operands and compares their values numerically. This operation is identical to u, except that if neither operand is a signaling NaN then any quiet NaN operand is treated as though it were a signaling NaN. (That is, all NaNs signal, with signaling NaNs taking precedence over quiet NaNs.)F takes two operands and compares their values numerically with their sign ignored and assumed to be 0.If, without signs, the first operand is the larger then the original first operand is returned (that is, with the original sign). If, without signs, the second operand is the larger then the original second operand is returned. Otherwise the result is the same as from the r operation.F takes two operands and compares their values numerically with their sign ignored and assumed to be 0.If, without signs, the first operand is the smaller then the original first operand is returned (that is, with the original sign). If, without signs, the second operand is the smaller then the original second operand is returned. Otherwise the result is the same as from the s operation.Ordering function for s, , r, and c: returns the original arguments as (smaller, larger) when the given function is applied to them., takes two operands. If either operand is a  special value then the general rules apply, except that if either operand is infinite and the other is finite an Invalid operation condition is raised and the result is NaN, or if both are infinite then the result is the first operand.&Otherwise (both operands are finite),  returns the number which is equal in value (except for any rounding) and sign to the first (left-hand) operand and which has an exponentE set to be equal to the exponent of the second (right-hand) operand.The  coefficientc of the result is derived from that of the left-hand operand. It may be rounded using the current rounding setting (if the exponentE is being increased), multiplied by a positive power of ten (if the exponent. is being decreased), or is unchanged (if the exponent6 is already equal to that of the right-hand operand)..Unlike other operations, if the length of the  coefficient5 after the quantize operation would be greater than  precisionp then an Invalid operation condition is raised. This guarantees that, unless there is an error condition, the exponentP of the result of a quantize is always equal to that of the right-hand operand.pAlso unlike other operations, quantize will never raise Underflow, even if the result is subnormal and inexact.5 takes one operand. It has the same semantics as the  operation, except that if the final result is finite it is reduced to its simplest form, with all trailing zeros removed and its sign preserved.) takes one operand. If the operand is a  special value, or the exponent of the operand is non-negative, then the result is the same as the operand (unless the operand is a signaling NaN, as usual).UOtherwise (the operand has a negative exponent) the result is the same as using the  operation using the given operand as the left-hand-operand, 1E+0 as the right-hand-operand, and the precision of the operand as the  precisionA setting. The rounding mode is taken from the context, as usual., takes one operand. It is identical to the  operation except that the K and N~ flags are never set even if the operand is rounded (that is, the operation is quiet unless the operand is a signaling NaN).T takes one operand. The result has the same value as the operand but always uses a  canonical encoding. The definition of  canonical is implementation-defined; if more than one internal encoding for a given NaN, Infinity, or finite number is possible then one preferred  encoding is deemed canonical. This operation then returns the value using that preferred encoding.EIf all possible operands have just one internal encoding each, then K always returns the operand unchanged (that is, it has the same effect as >). This operation is unaffected by context and is quiet  no flags are changed in the context.7 takes one operand. The result is an indication of the classd of the operand, where the class is one of ten possibilities, corresponding to one of the strings "sNaN" (signaling NaN), "NaN" (quiet NaN),  "-Infinity" (negative infinity),  "-Normal"# (negative normal finite number),  "-Subnormal"% (negative subnormal finite number), "-Zero" (negative zero), "+Zero" (non-negative zero),  "+Subnormal"& (positive subnormal finite number),  "+Normal"& (positive normal finite number), or  "+Infinity"2 (positive infinity). This operation is quiet; no flags are changed in the context.Note that unlike the special values in the model, the sign of any NaN is ignored in the classification, as required by IEEE 754.} takes two operands and compares them using their abstract representation rather than their numerical value and with their signQ ignored and assumed to be 0. The result is identical to that obtained by using t on two operands which are the  copies of the operands to .t takes one operand. The result is a copy of the operand. This operation is unaffected by context and is quiet  no flags are changed in the context.B takes one operand. The result is a copy of the operand with the sign set to 0. Unlike the vG operation, this operation is unaffected by context and is quiet  no flags are changed in the context.B takes one operand. The result is a copy of the operand with the sign inverted (a sign- of 0 becomes 1 and vice versa). Unlike the wG operation, this operation is unaffected by context and is quiet  no flags are changed in the context.I takes two operands. The result is a copy of the first operand with the sign set to be the same as the signS of the second operand. This operation is unaffected by context and is quiet  no flags are changed in the context." takes one operand. The result is - if the operand is  canonical; otherwise it is ,. The definition of  canonical is implementation-defined; if more than one internal encoding for a given NaN, Infinity, or finite number is possible then one preferred  encoding is deemed canonical. This operation then tests whether the internal encoding is that preferred encoding.EIf all possible operands have just one internal encoding each, then  always returns -=. This operation is unaffected by context and is quiet  no flags are changed in the context." takes one operand. The result is - if the operand is neither infinite nor a NaN (that is, it is a normal number, a subnormal number, or a zero); otherwise it is ,=. This operation is unaffected by context and is quiet  no flags are changed in the context." takes one operand. The result is -1 if the operand is an Infinity; otherwise it is ,=. This operation is unaffected by context and is quiet  no flags are changed in the context." takes one operand. The result is -@ if the operand is a NaN (quiet or signaling); otherwise it is ,=. This operation is unaffected by context and is quiet  no flags are changed in the context." takes one operand. The result is -+ if the operand is a positive or negative  normal number; otherwise it is ,. This operation is quiet; no flags are changed in the context." takes one operand. The result is -1 if the operand is a quiet NaN; otherwise it is ,=. This operation is unaffected by context and is quiet  no flags are changed in the context." takes one operand. The result is - if the sign' of the operand is 1; otherwise it is ,=. This operation is unaffected by context and is quiet  no flags are changed in the context." takes one operand. The result is -5 if the operand is a signaling NaN; otherwise it is ,=. This operation is unaffected by context and is quiet  no flags are changed in the context." takes one operand. The result is -+ if the operand is a positive or negative subnormal number; otherwise it is ,. This operation is quiet; no flags are changed in the context." takes one operand. The result is -, if the operand is a zero; otherwise it is ,=. This operation is unaffected by context and is quiet  no flags are changed in the context. takes one operand. If the operand is a NaN then the general arithmetic rules apply. If the operand is infinite then +Infinity is returned. If the operand is a zero, then "Infinity is returned and the Division by zero exceptional condition is raised.ZOtherwise, the result is the integer which is the exponent of the magnitude of the most significant digit of the operand (as though the operand were truncated to a single digit while maintaining the value of that digit and without limiting the resulting exponent). All results are exact unless an integer result does not fit in the available  precision. takes two operands. If either operand is a NaN then the general arithmetic rules apply. Otherwise, the second operand must be a finite integer with an exponent of zero and in the range 2 (Emax +  precision) inclusive, where Emax3 is the largest value that can be returned by the  operation at the same  precision[ setting. (If is is not, the Invalid Operation condition is raised and the result is NaN.)If the first operand is infinite then that Infinity is returned, otherwise the result is the first operand modified by adding the value of the second operand to its exponent'. The result may Overflow or Underflow. takes no operands. The result is the radix (base) in which arithmetic is effected; for this specification the result will have the value 10.! takes two operands, and returns -$ if the two operands have the same exponent or ,b otherwise. The result is never affected by either the sign or the coefficient of either operand.If either operand is a  special value, -D is returned only if both operands are NaNs or both are infinities. does not change any flags in the context.Xjklmnopqrstuvwxyz{|}~Ajklmnopqrstuvwxyz{|}~A~}|{qpzyxwvusronmlkjtMjklmnopqrstuvwxyz{|}~>General arbitrary-precision decimal floating-point number type 2016 2017 Robert LeslieBSD3 rob@mars.org experimental TrustworthyW  !"#$%&'()*+,-./0123456789:;<=>?@ABCDXYZ[\]^_`WDCA>=<;:9876543210/.-,+*)('&%$#"!  @?B`^]Z\[YX_ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrsqponmlkjtuvwxy z{|}~       !"#$%&'()*+,-.,-/0102,-34,-5,-6,-7,-89:;<=>?@AB,-C,-D0E0FG,H}IJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrpqstuvpwxpwypwzcYd{|}~             1decimal-arithmetic-0.5.0.0-17Uy74BXPfALnbvYaxawn6Numeric.DecimalNumeric.Decimal.OperationNumeric.Decimal.ConversionNumeric.Decimal.ArithmeticNumeric.Decimal.EncodingNumeric.Decimal.PrecisionNumeric.Decimal.RoundingNumeric.Decimal.NumberNumeric.Decimal.Exception divideIntegerdividepower remainderquantizelnlog10 squareRootDecimalSignPosNegP2000P1000P500P400P300P250P200P150P100P75P50P49P48P47P46P45P44P43P42P41P40P39P38P37P36P35P34P33P32P31P30P29P28P27P26P25P24P23P22P21P20P19P18P17P16P15P14P13P12P11P10P9P8P7P6P5P4P3P2PTimes2PPlus1P1 PInfiniteFinitePrecision PrecisiontoNumbertoScientificString ExceptionSignalClampedDivisionByZeroInexactInvalidOperationOverflowRounded Subnormal UnderflowArithContextexceptionResult raiseSignal getPrecision evalArith newContext Round05UpRoundUp RoundHalfDown RoundFloor RoundCeiling RoundHalfEven RoundHalfUp RoundDownRoundingRoundingAlgorithmrotateshiftinvertxororandmaxmin compareTotalcompareabsminusexpmultiplysubtractaddGeneralDecimalExtendedDecimal BasicDecimalcastfromBool fromOrdering TrapHandlerSignalsexceptionSignalflagsbasicDefaultContextextendedDefaultContextrunArithsubArith getRoundingsignalsignals allSignals signalMember clearFlagstrap$fMonoidSignals $fShowSignals$fMonadStateContextArith$fMonadErrorExceptionArith $fMonadArith$fApplicativeArith$fFunctorArith $fEqSignal $fEnumSignal$fBoundedSignal $fShowSignal $fEqSignals$fShowExceptiontoEngineeringStringFormatBinaryCoefficientDecimalCoefficientKTimes2KPlus32K128K64K32 Parameters Pdecimal128 Pdecimal64 Pdecimal32 Decimal128 Decimal64 Decimal32$fBinaryDecimal$fFinitePrecisionFormat$fPrecisionFormat&$fCoefficientEncodingBinaryCoefficient'$fCoefficientEncodingDecimalCoefficient$fParametersKTimes2$fParametersKPlus32$fParametersK32NaNClass QuietClassSignalingClass NumberClass ZeroClassSubnormalClass NormalClass InfinityClassClassplusfusedMultiplyAdd compareSignal maxMagnitude minMagnitudereduceroundToIntegralExactroundToIntegralValue canonicalclass'compareTotalMagnitudecopycopyAbs copyNegatecopySign isCanonicalisFinite isInfiniteisNaNisNormalisQNaNisSignedisSNaN isSubnormalisZerologbscalebradix sameQuantum $fShowClass$fEqNumberClass $fEqNaNClass$fEnumNaNClass $fEqClass precisionbaseGHC.BaseNothingeMaxeMinP125P124P74P62$fFinitePrecisionPTimes2$fPrecisionPTimes2$fFinitePrecisionPPlus1$fPrecisionPPlus1$fFinitePrecisionP1 $fPrecisionP1$fPrecisionPInfinite roundDecimalRounderDivisor RemainderroundingroundCoefficient getRounder excessDigits$fRoundingRound05Up$fRoundingRoundUp$fRoundingRoundHalfDown$fRoundingRoundFloor$fRoundingRoundCeiling$fRoundingRoundHalfEven$fRoundingRoundHalfUp$fRoundingRoundDown numDigitscontinuedFractioninfiniteSeries seriesArctan seriesArcsinarctanarctan'arcsinarccosseriesPimachinPicfPifastPihalfPi quarterPicordiccastUp castDown'castDownzerooneHalf oneQuarteronetwothreeten negativeOneinfinityqNaNsNaNflipSign castRounding isPositive isNegativeghc-prim GHC.TypesFalseTrueGHC.EnumtoEnumfromEnumBooltoBoolLTEQGTOrderingeLimiteTinyeRange $fBitsDecimal Data.BitsBits$fFloatingDecimal GHC.Floatpi $fEnumDecimalFloatDouble enumFromToenumFromThenTo $fOrdDecimal GHC.Classes $fEqDecimal $fReadDecimalGHC.ReadRead $fShowDecimalGHC.ShowShowNumInfNaNsign coefficientexponent signalingpayloadPayloadExponent Coefficient negateSignxorSignssignFunc signMatchdecimalPrecisionevalOpevalOp'compareDecimal enumFromWithmaxCoefficientadjustedExponent integralValue$fNFDataDecimal$fFiniteBitsDecimal$fRealFloatDecimal$fRealFracDecimal$fFractionalDecimal $fRealDecimal $fNumDecimal$fPrecisionDecimal $fNFDataSign mtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6Control.Monad.Error.Class throwError catchError trapHandler signalListunsignalControl.Monad.State.Classgetputgets showNumber showExponentCoefficientEncodingparamK32paramP paramEmax paramBiasparamWparamT10binary-0.8.3.0Data.Binary.ClassBinaryCombinationFieldFiniteInfinity NotANumber exponentMSBscoefficientMSDformatKdpd2bcdbcd2dpd getCommon putCommongetCoefficient getDecimal putDecimalroundedinexactclampedconversionSyntaxdivisionByZerodivisionImpossibledivisionUndefinedinsufficientStorageinvalidContextinvalidOperationoverflow subnormal underflow Data.EitherRightLeftminMaxLogicalbits bitLengthQuotientDividendfinitePrecision roundingAlgresult generalRules1 generalRules2taylorLnln10 longDivision reciprocal withoutSign powerSign integralPower toLogical fromLogical validScale validShift