ftp.nice.ch/pub/next/developer/languages/cows/COWS.1.4.s.tar.gz#/COWS/Docs/The COWS Language/COWS Math Library.rtf

This is COWS Math Library.rtf in view mode; [Download] [Up]

Copyright © 1994 by Sean Luke


COWS
Math Library
COWS Version 1.4
Guus Bloemsma
Michal Jaegermann
Sean Luke
May 29, 1994


The COWS Math library provides a variety of common math functions allowed for in C and UNIX.  There is an extended math library also available, if you can't find the function you need in this one.


Library Functions

Any item inside [brackets] is optional.

cos,sin,tan,
acos,asin,atan
cosh, sinh,tanh	
acosh,asinh,atanh	Trig functions as defined in the C language.
	(cos value)
	(sin value)
	(tan value)
	(acos value)
	(asin value)
	(atan value)
	(cosh value)
	(sinh value)
	(tanh value)
	(acosh value)
	(asinh value)
	(atanh value)

log				Natural logarithm.
	(log value)

log-10			Base-10 logarithm.
	(log-10 value)

^				Exponential power, x-value^y-value.  
				3^5 means 3 to the power of 5 or  (3)(3)(3)(3)(3).
	(^ x-value y-value)

square-root		Square root of value.
	(square-root value)

ceiling			Returns the smallest integer larger than or equal to value.
	(ceiling value)

floor			Returns the largest integer smaller than or equal to value.
	(floor value)

mod				Returns the floating-point remainder of x-value/y-value.
	(mod x-value y-value)

pi				Returns p.
	(pi)

e				Returns e.
	(e)

!				Returns the factorial of value.  Note that this could be an
				extremely time-intensive function, as at this time it does not
				use gamma (! is meant more as an example).  You can cancel
				the function at any time by pressing control-period.
	(! value)

random			Returns an auto-seeded random value between 0 and 1.
	(random)

round			Rounds value to the nearest integer.
	(round)

strip			Strips value of its decimal component.
	(strip)

min				Returns the minimum of a list of values.
	(min value+)

max				Returns the maximum of a list of values.
	(max value+)

>=				Returns whether value is greater or equal to a list of values.
	(>= value values+)

<=				Returns whether value is less than or equal to a list of values.
	(<= value values+)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.