Proposal: Add "fma" to the RealFloat class

Joachim Breitner mail at joachim-breitner.de
Mon May 4 08:14:23 UTC 2015


Hi,


Am Sonntag, den 03.05.2015, 14:11 -0700 schrieb Levent Erkok:

> Based on this analysis, I'm withdrawing the original proposal. I think
> fma and other floating-point arithmetic operations are very important
> to support properly, but it should not be done by tacking them on to
> Num or RealFloat; but rather in a new class that also considers
> rounding-mode properly.
> 
does it really have to be a class? How much genuinely polymorphic code
is there out there that yet requires this precise handling of precision?

Have you considered adding it as monomorphic functions fmaDouble,
fmaFloat etc. on hackage, using FFI? Then those who need these functions
can start to use them.

Furthermore you can start getting the necessary primops supported in
GHC, and have your library transparently use them when available.

And only then, when we have the implementation in place and actual
users, we can evaluate whether we need an abstract class for this.


Greetings,
Joachim


-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150504/de7693bb/attachment.sig>


More information about the Libraries mailing list