ali@0: ali@0: ali@0: ali@0: Language Extensions ali@0: ali@0: ali@0: These language extensions are provided in the following namespace URI: ali@0: ali@0: http://www.juiblex.co.uk/ns/libxexpr ali@0: ali@0: People using this namespace are encouraged to use the libxexpr namespace ali@0: prefix. ali@0: ali@0: ali@0: ali@0: Function <pi> ali@0: ali@0: ali@0: Synopsis ali@0: ali@0: <pi> returns the value of π. ali@0: ali@0: ali@0: ali@0: ali@0: Arguments ali@0: ali@0: <pi> takes no arguments. ali@0: ali@0: ali@0: ali@0: ali@0: Return Values ali@0: ali@0: <pi> returns the value of π. ali@0: ali@0: ali@0: ali@0: ali@0: ali@0: <libxexpr:pi/> ≅ <float>3.14</float> ali@0: ali@0: ali@0: ali@0: ali@0: Function <sin> ali@0: ali@0: ali@0: Synopsis ali@0: ali@0: <sin> computes the sine function. ali@0: ali@0: ali@0: ali@0: ali@0: Arguments ali@0: ali@0: <sin> takes one argument: x. If no argument is given, an error ali@0: occurs. ali@0: ali@0: ali@0: ali@0: ali@0: Return Values ali@0: ali@0: <sin> returns the sine of its argument, given in radians. ali@0: If the argument does not evaluate to a finite number, ali@0: <sin> returns an indeterminate result. ali@0: ali@0: ali@0: ali@0: ali@0: ali@0: <libxexpr:sin> ali@0: <divide> ali@0: <libxexpr:pi/> ali@0: 2 ali@0: </divide> ali@0: </libxexpr:sin> --> <float>1</float> ali@0: ali@0: ali@0: ali@0: ali@0: Function <atan> ali@0: ali@0: ali@0: Synopsis ali@0: ali@0: <atan> computes the arc tangent function. ali@0: ali@0: ali@0: ali@0: ali@0: Arguments ali@0: ali@0: <atan> takes two arguments: x and y. The y argument defaults to ali@0: 1. If the x argument is missing, an error occurs. ali@0: ali@0: ali@0: ali@0: ali@0: Return Values ali@0: ali@0: <atan> returns the principal value of the arc tangent of its ali@0: argument(s) in radians. If either argument is indeterminate, ali@0: the result is also indeterminate. ali@0: ali@0: ali@0: ali@0: If two arguments are given, <atan> returns the arc tangent of ali@0: y/x, using the signs of the two arguments to determine the quadrant ali@0: of the result which will be in the range [-π, π]. If both arguments ali@0: are 0, the result will also be 0. ali@0: ali@0: ali@0: ali@0: If only one argument is given, <atan> returns the arc tangent of ali@0: its argument. The result will be in the range [-π/2, π/2]. ali@0: ali@0: ali@0: ali@0: ali@0: ali@0: <libxexpr:atan>1 0</libxexpr:atan> --> <float>0</float> ali@0: ali@0: ali@0: ali@0: ali@0: Function <exp> ali@0: ali@0: ali@0: Synopsis ali@0: ali@0: <exp> computes the base-e exponential function. ali@0: ali@0: ali@0: ali@0: ali@0: Arguments ali@0: ali@0: <exp> takes zero or one argument: x. ali@0: ali@0: ali@0: ali@0: ali@0: Return Values ali@0: ali@0: <exp> returns the value of e (the base of natural logarithms) ali@0: raised to the power of its argument (or just e if no argument is ali@0: supplied). If the argument does not evaluate to a finite number, ali@0: <exp> returns an indeterminate result. ali@0: ali@0: ali@0: ali@0: ali@0: ali@0: <libxexpr:exp>2</libxexpr:exp> ≅ <float>7.389</float> ali@0: ali@0: ali@0: ali@0: ali@0: Function <log> ali@0: ali@0: ali@0: Synopsis ali@0: ali@0: <log> computes the natural logarithmic function. ali@0: ali@0: ali@0: ali@0: ali@0: Arguments ali@0: ali@0: <log> takes one argument: x. If no argument is given, an error ali@0: occurs. ali@0: ali@0: ali@0: ali@0: ali@0: Return Values ali@0: ali@0: <log> returns the natural logarithm of its argument. ali@0: If the argument does not evaluate to a positive finite number, ali@0: <log> returns an indeterminate result. ali@0: ali@0: ali@0: ali@0: ali@0: ali@0: <libxexpr:log> ali@0: <libxexpr:exp>2</libxexpr:exp> ali@0: </libxexpr:log> --> <float>2</float> ali@0: ali@0: ali@0: ali@0: ali@0: Function <pow> ali@0: ali@0: ali@0: Synopsis ali@0: ali@0: <pow> computes the value of its first argument raised to the ali@0: power of its second argument. ali@0: ali@0: ali@0: ali@0: ali@0: Arguments ali@0: ali@0: <pow> takes two arguments: x and y. If fewer arguments are ali@0: given, an error occurs. ali@0: ali@0: ali@0: ali@0: ali@0: Return Values ali@0: ali@0: <pow> returns the value of x (its first argument) raised to the ali@0: power of y (its second argument). ali@0: ali@0: ali@0: ali@0: If x is a finite value less than 0, and y is a finite non-integer, ali@0: <pow> returns an indeterminate result. ali@0: ali@0: ali@0: ali@0: If the result overflows, <pow> returns an indeterminate result. ali@0: ali@0: ali@0: ali@0: If result underflows, and is not representable, 0 is returned. ali@0: ali@0: ali@0: ali@0: Except as specified below, if either argument is indeterminate, ali@0: the result is also indeterminate. ali@0: ali@0: ali@0: ali@0: If x is 1, the result is 1 (even if y is indeterminate). ali@0: ali@0: ali@0: ali@0: If y is 0, the result is 1 (even if x is indeterminate). ali@0: ali@0: ali@0: ali@0: If x is 0, and y is an odd integer greater than 0, the result is 0. ali@0: ali@0: ali@0: ali@0: If x is 0, and y greater than 0 and not an odd integer, the result ali@0: is 0. ali@0: ali@0: ali@0: ali@0: If x is 0, and y is less than 0, ali@0: <pow> returns an indeterminate result. ali@0: ali@0: ali@0: ali@0: ali@0: ali@0: <libxexpr:pow>10 2</libxexpr:pow> --> <float>100</float> ali@0: ali@0: ali@0: