Let me try to be a bit concrete here.
Are there _any_ implementations of Floating outside of base that
we know of, which we are _concretely_ worried will not implement
log1p and thus cause algos to lose precision? If anybody knows of
these implementations, let them speak!
Furthermore, if we do know of them, then can't we submit patch
requests for them? Unless there are too many of course, but I know
of only one type of "typical" implementation of Floating outside
of base. That implementation is constructive, arbitrary-precision,
reals, and in that case, the default implementation should be
fine.
(Outside of that, I know of two other perhaps implementations
outside of base, one by edwardk, and he as well as the other
author are fine adding log1p).
Also, in general, I don't care what happens to Floating, because
it is a silly class with a hodgepodge of methods anyway (plenty of
which potentially apply to things that aren't 'floating point' in
any meaningful sense), although RealFloat is even sillier. (By the
way did you know that RealFloat has a defaulted "atan2" method?
Whatever we do, it won't be worse than that).
Anyway, +1 for the original proposal, and also +1 for adding this
to RealFloat instead if that's acceptable, because I'm sure
everyone could agree that class couldn't possibly get much worse,
and there's precedent there anyway.
Also, I should add, as a rule, I think it is near-impossible to
write numerical code where you genuinely care both about
performance and accuracy in such a way as to be actually generic
over the concrete representations involved.
Cheers,
Gershom
On 4/23/14, 7:57 PM, John Lato wrote:
There's one part of this alternative proposal I
don't understand:
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries