Proposal: Better power for Rational
simonpj at microsoft.com
Mon Oct 4 05:57:06 EDT 2010
| I'll try to create a patch, however I may need some assistance compiling base libraries.
Thank you. Creating a patch, attaching to a ticket with some rationale, and submitting it to the libraries list, is the best way to push your work over the hill and into the actual code base. I'm sure others will help. If you get stuck, yell!
Daniel Fischer is working in this patch too.
| -----Original Message-----
| From: libraries-bounces at haskell.org [mailto:libraries-bounces at haskell.org] On Behalf
| Of Henning Thielemann
| Sent: 28 September 2010 19:23
| To: libraries at haskell.org
| Subject: Re: Proposal: Better power for Rational
| Simon Peyton-Jones schrieb:
| > | > #4101: constant folding for (**)
| > | > #3676: realToFrac conversions
| > | > #3744: comparisons against minBound and maxBound are not optimised away
| > | > #3065: quot is sub-optimal
| > | > #2269: Word type to Double or Float conversions
| > | > #2271: floor, ceiling, round :: Double -> Int are awesomely slow
| > | > #1434: slow conversion Double to Int
| > |
| > | For the rounding issue I have already written some code for numeric-prelude:
| > | http://code.haskell.org/numeric-prelude/src/Algebra/RealRing.hs
| > Great. I'm not sure which ticket you are referring to, but if you could propose a
| patch, by email to the libraries list, that would be great
| I'm referring to tickets #2271 and #1434.
| I implemented round, truncate, floor, ceiling with Int result in terms
| of double2Int and friends and added RULES for decomposing, e.g.
| round :: Double -> Int16
| (fromIntegral :: Int -> Int16) . (round :: Double -> Int)
| However my code is adapted to NumericPrelude's type classes and must be
| adapted to those of Haskell98's Prelude. This should not be too hard.
| I'll try to create a patch, however I may need some assistance compiling
| base libraries.
| Libraries mailing list
| Libraries at haskell.org
More information about the Libraries