| ||||||||||||||
| ||||||||||||||
| Synopsis | ||||||||||||||
| Documentation | ||||||||||||||
| data Ball | ||||||||||||||
| ||||||||||||||
| makeA | ||||||||||||||
| ||||||||||||||
| make | ||||||||||||||
| ||||||||||||||
| normalizeBall :: Precision -> Ball -> Ball | ||||||||||||||
| Normalize the given ball's center to the specified precision. Resulting ball might be larger. | ||||||||||||||
| lower :: Precision -> Ball -> Dyadic | ||||||||||||||
| Lower endpoint of the ball rounded down to specified precision. | ||||||||||||||
| upper :: Precision -> Ball -> Dyadic | ||||||||||||||
| Upper endpoint of the ball rounded up to specified precision. | ||||||||||||||
| lower_ :: Ball -> Dyadic | ||||||||||||||
| Lower endpoint with precision of the center | ||||||||||||||
| upper_ :: Ball -> Dyadic | ||||||||||||||
| Upper endpoint with precision of the center | ||||||||||||||
| sgnLower :: Ball -> Int | ||||||||||||||
| Sign of lower endpoint of the ball. This should be faster than using signum (center b - radius b) | ||||||||||||||
| sgnUpper :: Ball -> Int | ||||||||||||||
| Analogous to sgnLower. | ||||||||||||||
| width :: Ball -> Dyadic | ||||||||||||||
| Upper bound on the width of the ball. 2 * radius b rounded up. | ||||||||||||||
| compareB :: Ball -> Ball -> POrdering | ||||||||||||||
Compare two balls.
| ||||||||||||||
| below :: Ball -> Ball -> Bool | ||||||||||||||
| Check if second ball is included in the first | ||||||||||||||
| contains :: Ball -> Dyadic -> Bool | ||||||||||||||
| Check if dyadic is element of the ball. | ||||||||||||||
| intersectA | ||||||||||||||
| ||||||||||||||
| intersect :: Monad m => Ball -> Ball -> m Ball | ||||||||||||||
| Intersection of two balls exactly (no precision is lost). | ||||||||||||||
| add :: Precision -> Ball -> Ball -> Ball | ||||||||||||||
Addition of two balls.
Rounding errors are added to the radius. | ||||||||||||||
| sub :: Precision -> Ball -> Ball -> Ball | ||||||||||||||
Subtraction of two balls.
Rounding errors are added to the radius. | ||||||||||||||
| neg :: Precision -> Ball -> Ball | ||||||||||||||
Negation of the ball.
| ||||||||||||||
| absB :: Precision -> Ball -> Ball | ||||||||||||||
| mul :: Precision -> Ball -> Ball -> Ball | ||||||||||||||
Multiplication of two balls. (centers of both balls are assumed positive)
center = center a * center b + radius a * radius b radius = center a * radius b + radius a * center b
center = center a * upper b radius = radius a * upper b
lower = min ((lower a) * (upper b)) ((lower b) * (upper a)) upper = max ((lower a) * (lower b)) ((upper b) * (upper a)) Rounding errors are added to the radius. | ||||||||||||||
| div :: Monad m => Precision -> Ball -> Ball -> m Ball | ||||||||||||||
Division of two balls
Rounding errors are added to the radius. If divisor ball contains zero compuatation fails with fail. | ||||||||||||||
| sqrt :: Monad m => Precision -> Ball -> m Ball | ||||||||||||||
| Square root of a ball. If interval contains 0 then computation fails. | ||||||||||||||
| exp :: Precision -> Ball -> Ball | ||||||||||||||
e ^ b | ||||||||||||||
| log :: Monad m => Precision -> Ball -> m Ball | ||||||||||||||
| Natural logarithm of a ball. If interval contains 0 then computation fails. | ||||||||||||||
| maxB :: Precision -> Ball -> Ball -> Ball | ||||||||||||||
Maximum of two balls, meaning:
| ||||||||||||||
| minB :: Precision -> Ball -> Ball -> Ball | ||||||||||||||
| Analogous to maxB. | ||||||||||||||
| fromDyadic :: Precision -> Dyadic -> Ball | ||||||||||||||
| MakeA a ball from dyadic. Radius is 0 if desired precision is not smaller than precision of dyadic. | ||||||||||||||
| fromString :: Precision -> String -> Ball | ||||||||||||||
| Similar to fromDyadic. | ||||||||||||||
| fromInt :: Precision -> Int -> Ball | ||||||||||||||
| Similar to fromDyadic. | ||||||||||||||
| fromWord :: Precision -> Word -> Ball | ||||||||||||||
| Similar to fromInt. | ||||||||||||||
| Produced by Haddock version 2.2.2 | ||||||||||||||