packages feed

crackNum 3.5 → 3.6

raw patch · 3 files changed

+18/−6 lines, 3 filesdep ~sbv

Dependency ranges changed: sbv

Files

CHANGES.md view
@@ -1,7 +1,12 @@ * Hackage: <http://hackage.haskell.org/package/crackNum> * GitHub:  <http://github.com/LeventErkok/crackNum/> -* Latest Hackage released version: 3.5, 2023-04-11+* Latest Hackage released version: 3.6, 2024-01-24++### Version 3.6, 2024-01-24+  * Be more clear when the provided input isn't a recognizable float,+    instead of treating it as NaN implicitly. Thanks to Dmitry Blotsky for+    pointing out the confusion.  ### Version 3.5, 2024-01-11   * Resolve compilation issues with GHC 9.8 series
crackNum.cabal view
@@ -1,6 +1,6 @@ Cabal-version      : 2.2 Name               : crackNum-Version            : 3.5+Version            : 3.6 Synopsis           : Crack various integer and floating-point data formats Description        : Crack IEEE-754 float formats and arbitrary sized words and integers, showing the layout.                      .@@ -26,7 +26,7 @@    default-language: Haskell2010    hs-source-dirs  : src    ghc-options     : -Wall -Wunused-packages-   build-depends   : base >= 4.11 && < 5, libBF, sbv >= 10.0+   build-depends   : base >= 4.11 && < 5, libBF, sbv >= 10.3                    , tasty, tasty-golden, filepath, directory, process    other-modules   : Paths_crackNum, CrackNum.TestSuite    autogen-modules : Paths_crackNum
src/CrackNum/Main.hs view
@@ -360,12 +360,19 @@                                             note $ snd $ convert 11 53                   _                   -> ef (FP 11 53)          where p :: Double -> Predicate-               p d = do x <- sDouble"ENCODED"+               p d = do x <- sDouble "ENCODED"                         pure $ x .=== literal d          ef (FP i j) = do let (v, mbS) = convert i j-                         print =<< satWith z3{crackNum=True} (p v)-                         note mbS+                         if bfIsNaN v+                            then die [ "Input does not represent floating point number we recognize."+                                     , "Saw: " ++ inp+                                     , ""+                                     , "For decoding bit-strings, prefix them with 0x or 0b, and"+                                     , "provide a hexadecimal or binary representation of the input."+                                     ]+                            else do print =<< satWith z3{crackNum=True} (p v)+                                    note mbS           where p :: BigFloat -> Predicate                 p bf = do let k = KFP i j                           sx <- svNewVar k "ENCODED"