[m-rev.] for review: mercury implementation of string__format

Peter Ross pro at missioncriticalit.com
Fri Nov 22 20:46:43 AEDT 2002


fjh wrote:
> On 21-Nov-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> > +:- pragma promise_pure(is_nan/1).
> > +:- pragma foreign_proc(c, is_nan(Flt::in),
> > + [will_not_call_mercury, thread_safe], "
> > +#if MR_USE_SINGLE_PREC_FLOAT
> > + SUCCESS_INDICATOR = isnanf(Flt);
> > +#else
> > + SUCCESS_INDICATOR = isnan(Flt);
> > +#endif
>
> The use of isnan() and isnanf() need to be protected by
> conditional compilation, since not all systems support them.
>
> Likewise for isinf() and isinff().
>
I plan to to call #error if is* aren't defined, but add a comment that it
may be safe to just return false if the system doesn't support IEEE
arthimetic.  Is this acceptable to everyone?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.419 / Virus Database: 235 - Release Date: 11/14/2002

--------------------------------------------------------------------------
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