Re: Motion P1788/M0045.02:ExactDotProductRevision -- revised text
> On 2013-07-05 10:06:12 +0100, John Pryce wrote:
> > If there is a danger of clashes such as Vincent suggests, just
> > name the 1788 ones differently! The underlying 754 system may
> > call it dot(), the new one can be dot1788(), etc.
>
> The name doesn't matter. Having two different functions provided
> by two different standards for the same operation is a bad thing.
If the two functions are equally useful (perhaps in different contexts),
the choice is typically made available through macros that hide any
necessary renaming, with the selection based on compiler options or
environment variables.
If a program depends on strict 754 semantics (e.g. exact zero as -0
when rounding towards -Inf), it might be forced to pick the 754 version.
Actually, this point is moot, because correct rounding is not required.
However, because of that laxity, the 754 version could be faster,
and hence be preferred to the correctly-rounding 1788 version.
If a program depends on correct rounding it will of course have
to select the 1788 version.
This is the same choice that applies to transcendental functions,
if one version is 754-compliant but slower than another version.
This is possible in a 754-compliant implementation because the
compliant versions of those functions are not required.
Michel.
---Sent: 2013-07-05 19:38:51 UTC