Re: [prolog-standard] Re: log10/1, log/2, min/2, and max/2

From: Jan Wielemaker <>
Date: Thu, 16 Nov 2006 20:30:43 +0100

On Thursday 16 November 2006 18:45, Paulo Moura wrote:
> I myself prefer a log/2 than the log10/1 in the current draft. If
> there are no objections, I'm going to replace log10/1 by log/2 in the
> next draft revision.

I vote for log10.

> > min/2 and max/2
> >
> > These functions do not COMBINE their arguments; they merely SELECT
> > one of them.
> > ...
> This seems to be the consensus between the people that have already
> provided feedback on these functions. The implementations that I
> tried also implement these functions as a select operation. There are
> however differences between implementations when the functions are
> evaluated with an integer and a float representing the "same number".
> For example:


> I would say that, taking into account standard order as defined in
> Part 1 of the standard, that YAP is the only implementation behaving
> correctly. However, is standard order (not arithmetic order)
> meaningful in this context?

Standard order is meaningless. min/max are *arithmetic* functions.
I'd say the result of min(2, 2.0) is undefined (i.e. implementations
can return either 2 or 2.0).

        --- Jan

prolog-standard mailing list
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