N1r      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq A commutative 4 in which all non-zero elements have multiplicative  inverses. Minimal complete definition:  or (). Multiplicative inverse.  Convert from  ?A floating point numeric literal represents the application of  the function " to the appropriate value of type  , so such literals have type ( a) => a. -A integral domain (a non-trivial commutative  with no zero  divisors) on which the Euclid's algorithm for  works. Minimal complete definition:  (  or (  and  )) and  . !Division with remainder: for any d /= 0,  n ==   n d * d +   n d   (n + a*d) d ==   n d   n d is smaller than d in some well-founded order. For integral types,   n d# is a non-negative integer smaller  than the absolute value of d. !Division with remainder: for any d /= 0,  n ==   n d * d +   n d   (n + a*d) d ==   n d   n d is smaller than d in some well-founded order. For integral types,   n d# is a non-negative integer smaller  than the absolute value of d.    n d == (  n d,   n d)  For each n there is a decomposition n ==   n *   n  such that   n" has a multiplicative inverse and    (  n) ==   (  n) == 1For integral types,   d is a non-negative integer and  than   d is -1 or 1.  For each n there is a decomposition n ==   n *   n  such that   n" has a multiplicative inverse and    (  n) ==   (  n) == 1For integral types,   d is a non-negative integer and  than   d is -1 or 1. DA ring: addition forms an Abelian group, and multiplication defines ) a monoid and distributes over addition. 5 Multiplication is not guaranteed to be commutative. Minimal complete definition: () and . 'An associative operation with identity  1,  distributing over () and . Conversion from r, the initial ring:  # is the unique function preserving , (),  () and (), and for which  1 is the  identity of (). >An integer literal represents the application of the function  " to the appropriate value of type r,  so such literals have type ( a) => a. AAn Abelian group has an commutative associative binary operation  with an identity and inverses. Minimal complete definition: , () and (() or ). The identity of (). 2A commutative associative operation with identity zero. 2A commutative associative operation with identity zero.  Inverse for () (unary negation).  The same as s (). Because -. is treated specially in the Haskell grammar,  (- e): is not a section, but an application of prefix negation.  However, ( exp)* is equivalent to the disallowed section.  x y is a common factor of x and y such that    ( x y) ==  x y, and  any common factor of x and y is a factor of  x y.  x y is a common multiple of x and y such that    ( x y) ==  x y, and  any common multiple of x and y is a multiple of  x y. :Forms the ratio of two values in a Euclidean domain (e.g. r). 4Extract the numerator of the ratio in reduced form: I the numerator and denominator have no common factor and the denominator  is positive. 6Extract the denominator of the ratio in reduced form: I the numerator and denominator have no common factor and the denominator  is positive. tuDirect product vDirect product w t t :unchanged from Haskell 98  !"#$%&'()*+unchanged from Haskell 98 ,-./01unchanged from Haskell 98 23456789:;<=>?@ABCDHaskell 98 compatibility class E/Integral numbers, supporting integer division. Minimal complete definition: I. F'Integer division truncated toward zero GInteger remainder, satisfying # (x `quot` y)*y + (x `rem` y) == x H simultaneous F and G IConversion to r Junchanged from Haskell 98 KAThe rational equivalent of its real argument with full precision LHaskell 98 compatibility class MAbsolute value. NSign of a number.  The functions M and N should satisfy the law:   abs x * signum x == x For real numbers, the N is either -1 (negative), 0 (zero)  or 1 (positive). OPQ0raise a number to a non-negative integral power R$raise a number to an integral power S0General conversion from integral types, via the r type. T1Obsolete general conversion to fractional types:  use U instead. U&General conversion to fields, via the  type. : !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU: !"#$%&'()* !"#$%&'()*+,-./0,-./0123456789:;<=>?@ABC23456789:;<=>?@ABCDEFGHIFGHIJKKLMNMNOPQRSTUportable provisionalross@soi.city.ac.uk U Uportable provisionalross@soi.city.ac.ukxyz{|}~r s      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST9LMNJKDEFGHI+,-./0123456789:;<=>?@ABC !"#$%&'()*OPQRSTportablestablelibraries@haskell.orgVV), applied to two real fractional numbers x and epsilon, - returns the simplest rational number within epsilon of x.  A rational number y is said to be simpler than another y' if  M ( y) <= M ( y'), and   y <=  y'. 7Any real interval contains a unique simplest rational;  in particular, note that 0/1" is the simplest rational of all. VVVportable provisionallibraries@haskell.org W,Extracts the real part of a complex number. X1Extracts the imaginary part of a complex number. Y#The conjugate of a complex number. ZDForm a complex number from polar components of magnitude and phase. [[ t# is a complex value with magnitude 1  and phase t (modulo 2*2). \ The function \ takes a complex number and 6 returns a (magnitude, phase) pair in canonical form: : the magnitude is nonnegative, and the phase in the range (-2, 2]; 1 if the magnitude is zero, then so is the phase. ]/The nonnegative magnitude of a complex number. < is used to do scaling to reduce the incidence of overflow. ^,The phase of a complex number, in the range (-2, 2]. 1 If the magnitude is zero, then so is the phase.  is need for *. < is used to do scaling to reduce the incidence of overflow. Gaussian integers:  if b. is non-zero, the norm (squared magnitude) of   a b  is at most half that of b. 3 Standard associates lie in the positive quadrant. WXYZ[\]^ WXZ[\]^YWXYZ[\]^portable provisionalross@soi.city.ac.uk_Simple vector type. `aDot product of two vectors. bNorm of a vector. _`ab_`ab_``abportable provisionalross@soi.city.ac.ukcd list of rows eMultiply a matrix by a vector. cdecdecddeportable provisionalross@soi.city.ac.ukf !"#$%g4Construct a polynomial from a list of coefficients,  least significant first. hAThe coefficients of a finite polynomial, least significant first  and with no trailing zeroes. &@The coefficients of a finite polynomial, starting with the most # significant non-zero coefficient. i#The degree of a finite polynomial. i p = length (coefficients p)j+Evaluate a polynomial for a given value of x.  j a x =  (*) (h a) ( (*x) 1)(The implementation uses Horner' s rule.) kBThe infinite list of evaluations of truncations of the polynomial  or power series. l Pretty-print a polynomial, e.g. !pretty (polynomial [3, 4, 0, 1, 5]) "x" = "5x^4 + x^3 + 4x + 3"mComposition of polynomials: j (m a b) = j a . j b'n)Symbolic differentiation of polynomials. o%Symbolic integration of polynomials. (If b is non-zero,   a b has a smaller degree than b.  If a is non-zero,   a has a leading coefficient of 1. fghijklmno fghijlkmno fghijklmnoportable provisionalross@soi.city.ac.ukpQuantities of a numeric type a", in units encoded by the phantom  type parameter u. G For example, types for counting apples and oranges can be defined as:    data Apple  data Orange " type Apples = Quantity Apple Int $ type Oranges = Quantity Orange Int You can' t compare Apples with Oranges (or add them).  You can add Apples to Apples, but not multiply them. AA full dimensional system keeping track of units while modelling @ multiplication and division will require type-level functions. qpqpqpqq)                   ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b cdefghijklmmnoppqrstuvwxyz{||}~                                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 :;<=>?@A@BCDEFGHIJKyap-0.0Data.YAP.RatioData.YAP.ComplexData.YAP.Algebra Prelude.YAPData.YAP.VectorData.YAP.MatrixData.YAP.PolynomialData.YAP.QuantityData.YAP.Algebra.InternalPrelude.YAP.InternalbaseGHC.RealRatioRational Data.Complex:+ComplexField/recip fromRationalEuclideanDomaindivmoddivMod associateunitRing* fromInteger AbelianGroupzero+-negatesubtractgcdlcm% numerator denominator RealFloat floatRadix floatDigits floatRange decodeFloat encodeFloatexponent significand scaleFloatisNaNisIEEEisNegativeZeroisDenormalized isInfiniteatan2RealFracproperFractiontruncateroundceilingfloorFloatingpiexpsqrtlog**logBasesintancosasinatanacossinhtanhcoshasinhatanhacosh FractionalIntegralquotremquotRem toIntegerReal toRationalNumabssignumevenodd^^^ fromIntegral realToFrac realToFieldapproxRationalrealPartimagPart conjugatemkPolarcispolar magnitudephaseVectordotnormMatrixapply Polynomial polynomial coefficientsdegreeevaluateapproximationsprettycompose differentiate integrateQuantity integer-gmpGHC.Integer.TypeIntegerGHC.Baseflip ifThenElse $fRing(,)$fAbelianGroup(,):%++GHC.Errerrorfoldrghc-primGHC.PrimseqGHC.Listconcatfilterzip System.IOprint Data.Tuplefstsnd otherwisemap$GHC.EnumenumFrom enumFromThen enumFromToenumFromThenTo GHC.Classes==>=fail>>=>>fmapreturnBoundedEnumEqMonadFunctorOrdGHC.ReadReadGHC.ShowShow GHC.TypesBoolCharDoubleFloatInt GHC.OrderingOrderingIO Data.EitherEitherStringFalseTrueLeftRightPrelude$!readIOreadLn appendFile writeFilereadFileinteract getContentsgetLinegetCharputStrLnputStrputCharSystem.IO.ErrorcatchGHC.IO.ExceptionioError Text.Readreadreadseither Data.Listunwordswordsunlineslinesproductsumfoldl1minimummaximumlex readParenreadList readsPrecText.ParserCombinators.ReadPReadSGHC.IOFilePath userErrorIOError undefined Control.MonadmapM_mapM sequence_sequence=<< showParen showStringshowCharshowsShowSshowListshow showsPrecunzip3unzipzipWith3zipWithzip3!! concatMaplookupnotElemelemallanyorandreversebreakspansplitAtdroptake dropWhile takeWhilecycle replicaterepeatiteratescanr1scanrfoldr1scanl1scanlfoldllengthnullinitlasttailhead Data.MaybemaybeNothingJustMaybemaxBoundminBoundfromEnumtoEnumpredsuccuncurrycurryasTypeOfuntil.constidnot||&&/=minmax<=><compareGTEQLT$fFieldComplex$fEuclideanDomainComplexsum'diagonalPallZeroaddmul divModAuxsubrev_coefficientsconstant$fEuclideanDomainPolynomial