[mercury-users] Mercury Math Logarithms

Ralph Becket rafe at cs.mu.OZ.AU
Wed Oct 23 17:04:31 AEST 2002


Noel  Pinto, Wednesday, 23 October 2002:
> Hi,
> 
> 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??

The domain of a function (in ordinary mathematical parlance) is the set
of values over which the function is defined.

The comment

        % math__ln(X) = Log is true if Log is the natural logarithm
	% of X.
	%
	% Domain restriction: X > 0

therefore says that math__ln(X) is only defined if X > 0, for any X.

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