[mercury-users] Mercury Math Logarithms

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Oct 23 18:59:33 AEST 2002


Noel  Pinto, you wrote:
> In the Math module, math__ln mentions that there is a domain 
> restriction which says that X > 0.
> 
> But, X is a variable. So I would like to know how would you define 
> what is a domain in Mercury??

A domain is just a set of values.  In this case, it is the set of
values of type "float" which are greater than zero.

A "domain error" occurs when you pass a value to a routine which is
not in the domain.

The behaviour when a domain error occurs is documented at the start
of the documentation for the math module.

-- 
Fergus Henderson              | Designing grand concepts is fun;
fjh at cs.mu.oz.au               | finding nitty little bugs is just work.
http://www.cs.mu.oz.au/~fjh   | -- Brooks, in "The Mythical Man-Month".
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list