Yitz: Thanks for taking over. I do agree that "fma" can just be added to the Num class with all the ramifications and treated as an "optimization." But that's a different proposal than what I had in mind, so I'm perfectly happy you pursuing this version.

Just one comment: The name "FMA" is quite overloaded, and perhaps it should be reserved to the true IEEE754 version. I think someone suggested 'mulAccum' as an alternative, which does make sense if one thinks about the dot-product operation. Please be absolutely clear in the documentation that this is not the IEEE754-fma; but rather a fused-multiply-add operation that is used for the Num class, following some idealized notion of numbers. In particular, the compiler should be free to substitute "a*b+c" with "mulAccum a b c".

The latter (i.e., the IEEE754 variant) should be addressed in a different proposal that I intend to work on separately.

-Levent.

On Mon, May 4, 2015 at 9:11 AM, Yitzchak Gale <gale@sefer.org> wrote:
Levent Erkok wrote:
>> ...I think this proposal needs to be shelved for the time being.

I wrote:
> Nevertheless, I vote for doing it now.

Edward Kmett wrote:
> As this proposal has been withdrawn, the point is more or less
> moot for now.

OK, let me make myself more clear.

I hereby propose the exact same proposal that Levant originally
proposed in this thread and then withdrew, with the caveat that
the scope of the proposal is explicitly orthogonal to any large
scale change to the way we do floating point.

Discussion period: 2 weeks, minus time spent so far in this
thread since Levant's original proposal.

Thanks,
Yitz
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries