To set the number of digits in a bigfloat, assign a new value
to fpprec. For example,
(C1) fpprec : 50;
(D1) 50
(C2) sqrt(2.0b0);
(D2) 1.414213562373095048801688724209698078569671875377B0
The numbers 2.0 and 2.0d0 are double-floats, so the value of fpprec
doesn't matter to these numbers. Thus,
(C3) sqrt(2.0);
(D3) 1.414213562373095
(C4) sqrt(2.0d0);
(D4) 1.414213562373095
To define a function using a previous expression as its formula,
use '' (this is two single quotes without any space between them)
(C3) f(x) := sin(x);
(D3) f(x) := SIN(x)
(C4) f1(x) := ''(diff(f(x),x));
(D4) f1(x) := COS(x)
(C5) f1(a);
(D5) COS(a)
(C6) f1(3.4);
(D6) - 0.9667981925794611
(C7)
The parenthesis surrounding diff(f(x),x) is important! For more
information on '', try describe("''");
(C5) describe("''");
0: "''" :(maxima.info)Introduction to Command Line.
- operator: "'"
- (single quote) has the effect of preventing evaluation. E.g.
'(F(X)) means do not evaluate the expression F(X). 'F(X) means
return the noun form of F applied to [X].
- operator: """
- (two single quotes) causes an extra evaluation to occur. E.g.
"c4; will re-execute line C4. "(F(X)) means evaluate the
expression F(X) an extra time. "F(X) means return the verb form
of F applied to [X].
Welcome to Maxima.
Barton
Janos Blazi <jblazi@gmx.de>
Sent by: maxima-admin@math.utexas.edu
09/30/2003 07:51 AM
To: maxima@www.ma.utexas.edu
cc:
Subject: [Maxima] Newbie questions
I am investigating Maxima. Maybe I can use it for my teaching (at a German
high school). Two questions:
1)
How do I set the floating point precision? I should like to calculate 2000
digits sqrt(x) for example. (In Maple I should say Digits := 2000.)
2)
I should like to do something like this:
f(x) := sin(x);
f1(x) := diff(f(x),x);
but f1(x) is not a well defined function of course. (In Maple I should use
"unapply" for this.)
TIA
--
JB
_______________________________________________
Maxima mailing list
Maxima@www.math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima