W      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) Claude Heiland-Allen 2015BSD3claude@mathr.co.ukunstable TypeFamiliesSafe0:<DR Rational typeRatio data structure/Rational numbers with ruff-specific operations.smart constuctorextract numeratorextract denominatorunsafe constructor 0 1/2 1 convert to Prelude.Rational convert from Prelude.Rationalwrap into [0,1)doubling map to [0,1) doubling map from [0,1) to [0,1)4doubling map from [0,1) to [0,1) for odd denominator0doubling map preimages from [0,1) to [0,1)x[0,1)      77(c) Claude Heiland-Allen 2011BSD3claude@mathr.co.ukunstableportableNone0  Complex number type without the  constraint.Extract the real part.Extract the imaginary part.Complex conjugate.Complex magnitude squared. Complex magnitude.!Complex phase."2Complex number with the given magnitude and phase.#4Complex number with magnitude 1 and the given phase.$Convert to polar form. !"#$%&'(  !"#$ #" !$ !"#$%&'("(c) Claude Heiland-Allen 2011,2015BSD3claude@mathr.co.ukunstableportableNone-uCompute the external ray for an external angle with a given accuracy, sharpness and starting radius. For example: !externalRay 1e-10 8 (2**24) (1/3)5The algorithm is based on Tomoki Kawahira's paper 8An algorithm to draw external rays of the Mandelbrot set  Bhttp://www.math.nagoya-u.ac.jp/~kawahira/programs/mandel-exray.pdf..QCompute the external ray outwards from a given parameter value. If the result rs satisfies:  c = last rs magnitude c > radius$then the external angle is given by t: 5a = phase c / (2 * pi) t = a - fromIntegral (floor a)- accuracy  sharpness radius external angle . iterations epsilon  accuracy  sharpness radius  parameter -.-.-."(c) Claude Heiland-Allen 2011,2015BSD3claude@mathr.co.ukunstableportableNone/]Given the period and approximate location, successively refine this estimate to a nucleus.2The algorithm is based on Robert Munafo's page Newton-Raphson method  3http://mrob.com/pub/muency/newtonraphsonmethod.html.0hGiven the period and nucleus, find succesive refinements to the bond point at a given internal angle.(The algorithm is based on ideas from  *http://mrob.com/pub/muency/derivative.html.1fGiven the period and nucleus, find an interior point at a given internal angle and radius in (0,1].2=Find the period of the lowest period nucleus inside a square.3The algorithm is based on Robert Munafo's page, Finding the Period of a mu-Atom  &http://mrob.com/pub/muency/period.html./period  estimate 0period nucleus angle 1period nucleus radius angle 2maximum period radius center /0122/01/012(c) Claude Heiland-Allen 2011BSD3claude@mathr.co.ukunstableportableNone03Iteration output.;Iteration state.DIteration mode.HIteration initial state.IIteration engine.JIterate over a list.3456789:;<=>?@ABCDEFGHIJ34658:97;<=>?@ABCDEGFHIJ#DEFG;<=>?@A?@BA?@CBA3456789789:7HIJ3 456789789:7;<=>?@A?@BA?@CBADEFGHIJ"(c) Claude Heiland-Allen 2011,2015BSD3claude@mathr.co.ukunstableportableNone0: [Image bounds and coordinates.\Channels in an image.]continuous dwell ^normalized to pixel spacing _ in [-pi,pi] `Render an image with the E algorithm. The iteration count is doubled until the image is good enough, or the fixed maximum iteration count is reached. UputStr . unicode $ simpleImage (coordinates 100 100 ((-1.861):+0) (0.001)) 1000000000aRender an image with the G algorithm. The iteration count is doubled until the image is good enough, or the fixed maximum iteration count is reached. The output values are converted to . _putStr . unicode . border $ complexImage (coordinates 100 100 ((-1.861):+0) (0.001)) 1000000000bImage rendering loop.c:The parameter plane coordinates for an image, with bounds.dyConvert a distance estimate image to a near-boundary bit array. The input image must have a DistanceEstimate' channel.e&Convert a bit array to ascii graphics.f.Convert a bit array to unicode block graphics.Strict version of  modifySTRef. [\]^_` coordinates max iterations image a coordinates max iterations image b  escapees  output array max iterations  iterations prior escapees iterations this phase  iterates output callback output array as given cwidth height center size dimage eimage ascii fimage unicode  [\]^_`abcdef `abcef\]^_[d [\]^_`abcdef'(c) Claude Heiland-Allen 2010,2011,2015BSD3claude@mathr.co.ukunstableportableNone0:DR.oUAngled internal addresses have angles between each integer in an internal address.r^Internal addresses are a non-empty sequence of strictly increasing integers beginning with '1'.t#Kneading sequences. Note that the u case has an infinite list.yElements of kneading sequences.}0Binary representation of a (pre-)periodic angle.~1Angle as a fraction of a turn, usually in [0, 1).MAll external angles landing at the same location as the given external angle.dAll external angles landing at the same location as the given external angle (binary angle variant).Convert to human readable form.Convert to human readable form.Convert to human readable form.!Convert from human readable form.Preperiod under angle doubling.Period under angle doubling.,Convert an angle from binary representation.%Convert a list of bits to an integer.*Convert an angle to binary representation.Tuning transformation for binary represented periodic angles. Probably only valid for angle pairs representing hyperbolic components.lTuning transformation for angles. Probably only valid for angle pairs representing hyperbolic components.Knead character representation.$Kneading sequence as a string. The u case is truncated arbitrarily.,The kneading sequence for an external angle.&The period of a kneading sequence, or  when it isn't periodic./Unwrap a kneading sequence to an infinite list.Internal address as a string.Construct a valid r, checking the precondition.!Extract the sequence of integers. Construct an r from a kneading sequence.UA star-periodic kneading sequence's upper and lower associated kneading sequences.'The upper associated kneading sequence.'The lower associated kneading sequence.$Angled internal address as a string.Builds a valid oV from a list, checking the precondition that only the last 'Maybe Angle' should be  , and the  must be strictly increasing. Convert an o to a list.?The angled internal address corresponding to an external angle.4Split an angled internal address at the last island.The inverse of .)The period of an angled internal address.3Discard angle information from an internal address.The pair of external angles whose rays land at the root of the hyperbolic component described by the angled internal address.Parse an angle.Parse a list of angles.Parse a kneading element.(Parse a non-aperiodic kneading sequence.Parse an internal address.NParse an angled internal address, accepting some unambiguous abbreviations.U    opqrstuvwxyz{|}~  !"#$%7opqrstvuwxy{z|}~7~}yz{|tuvwxrsopqI    opqrstuvwxyz{|}~  !"#$%"(c) Claude Heiland-Allen 2011,2015BSD3claude@mathr.co.ukunstableportableNone Progress updates for .Progress updates for .Progress updates for .Mu-atom properties.0Try to find an atom, providing progress updates.,Find the first success in the progress list.Find an atom from its address.3Try to find an address, providing progress updates.,Find the first success in the progress list.Find an address for a mu-atom.FTry to find an atom close to a coordinate, providing progress updates.,Find the first success in the progress list.#Find an atom close to a coordinate.?&'()*+center radius 99 &'()*+,      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeOfghijklmnopqrstuvwxyzz{|}~      !"#$%&'()*+,-./0123456789#ruff-0.4.0.1-Jw8WXOio9PD19WqVvMqq6FFractal.RUFF.Types.RatioFractal.RUFF.Types.ComplexFractal.RUFF.Mandelbrot.RayFractal.RUFF.Mandelbrot.NucleusFractal.RUFF.Mandelbrot.IterateFractal.RUFF.Mandelbrot.ImageFractal.RUFF.Mandelbrot.AddressFractal.RUFF.Mandelbrot.AtomRationalRatio:%QZ% numerator denominator%!zerohalfonefromQtoQwrap doubleWrapdouble doubleOdd preimages $fShowRatio $fReadRatio $fOrdRatio$fQRatio $fQRatio0 $fEqRatio $fDataRatioComplex:+realPartimagPart conjugate magnitude2 magnitudephasemkPolarcispolar$fNearZeroComplex$fFloatingComplex$fFractionalComplex $fNumComplex $fReadComplex $fShowComplex $fEqComplex $fDataComplex externalRayexternalRayOut findNucleusfindBond findInternal findPeriodOutput OutSimple OutEscapeTimeOutDistanceEstimateoutUser escapeTime finalAngledistanceEstimateIterate IterSimpleIterEscapeTimeIterDistanceEstimateitcitziterUseritnitdzModeSimple EscapeTimeDistanceEstimateinitialiterateiterates $fReadMode $fShowMode$fEqMode $fOrdMode $fEnumMode $fBoundedMode $fDataMode $fReadIterate $fShowIterate $fEqIterate $fDataIterate $fReadOutput $fShowOutput $fEqOutput $fOrdOutput $fDataOutput CoordinatesChannelDistanceEstimate' FinalAngle simpleImage complexImage imageLoop coordinatesborderasciiunicode $fEqChannel $fOrdChannel $fEnumChannel$fBoundedChannel $fIxChannel $fReadChannel $fShowChannel $fDataChannelAngledInternalAddressUnangledAngledInternalAddressKneading Aperiodic PrePeriodic StarPeriodicPeriodicKneadZeroOneStarBinAngleAngleanglesbangles prettyAngle prettyAnglesprettyBinAngle parseBinAngle bpreperiodbperiodunbinarybinarybtunetune kneadCharprettyKneadingkneadingperiodunwrapprettyInternalAddressinternalFromListinternalToListinternalAddress associatedupperlowerprettyAngledInternalAddressangledFromList angledToListangledInternalAddress splitAddress joinAddress addressPeriod stripAnglesexternalAngles parseAngle parseAngles parseKnead parseKneadingparseInternalAddressparseAngledInternalAddress $fReadKnead $fShowKnead $fEqKnead $fOrdKnead $fEnumKnead$fBoundedKnead $fDataKnead$fReadKneading$fShowKneading $fEqKneading $fOrdKneading$fDataKneading$fReadInternalAddress$fShowInternalAddress$fEqInternalAddress$fOrdInternalAddress$fDataInternalAddress$fReadAngledInternalAddress$fShowAngledInternalAddress$fEqAngledInternalAddress$fOrdAngledInternalAddress$fDataAngledInternalAddressLocateLocateScanTodo LocateScanLocateScanDoneLocateNucleusTodo LocateNucleusLocateNucleusDoneLocateBondTodo LocateBondLocateBondDone LocateSuccess LocateFailed FindAddressAddressCuspTodoAddressCuspDoneAddressDwellTodo AddressDwellAddressDwellDoneAddressRayOutTodo AddressRayOutAddressRayOutDoneAddressExternalTodoAddressExternalDoneAddressAddressTodoAddressSuccess AddressFailedFindAtom AtomSplitTodo AtomSplitDoneAtomAnglesTodoAtomAnglesDone AtomRayTodoAtomRay AtomRayDoneAtomNucleusTodo AtomNucleusAtomNucleusDone AtomBondTodoAtomBond AtomBondDone AtomSuccess AtomFailedMuAtom muNucleusmuSizemuOrientmuPeriodfindAtom findAtom' findAtom_ findAddress findAddress' findAddress_locatelocate'locate_ $fReadMuAtom $fShowMuAtom $fEqMuAtom$fReadFindAtom$fShowFindAtom $fEqFindAtom$fReadFindAddress$fShowFindAddress$fEqFindAddress $fReadLocate $fShowLocate $fEqLocatebase GHC.Float RealFloatstraddlesOrigin positiveRealghc-prim GHC.TypesFloat modifySTRef'bitsGHC.BaseNothing integer-gmpGHC.Integer.TypeIntegerParseTokenNumberFractionceiling'floor'rhoorbit address'inf address'peraddress'unsafeAngledFromList denominators numeratorsexternalAngles'wakeeschunk2 safeIndex unFractionunNumberparserpTokenspToken pFractionpNumberpSpacepOptionalSpacepKnead pKneading isAtomSuccessfromAtomSuccessisAddressSuccessfromAddressSuccessisLocateSuccessfromLocateSuccess