[m-rev.] for review: move string__format tests

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 19 15:07:04 AEDT 2002


On 18-Nov-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> 
> I have also investigate the -(max+max) and why it comes out as NaN
> and on my machine it happens in the C code
> 
> 	result = 0.000000000000 - (max+max)
> 
> so if it's a bug, then it is a bug in the C compiler.

That does look like a bug.  On a system which properly supports IEEE
floating point, max + max should be Inf, and 0.0 - Inf should be -Inf.

Which C compiler are you using (and which version, platform, and
compilation options)?
Have you reported the bug?

> +#
> +# This is adapted from the rule in ../../Mmake.common.  The only
> +# differences are that we don't cat the difference to stdout, as
> +# generally it is quite big and that we sort the output before the
> +# comparison, as the IL and C backends use a different ordering for
> +# lexical comparisons.
> +#
> +%.res: %.exp %.out
...
> +	{ shortest=`wc -l $*.res[1-5] | grep -v total | sort -n | \
> +		head -1 | awk '{ print $$2; }' `; \
> +		echo "** $*.sorted_out did not match the expected output"; \
> +		echo "** (closest match was $$shortest)"; \
> +		echo "** The diff is located in $@"; \
> +		cp $$shortest $@; \
> +		exit 1; }

It would be useful to output say the first 50 lines of the diff.

Otherwise that looks fine (for the main branch).

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list