Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- threeDigitsK :: Double -> Double
- setOfSolutions :: Double -> [(Double, Double)]
- suitable2 :: Double -> (Double, Double)
- suitable21 :: Double -> Maybe ([Double], Double)
- isRangeN :: Double -> Bool
- isRangeNPref :: Double -> Bool
- check1FracDecomp :: Double -> Maybe ([Double], Double)
- check3FracDecompPartial :: Bool -> Double -> Maybe ([Double], Double)
- lessErrSimpleDecomp :: Double -> (Int, Maybe ([Double], Double), Double)
- lessErrDenoms :: Double -> [Integer]
Documentation
threeDigitsK :: Double -> Double Source #
suitable2 :: Double -> (Double, Double) Source #
Partially defined function, if there is no solutions then returns a tuple of undefined
. Beter
to use suitable21
isRangeNPref :: Double -> Bool Source #
The preferable range of the argument for suitable2
and suitable21
functions. For arguments
in this range the functions always have informative results.
check1FracDecomp :: Double -> Maybe ([Double], Double) Source #
Tries to approximate the fraction by just one unit fraction. Can be used for the numbers between 0.005 and 0.501.
check3FracDecompPartial :: Bool -> Double -> Maybe ([Double], Double) Source #
Function to find the less by absolute value error approximation. One of the denominators is
taken from the range [2..10]. The two others are taken from the appropriate suitabble21
applicattion.
lessErrDenoms :: Double -> [Integer] Source #
A list of denominators for fraction decomposition. If the list has 3 elements (likely in most cases) then the furst one is from the range [2..10].