Git Product home page Git Product logo

floatinghex's People

Contributors

leventerkok avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

acidburn0zzz

floatinghex's Issues

Number not parsed

Prelude Data.Numbers.FloatingHex> readHFloat "0xa0ff.f141a59a"
Nothing

> :set -XHexFloatLiterals
> toRational (0xa0ff.f141a59a :: Double) == 0xa0ff.f141a59a
True

Compile failure with template-haskell < 2.10

Fyi, FloatingHex needs an instance that was only added with TH 2.10 and later

Configuring component lib from FloatingHex-0.2...
Preprocessing library FloatingHex-0.2...
[1 of 1] Compiling Data.Numbers.FloatingHex ( Data/Numbers/FloatingHex.hs, /tmp/matrix-worker/1484424259/dist-newstyle/build/x86_64-linux/ghc-7.8.4/FloatingHex-0.2/build/Data/Numbers/FloatingHex.o )

Data/Numbers/FloatingHex.hs:92:30:
    No instance for (TH.Lift Double) arising from a use of ‘TH.lift’
    In the expression: TH.lift d
    In a case alternative: Just d -> TH.lift d
    In the expression:
      case parseHexFloat s of {
        Just d -> TH.lift d
        Nothing
          -> fail
             $ "Invalid hexadecimal floating point number: |" ++ s ++ "|" }

I've already fixed up the meta-data on Hackage, e.g.

%a compatibility

Currently showHFloat is not compatible with printf's %a specifier. Using Haskell's floatToDigit it should be possible to remedy this situation.

Support reading nan/infinity etc.

Would be nice if the parser read nan/infinity etc. as well; as special cases. Note that we have to use :% in these cases to make sure reduction isn't done right away.

parse negative numbers

Due to rational requirement, the quasiquoter doesn't support negatives. But we should support it in the parse function, which should also be exported.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.