@@ -1,706 +1,706 @@
-REDUCE 3.6, 15-Jul-95, patched to 6 Mar 96 ...
-
-
-comment
-
-This is a demonstration of the working of elementary functions available
-in the Reduce system. It is not intended as an accuracy test. Other
-functions become available if certain library packages are loaded.
-
- -------
-
-Integer functions that work in all domain modes, independent of switch
-NUMVAL, so long as their arguments evaluate to real numbers.
-
-Functions of one argument:
-FIX, SGN, ROUND, CEILING, FLOOR
-
-(The following functions are available only in symbolic mode, so they
- are not tested here: ISQRT, ICBRT, ILOG2, IROOTN);
-
-
-fix a;
-
-
-fix(a)
- % will be evaluated only if a evaluates to a real number.
-
-a := 27/4;
-
-
- 27
-a := ----
- 4
-
-
-fix a;
-
-
-6
-
-
-fix 12.345;
-
-
-12
-
-
-sign (-15/2);
-
-
--1
-
-
-round 12.5;
-
-
-13
-
-
-ceiling 12.5;
-
-
-13
-
-
-floor 12.5;
-
-
-12
-
-
-% isqrt 12.5;
-
-% icbrt 12.5;
-
-% ilog2 130.7;
-
-% irootn(72,4);
-
-% irootn(72,3/2); % this will not evaluate.
-
-
-comment Functions which require arguments which evaluate to integers:
-
-Function of one argument: FACTORIAL
-
-Fumction of two arguments: PERM, CHOOSE;
-$
-
-
-
-factorial 10;
-
-
-3628800
-
-
-perm(5,10);
-
-
-30240
- % permutations of 5 out of 10.
-
-choose(5,10);
-
-
-252
- % choose 5 out of 10;
-
-
-comment
-
-These functions are evaluated in dmodes ROUNDED and COMPLEX-ROUNDED
-(ON ROUNDED,COMPLEX) so long as their arguments and values evaluate
-to real numbers and NUMVAL (normally ON) is ON.
-
-Variable treated as function of no arguments: E, PI.
-
-Functions of one argument:
-EXP, LOG, LN, LOG10, NORM, ARG, SQRT,
-RAD2DEG, RAD2DMS, DEG2RAD, DEG2DMS, DMS2DEG, DMS2RAD,
-SIN, ASIN, COS, ACOS, TAN, ATAN, COT, ACOT, SEC, ASEC, CSC, ACSC,
-SINH, ASINH, COSH, ACOSH, TANH, ATANH, COTH, ACOTH, SECH, ASECH,
-CSCH, ACSCH.
-
-Functions of two arguments:
-EXPT, LOGB, HYPOT, ATAN2.
-
-Function evaluation is carried out to the precision specified in the
-latest PRECISION statement.
-
-(The following functions are available only in symbolic mode, so they
- are not tested here:
- SIND, ASIND, COSD, ACOSD, TAND, ATAND, COTD, ACOTD, SECD, ASECD,
- CSCD, ACSCD, ATAN2D, CBRT);
-
-
-on rounded;
-
- precision 6;
-
-
-12
-
-
-a := exp 3;
-
-
-a := 20.0855
-
-
-log a;
-
-
-3.0
-
-
-ln a;
-
-
-3.0
-
-
-log10 1000;
-
-
-3.0
-
-
-norm (-12.345);
-
-
-12.345
- % for real x, this is equivalent to ABS x.
-
-arg (-12.345);
-
-
-3.14159
- % for real x, this -> if x<0 then pi else 0.0.
-
-sqrt 3;
-
-
-1.73205
-
-
-ws**2;
-
-
-3.0
-
-
-deg2rad 30;
-
-
-0.523599
-
-
-rad2deg ws;
-
-
-30.0
-
-
-a := deg2dms 12.345;
-
-
-a := {12,20,42.0}
- % a will be a list.
-
-dms2deg ws;
-
-
-12.345
-
-
-dms2rad a;
-
-
-0.215461
-
-
-rad2deg ws;
-
-
-12.345
-
-
-asin 0.5;
-
-
-0.523599
-
-
-sin ws;
-
-
-0.5
-
-
-acos 0.5;
-
-
-1.0472
-
-
-cos ws;
-
-
-0.5
-
-
-atan 0.5;
-
-
-0.463648
-
-
-tan ws;
-
-
-0.5
-
-
-acot 0.5;
-
-
-1.10715
-
-
-cot ws;
-
-
-0.5
-
-
-asec 3;
-
-
-1.23096
-
-
-sec ws;
-
-
-3.0
-
-
-acsc 3;
-
-
-0.339837
-
-
-csc ws;
-
-
-3.0
-
-
-asinh 0.5;
-
-
-0.481212
-
-
-sinh ws;
-
-
-0.5
-
-
-acosh 2;
-
-
-1.31696
-
-
-cosh ws;
-
-
-2.0
-
-
-atanh 0.5;
-
-
-0.549306
-
-
-tanh ws;
-
-
-0.5
-
-
-acoth 2;
-
-
-0.549306
-
-
-coth ws;
-
-
-2.0
-
-
-sech 1;
-
-
-0.648054
-
-
-asech ws;
-
-
-1
-
-
-csch 1;
-
-
-0.850918
-
-
-acsch ws;
-
-
-1
-
-
-expt(2,1.234);
-
-
-2.35218
-
-
-logb(ws,2);
-
-
-1.234
-
-
-hypot(3,4);
-
-
-5.0
-
-
-a := -3*pi/4;
-
-
-a := - 2.35619
- % any -pi if x<0 then pi else 0.0.
+
+sqrt 3;
+
+
+1.73205
+
+
+ws**2;
+
+
+3.0
+
+
+deg2rad 30;
+
+
+0.523599
+
+
+rad2deg ws;
+
+
+30.0
+
+
+a := deg2dms 12.345;
+
+
+a := {12,20,42.0}
+ % a will be a list.
+
+dms2deg ws;
+
+
+12.345
+
+
+dms2rad a;
+
+
+0.215461
+
+
+rad2deg ws;
+
+
+12.345
+
+
+asin 0.5;
+
+
+0.523599
+
+
+sin ws;
+
+
+0.5
+
+
+acos 0.5;
+
+
+1.0472
+
+
+cos ws;
+
+
+0.5
+
+
+atan 0.5;
+
+
+0.463648
+
+
+tan ws;
+
+
+0.5
+
+
+acot 0.5;
+
+
+1.10715
+
+
+cot ws;
+
+
+0.5
+
+
+asec 3;
+
+
+1.23096
+
+
+sec ws;
+
+
+3.0
+
+
+acsc 3;
+
+
+0.339837
+
+
+csc ws;
+
+
+3.0
+
+
+asinh 0.5;
+
+
+0.481212
+
+
+sinh ws;
+
+
+0.5
+
+
+acosh 2;
+
+
+1.31696
+
+
+cosh ws;
+
+
+2.0
+
+
+atanh 0.5;
+
+
+0.549306
+
+
+tanh ws;
+
+
+0.5
+
+
+acoth 2;
+
+
+0.549306
+
+
+coth ws;
+
+
+2.0
+
+
+sech 1;
+
+
+0.648054
+
+
+asech ws;
+
+
+1
+
+
+csch 1;
+
+
+0.850918
+
+
+acsch ws;
+
+
+1
+
+
+expt(2,1.234);
+
+
+2.35218
+
+
+logb(ws,2);
+
+
+1.234
+
+
+hypot(3,4);
+
+
+5.0
+
+
+a := -3*pi/4;
+
+
+a := - 2.35619
+ % any -pi