On Thursday 16 November 2006 19:37, Paulo Moura wrote:
> > Why is this desirable, when it leads to the problems indicated?
> > After all, this is an arithmetic function, so there is no reason
> > why it should not use the same floating-point contagion rule
> > like all other symmetric binary operations,
>
> Agree.
First of all, in practice min and max are rarely used with mixed types.
Second, most implementations providing unbounded integer arithmetic do
not provide unbounded floats, so max(2<<10000, 2.0) raises an error if
we promote the floats. Before that you may loose acuracy in the
unnecessary promotion to float. Select semantics avoids all these
problems.
> See the Jan reply he sent this morning. In the current version
> (5.6.23) the result also depends on the argument order, which I think
> is buggy behavior.
If you leave it undefined, there is no problem. I can't see realistic
scenarios where it matters.
--- Jan
_______________________________________________
prolog-standard mailing list
prolog-standard_at_neve.di.ubi.pt
http://neve.di.ubi.pt/mailman/listinfo/prolog-standard
Received on Mon Jul 14 2008 - 13:01:01 EST
This archive was generated by hypermail 2.2.0 : Wed Sep 08 2010 - 23:28:17 EST