WG       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,classes abstracting function approximations portable experimentalmik@konecny.aow.czThis class extends   by: G making the domain of the function enclosure available for inspection; 8 allowing the construction of basic function enclosures , where the domain has to be specified. ;A function enclosure with no information about the function' s values. 9Construct a constant enclosure for a tuple of functions. 8Construct the exact enclosure for a projection function  (ie a variable). -Return the domain of the function enclosure. DSplit the domain into two halves, yoelding two function enclosures. 5Merge function enclosures with neighbouring domains. Safely integrate a  R^n -> R^m function enclosure E with some initial condition (origin and function at origin). Safely integrate a R -> R^m function enclosure. Safely integrate a  R^n -> R^m function enclosure ? intersecting it with a prior enclosure for the result. >The prior enclosure could contains one of more initial value. Safely integrate a R -> R^m function enclosure ? intersecting it with a prior enclosure for the result. >The prior enclosure could contains one of more initial value. =A class of types that approximate first-order real functions   R^n -> R^m3 using some type of graph enclosures. The domains @ of the functions can be neither specified nor investigated ! by operations in this class. This class extends % so that we could perform point-wise ! operations on the functions. This class is associated with: % two real number types (instances of () for working with parts of the function's domain and range; 3 a type of boxes indexed by variables (instance of ) for working with  parts of the function' s domain. 7Check internal consistency and report problem if any. @Get the internal degree of quality (usually polynomial degree)  of the approximation. ASet an upper bound on the degree of this function approximation. :This reduces the degree immediately if necessary and also @ affects all operations performed with this value later. 7Get the current uppend bound on the degree associated + with this function approximation. 8Give a close upper bound of the precision of the range 6 at the best approximated point in the domain. 6Find some upper and lower bounds of the function over [-1,1]^n. 8Combine several functions with the same domain into one tuple function. 0Reveal how many functions are bundled together. &Modify a tuple of functions in a way : that does not treat the tuple elements uniformly. IFind close upper and lower bounds of the volume of the entire enclosure. N A negative volume means that the enclosure is certainly inconsistent. BMultiply a function approximation by a real number approximation. HIntersect one enclosure by another but only on a box within its domain. KIntersect two enclosures and measure the global improvement as one number. (Use  defined in module Data.Number.ER.Real.Approx B to measure the improvement using a function enclosure.) *Evaluate the function at the given point. >Fix some variables in the function to the given exact values. /A simple and limited composition of functions. NIt is primarily intended to be used for precomposition with affine functions. 4Recursively perform a number of bisections and then # glue the bits back together. This way we can ensure that 5 a piece-wise enclosure has a partition that goes " to at least the given depth.         2separate approximations per domain-box hyper-edge portable experimentalmik@konecny.aow.cz=Use some function approximation type and for each domain box E keep a structure of function approximations of this type indexed E by the hyper-edge structure. For each hyper-edge of the domain, 3 the approximation has this edge as its domain. 'E.g. for a 2D square domain there are: ( one approximation for the whole square + four 1D approximations, one for each edge > eight 0D approximations, one for each endpoint of each edge  !" !" !" !".a list of approximations over the same domain portable experimentalmik@konecny.aow.cz#=A tuple of function approximations allowing one to get from  functions R^n->R to a function  R^n -> R^m. #$%#$%#$%$%)class abstracting function enclosures on [-1,1]^n portable experimentalmik@konecny.aow.cz&This class extends   by: ? assuming that the domain of the function enclosures is always [-1,1]^n for some n; 8 allowing the construction of basic function enclosures ( where the domain has to be known. ';A function enclosure with no information about the function' s values. (9Construct a constant enclosure for a tuple of functions. )7Construct the exact enclosure of an affine function on [-1,1]^n. *IFind close upper and lower bounds of the volume of the entire enclosure. N A negative volume means that the enclosure is certainly inconsistent. JExplicitly specify the variables to identify the dimension of the domain. +KIntersect two enclosures and measure the global improvement as one number. (Use RA.intersectMeasureImprovement defined in module Data.Number.ER.Real.Approx B to measure the improvement using a function enclosure.) JExplicitly specify the variables to identify the dimension of the domain. ,Safely integrate a [-1,1] ^n -> R^m function enclosure E with some initial condition (origin and function at origin). &'()*+,&'()*+,&'()*+,'()*+, enclosures translated from [-1,1]^n to another domain portable experimentalmik@konecny.aow.cz-The canonical translation of 8 any compact non-empty and non-singleton interval in R " to and from the unit interval [-1,1]. 3This structure holds the two coefficients for both  linear mappings. /the interval being mapped 4%Datatype translating enclosures from [-1,1]^n to any compact  interval in R^n with non-empty interior ; using a bunch of linear maps, one for each dimension. -./01234567 4567-./0123 -./0123./012345675678class abstracting imprecise function arithmetic on [-1,1]^n portable experimentalmik@konecny.aow.cz/:6Check internal consistency, typically absence of NaN. ;AA linear ordering, which can be syntactic and rather arbitrary. <FCheck internal consistency of the function and report problem if any. @ Construct a constant function. AConstruct an affine function. B"Multiply a function by a scalar, ) rounding downwards and upwards. C6Multiply a function by an approximation of a scalar, ) rounding downwards and upwards. D6Multiply a function by an approximation of a scalar,  rounding downwards. E6Multiply a function by an approximation of a scalar,  rounding upwards. F,Get the degree of this particular function. 6If the function is a polynomial, this function should  return its degree. G0Decrease the degree of function approximation, 2 rounding pointwise downwards and upwards. HMDecrease the degree of function approximation, rounding pointwise downwards. IKDecrease the degree of function approximation, rounding pointwise upwards. JGApproximate the integral of p (with 0 at 0) from below and from above. K9Approximate the integral of p (with 0 at 0) from below. L9Approximate the integral of p (with 0 at 0) from above. M'Measure the volume between a function . and the zero hyperplane on the domain [-1,1]^n. N)Find an upper bound of the function over [-1,1]^n. O(Find a lower bound of the function over [-1,1]^n. P@Approximate the function max(0,p(x)) from below and from above. QApproximate the function 1/ p(x) from below and from above. RApproximate the function 1/p(x) from below. SApproximate the function 1/p(x) from above. TGApproximate the function max(p_1(x),p_2(x)) from below and from above. U8Approximate the function max(p_1(x),p_2(x)) from below. V8Approximate the function max(p_1(x),p_2(x)) from above. WGApproximate the function min(p_1(x),p_2(x)) from below and from above. X8Approximate the function min(p_1(x),p_2(x)) from below. Y8Approximate the function min(p_1(x),p_2(x)) from above. Z Approximate  sqrt(p(x)) from below and from above. [ Approximate  exp(p(x)) from below and from above. \ Approximate  log(p(x)) from below and from above. ] Approximate  sin(p(x)) from below and from above, . assuming the range of p is within [-pi2,pi2]. ^ Approximate  cos(p(x)) from below and from above, . assuming the range of p is within [-pi2,pi2]. _ Approximate  atan(p(x)) from below and from above. `5Evaluate at a point, rounding upwards and downwards. a)Evaluate at a point, rounding downwards. b)Evaluate at a point, rounding downwards. c=Safely evaluate at a point using a real number approximation + for both the point and the result. d1Partially evaluate at a lower-dimensional point 1 given using a real number approximation. F Approximate the resulting function from below and from above. e1Partially evaluate at a lower-dimensional point 1 given using a real number approximation. 7 Approximate the resulting function from below. f1Partially evaluate at a lower-dimensional point 1 given using a real number approximation. 7 Approximate the resulting function from above. g6Compose two functions, rounding upwards and downwards  provided each f_v ranges within the domain [-1,1]. h*Compose two functions, rounding downwards  provided each f_v ranges within the domain [-1,1]. i(Compose two functions, rounding upwards  provided each f_v ranges within the domain [-1,1]. j1Convert from the interval type to the base type. B (The types are determined by the given example function.) k2Convert from the base type to the interval type. B (The types are determined by the given example function.) 489:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk489:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk4839:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk+arbitrary precision function enclosures on [-1,1]^n portable experimentalmik@konecny.aow.cz lmnopqrstuv puqvrsvtlmno lmnomnopuqvrsvtqrstuv4(internal) polynomial datatype and simple functions portable experimentalmik@konecny.aow.cz xEA polynomial represented by its coefficients it the Chebyshev basis. 8The polynomials are never to be used outside the domain [-1,1]^n. GAll operations are rounded in such a way that the resulting polynomial  is a point-wise upper or lower bound of the exact result. 4Inspect all terms of the polynomial and return the ' degree of the highest degree term. 4If the polynomial is constant, return the constant,  otherwise return Nothing.  make a basic x) polynomial for a given variable number 1Convert a polynomial to a string representation, " using the ordinary x^n basis. @conversion of polynomials from Chebyshev basis to the X^n basis E(not exact - suffering from rounding in the coefficient conversions) 2conversion of one Chebyshev term to the X^n basis EChebyshev polynomials expressed as associative lists power -> coeff VChebyshev polynomials expressed as lists of integer coefficients for powers 0,1,2... wxyz{|}~xyzw{|}~wxyzyz{|}~ 5(internal) field operations applied to polynomials portable experimentalmik@konecny.aow.czQConvert a polynomial to a lower-order one that is dominated by (resp. dominates) " it closely on the domain [-1,1]. Bmultiply a polynomial by a scalar rounding downwards and upwards Kmultiply a polynomial by a scalar interval rounding downwards and upwards  %(internal) evaluation of polynomials portable experimentalmik@konecny.aow.czPEvaluate a polynomial at a point, consistently rounding upwards and downwards. 6Evaluate a polynomial at a real number approximation NSubstitute several variables in a polynomial with real number approximations, $ rounding downwards and upwards. *Compose two polynomials, rounding upwards - provided the second polynomial maps [-1,1] into [-1,1].  5(internal) bounds of single and multiple polynomials portable experimentalmik@konecny.aow.cz.Find an upper bound on a polynomial over the  unit domain [-1,1]^n. ;Find a close upper bound on an affine polynomial over the  unit domain [-1,1]^n. =Find a close upper bound on a quadratic polynomial over the  unit domain [-1,1]^n. PApproximate from below and from above the pointwise maximum of two polynomials @Approximate the function max(0,p(x)) by a polynomial from below  and from above.  A version of   using a cubic approximation. 2Multiply a thin enclosure by a non-thin enclosure (Safely multiply a polynomial by itself.  9(internal) elementary functions applied to polynomials portable experimentalmik@konecny.aow.cz7Approximate the pointwise square root of a polynomial 6 by another polynomial from below and from above. 7Approximate the pointwise exponential of a polynomial 6 by another polynomial from below and from above. [Approximate the pointwise integer power of a polynomial by another polynomial from above. =Approximate the pointwise natural logarithm of a polynomial 6 by another polynomial from below and from above. 0Approximate the pointwise sine of a polynomial 5 by another polynomial from below and from above. %Assuming the polynomial range is [-pi2, pi2]. 0Approximate the pointwise sine of a polynomial 5 by another polynomial from below and from above. %Assuming the polynomial range is [-pi2, pi2]. =Approximate the pointwise natural logarithm of a polynomial 6 by another polynomial from below and from above. 2Approximate the pointwise cosine of a polynomial 4 by another polynomial from below and from above  using the tau method  as described in [Mason & Handscomb 2003, p 62]. ,(internal) integration of polynomials etc portable experimentalmik@konecny.aow.czDApproximate from below and from above the integral of a polynomial. ;Based on the following formulas for Chebyshev polynomials:   \int T_n(x)dx = . T_{n+1}(x)/2(n+1) - T_{n-1}(x)/2(n-1)   \int T_1(x)dx =  T_2(x)/4 + 1/4  \int T_0(x)dx =  T_1(x) Bmeasure the volume between a polynomial and the zero axis on [-1,1]^n 8Differentiate a polynomial using one of its variables. 0polynoms in the Chebyshev basis of the 1st kind portable experimentalmik@konecny.aow.czwxyzxyzw hierarchical domain partitions portable experimentalmik@konecny.aow.cz+value splitter function - parameters are: : depth, domain of value, value, variable to split by, 4 point to split at; returns the two split values 1 The root of the tree often represents the whole R^n.  Each node splits the parent's space into two using K a specified variable (ie direction) and an optional splitting point. A By default, a split is taken at the point defined by the method  RA.bisect. direction to split in point that the split is at %the half towards -Infty in split dir %the half towards +Infty in split dir depth of this node domain value estimate :Apply a function to all values, thus creating a new tree. :Apply a function to all values, thus creating a new tree. CApply a function to all values, thus creating a list of new trees. KPerform a given action on all branches of a bisection tree, left to right. 1 (optionally now going below the given depth) KPerform a given action on all branches of a bisection tree, left to right. 1 (optionally now going below the given depth) JPerform a given action on all branches of a bisection tree, left to right 3 with the option of further branching the tree. 1 (optionally now going below the given depth) 9Ensure both trees have equal structure at the top level: = either they are all leaves or they all split at the same - direction with the same splitting point. *Also, unify the domains at the top level. <Ensure all the trees have equal structure at the top level: = either they are all leaves or they all split at the same - direction with the same splitting point. *Also, unify the domains at the top level. DCombine two bisection trees using a given value combining function. @ Where necessary, leaves are split so that the resulting tree' s structure I is the union of the two argument tree structures. Such splitting of = values in leaves is performed by the provided functions. Areturn all values in leafs (except those within some CE subtree) 3 as a list (from the leftmost to the rightmost) Areturn all values in leafs (except those within some CE subtree) 3 as a list (from the leftmost to the rightmost) #linear ordering on bisection trees Glookup all maximal subtrees whose domain intersect the given rectangle &Update a value on a given sub-domain, . bisecting the tree if necessary to obtain / a better fit for the domain, but not below  a given depth limit. ?With multiple domain dimensions, split the domain according to  .   ;abstract zipping of domain partitions used for integration portable experimentalmik@konecny.aow.cz;Transform a bunch of bisection trees over the same domain  by  integrating" them in a very abstract sense. F The trees are unified in their splitting patterns in the process. ? By supplying certain parameters, this function can in fact F perform numerical integration of piece-wise polynomial functions. It can be also viewed as a zipping+folding$ operator over bisection trees that \ generates another bunch of bisection trees, synchronously traversing the original trees J from a certain point on a selected axis outwards in both directions,  carrying some data along. <Zip a list of bisection trees in synchrony but do something 2 else inside and not inside a given subdomain. GFurther splitting at default points will be done up to the given depth A in an attempt to separate the subdomain as well as possible. BIf the subdomain is not properly isolated by the splitting at the P maximum depth, splits are made at irregular points to ensure full isolation  of the subdomain. =arbitrary precision piece-wise-something function enclosures portable experimentalmik@konecny.aow.cz*Arbitrary precision piece-wise something 2 (eg linear, polynomial, rational) enclosures  of functions R^n->R^m. 7The type of approximation within segments is specified  by an instance of . 8The piece-wise construction defines another instance of . 3concise names for default function representations non-portable (requires fenv.h) experimentalmik@konecny.aow.cz'definitions useful for testing in ghci non-portable (requires fenv.h) experimentalmik@konecny.aow.cz'      !" addressing and modifying leaves portable experimentalmik@konecny.aow.cz3A representation of a binary tree with a hole that  can be efficiently filled. A path in a binary tree. ) It is used mainly in connection with BisectionTree.BisectionTree. @Assuming that bisection happens at default points as defined by  #* and starts from the given root interval. @Lookup a subdomain of a function according to a bisection path. B Return the restrited function as well as a zipper that allows ? an efficient modification of the function on the looked up  subdomain. 3Modify a function in its subdomain as expressed by  the zipper. overview of AERN-RnToRm non-portable (requires fenv.h) experimentalmik@konecny.aow.czR$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL M !"#$%&'()*+,-./01234567889:;;<=>03 ??@ABCDEEFGHIJK%LMN>1OPQ(RST UVWXYZ[\]^_`abcdefghi4jklmnopqrstuuvwxxyz{|}~ 3       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOAERN-RnToRm-0.4.2Data.Number.ER.RnToRm.Approx%Data.Number.ER.RnToRm.Approx.DomEdges"Data.Number.ER.RnToRm.Approx.Tuple$Data.Number.ER.RnToRm.UnitDom.Approx&Data.Number.ER.RnToRm.Approx.DomTransl"Data.Number.ER.RnToRm.UnitDom.Base-Data.Number.ER.RnToRm.UnitDom.Approx.Interval9Data.Number.ER.RnToRm.UnitDom.ChebyshevBase.Polynom.Basic9Data.Number.ER.RnToRm.UnitDom.ChebyshevBase.Polynom.Field8Data.Number.ER.RnToRm.UnitDom.ChebyshevBase.Polynom.Eval:Data.Number.ER.RnToRm.UnitDom.ChebyshevBase.Polynom.Bounds>Data.Number.ER.RnToRm.UnitDom.ChebyshevBase.Polynom.Elementary?Data.Number.ER.RnToRm.UnitDom.ChebyshevBase.Polynom.Integration#Data.Number.ER.RnToRm.BisectionTree/Data.Number.ER.RnToRm.BisectionTree.Integration&Data.Number.ER.RnToRm.Approx.PieceWise!Data.Number.ER.RnToRm.DefaultRepr(Data.Number.ER.RnToRm.BisectionTree.PathAERN-Real-0.9.9Data.Number.ER.Real.ApproxData.Number.ER.Real.DomainBox3Data.Number.ER.RnToRm.UnitDom.ChebyshevBase.Polynom!Data.Number.ER.RnToRm.TestingDefsData.Number.ER.RnToRm ERFnDomApprox bottomApproxconstprojdombisectunBisect integrateintegrateUnaryintegrateMeasureImprovement integrateMeasureImprovementUnary ERFnApproxcheck domra2ranra ranra2domra getDegree setMaxDegree getMaxDegreegetBestPrecisiongetRangeApproxtuple getTupleSize applyTupleFnvolumescalepartialIntersectintersectMeasureImprovementeval partialEval composeThinbisectUnbisectDepthERFnDomEdgesApproxerfnMainVolume erfnEdges ERFnTuple erfnTupleERUnitFnApproxaffine DomTransldtrDomdtrFromUnitSlopedtrFromUnitConstdtrToUnitSlopedtrToUnitConstERFnDomTranslApproxerfnUnitApprox erfnDomTransl ERUnitFnBaseinitialiseBaseArithmeticisValid compareApproxgetGranularitysetMinGranularitysetGranularity scaleApproxscaleApproxDown scaleApproxUp reduceDegreereduceDegreeDownreduceDegreeUp integrateDown integrateUpvolumeAboveZero upperBound lowerBoundnonnegrecip recipDownrecipUpmaxmaxDownmaxUpminminDownminUpsqrtexplogsincosatanevalDownevalUp evalApproxpartialEvalApproxpartialEvalApproxDownpartialEvalApproxUpcompose composeDown composeUp raEndpointsraFromEndpoints ERFnContext erfnMaxDegreeerfnCoeffGranularity ERFnInterval erfnUpper erfnLowerNeg erfnGlobalERFnIntervalAny erfnContextTermKey ERChebPoly chplCoeffschplConstTermKeychplIsConstTermKey chplTermOrder chplTermArity chplGetDegree chplGetConst chplConstchplVarchplNormaliseUpchplNormaliseDown chplNormalisechplShow chebToXBasis termXtermschebyXCoeffsLists chebyXCoeffs chplAffinechplReduceDegree chplScalechplScaleApproxchplEval chplEvalUp chplEvalDownchebyEvalTsRoundDownUpchebyEvalTsExactchplEvalApproxchplPartialEvalApprox chplComposechplUpperBoundAffinechplUpperBoundAffineCornerschplUpperBoundQuadrchplMax chplNonnegchplNonnegCubicchplThinTimesEncl chplSquarechplSqrtchplExpchplPowchplLogchplSine chplCosinesincosTaylorAuxchplAtan chplRecip chplIntegratechplVolumeAboveZerochplDifferentiate ValueCombiner ValueSplitterDepth BisectionTreeNodebistrDirbistrPtbistrLObistrHILeaf bistrDepthbistrDombistrValisLeafsetDepthsplit mapWithDom mapLeavesdoBistrdoMap doMapLeaves removeVarssync2syncMany combineWith collectValuescollectDomValuescomparelookupSubtreeDoms zipFromOriginzipOnSubdomain ERFnPiecewiseFAFAPWPFAPEFAPTFAPDFAPUFnZipperFnZ_RFnZ_LFnZ_H BisecTreePathBTP_LBTP_RBTP_Hpath2domlookupSubdomain updateFnZERApprox ERIntApprox DomainBox errorModule chplHasNoNaNchplHasNoNaNOrInfty chplCheckchplCompareApprox chplGetVarschplGetGranularitychplSetMinGranularitychplSetGranularitychplReduceDegreeDownchplReduceDegreeUp chplScaleDown chplScaleUp chplMaxDn chplMaxUp chplMinDn chplMinUpchplMin boundsAddErr chplRecipDn chplRecipUpmapMultiLeaves updateVal bestSplit$Data.Number.ER.Real.DomainBox.IntMapVarIDBox fapuConst1 fapdConst1 fapdConstU fapdConst01fapd04X0fapd13X0fapd12X1fapdUX0fapdUX1 fapeConst1 fapeConstU fapeConst01fape13X0fape12X1fapeUX0fapeUX1 fapeTestMult fapeMultiVar fapeTestPEval fapeUConst1 fapeUConst13fapeUConst13InitPtfapwUUX0fapwUUX1fapwUPX0fapwUPX1fapwUMX0fapwUMX1 fapwUConst1 fapwUConst13fapwUConst13InitPt testIntegrE testIntegrPxyxLRfn1fn2fn3 bisectDomainshowVar defaultVarnewVarID VariableIDlookupfindWithDefaultzipWithDefaultSecondzipWithDefaultzipWith foldWithKeyfoldfilterelemskeys unionWithunion notMembermemberdelete insertWithinsert fromAscList toAscListfromListtoList singletonunarysizeisNoinfonoinfo differenceintersectionWith mapWithKeymapDomainBoxMappableclassifyPositionunify compatible DomainIntBox