Copyright | (c) Levent Erkok |
---|---|
License | BSD3 |
Maintainer | erkokl@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Checks the correctness of a few tricks from the large collection found in: https://graphics.stanford.edu/~seander/bithacks.html
Synopsis
- elem :: Word32 -> [Word32] -> Bool
- oneIf :: Num a => Bool -> a
- fastMinCorrect :: Proved (Int -> Int -> Bool)
- fastMaxCorrect :: Proved (Int -> Int -> Bool)
- oppositeSignsCorrect :: Proved (Int -> Int -> Bool)
- conditionalSetClearCorrect :: Proved (Bool -> Word32 -> Word32 -> Bool)
- powerOfTwoCorrect :: Proved (Word32 -> Bool)
- maskedMergeCorrect :: Proved (Word32 -> Word32 -> Word32 -> Bool)
- roundPowerOfTwoCorrect :: Proved (Word32 -> Bool)
- zeroInWord :: Proved (Word32 -> Bool)
Documentation
elem :: Word32 -> [Word32] -> Bool Source #
SBVPlugin can only see definitions in the current module. So we define elem
ourselves.
Also, it has to be monomoprhized, as the plugin isn't smart enough to deal with polymorphic
functions out-of-the-box.