E + PI + 99/70
7.274160196
MuPAD allways calculates exact until the function float is used to get a solution in form of a floating point value.
1047689403489
The precision of floating point values is variable and it is only limited by the computers memory.
1.414213562373095048801688724209698078569671875376948073
PI
3.141592653589793238462643383279502884197169399375105820974\
94459230781640628620899862803482534211706798214808651328230\
66470938446095505822317253594081284811174502841027019385211\
05559644622948954930381964428810975665933446128475648233786\
78316527120190914564856692346034861045432664821339360726024\
91412737245870066063155881748815209209628292540917153643678\
92590360011330530548820466521384146951941511609433057270365\
75959195309218611738193261179310511854807446237996274956735\
18857527248912279381830119491
MuPAD can also handle very large numbers and has functions to operate on prime numbers. The % (last) operator represents the last calculated value or expression.
7
1033446543458805915609396553829751655062226004168206282343290246\
9783188597914276568552700194849877929894375950252570477080418352\
7325976587456659256047046692271337264772438543178366351306941238\
9371163853300198049622987566547659856882180617030376554048981440\
2234159901540440432134155844542962445153646330595588291605924429\
2113522799434713728172799387209748952603877845782391509318169467\
8641623251666625196542191965183804461805099129440354695893074541\
9743836966520198735201123255884089263272829846640538826979843642\
8857757916415751091787535095800016603920923967986489243754010241\
4788370229814591004688940288039419536998400000000000000000000000\
0000000000000000000000000000000000000000000000000000000000
[1, 2, 328, 3, 165, 5, 81, 7, 53, 11, 32, 13, 26, 17, 20, 19, 17,
23, 14, 29, 11, 31, 10, 37, 9, 41, 8, 43, 7, 47, 7, 53, 6, 59, 5,
61, 5, 67, 4, 71, 4, 73, 4, 79, 4, 83, 4, 89, 3, 97, 3, 101, 3,
103, 3, 107, 3, 109, 3, 113, 2, 127, 2, 131, 2, 137, 2, 139, 2,
149, 2, 151, 2, 157, 2, 163, 2, 167, 1, 173, 1, 179, 1, 181, 1,
191, 1, 193, 1, 197, 1, 199, 1, 211, 1, 223, 1, 227, 1, 229, 1,
233, 1, 239, 1, 241, 1, 251, 1, 257, 1, 263, 1, 269, 1, 271, 1,
277, 1, 281, 1, 283, 1, 293, 1, 307, 1, 311, 1, 313, 1, 317, 1,
331, 1]
TRUE
815915283247897734345611269596115894272000000000
815915283247897734345611269596115894272000000053
2
2 x + x
2 3 4
4 x + 4 x + x
In MuPAD algebraic expression may manipulated and transformed. Also refer to the paragraphs below.
15
10 10 9 9 2 8 3 7
a + b + 10 a b + 10 a b + 45 a b + 120 a b +
4 6 5 5 6 4 7 3 8 2
210 a b + 252 a b + 210 a b + 120 a b + 45 a b
"This is an example"
"### This is an example ###"
"This"
TRUE
Value1, Value2, Value3
1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 1728, 2197
25502500
81285103704665697929058034741394527800954175275203119077085\
79474767088848233730596856720188375050478138776220712647125\
92314115920641160919935403754583649069843601261900051908970\
24813510723449889579660946315033449388079966874258629176303\
02052505909887462286075836527716233413659162900924769568594\
29554672135618951275111007717373291473301054034842043089511\
58469957099274146970547638354741532999364798054400000000000\
00000000000000000000000000000000000000000000000000000000000\
00
MuPAD can work on sets. The standard operations union, intersection and contain are available.
{a, b, 1, 2, 3, 4}
{a, c, 3, 4}
{a, b, c, 1, 2, 3, 4}
{a, 3, 4}
TRUE
Like allmost every programming language also MuPAD can operate on static lists.
[a, b, a, b, c]
b, c
5, 0
[a, b, c, d, b, - a, a, c]
Also the data structure array is available and may be used for matrix and vector operations.
+- -+
| 11 , 12 |
| |
| 21 , 22 |
+- -+
33
Another usefull data structure is the table. Unlike the data structure list - where the index has to be an integer - in tables an index may be of any kind of expression. Therfore in MuPAD a table can be used as a associative memory.
table(a=2, 3=4)
table(1=2, 3=4)
table(1=2, ({1},1)=11, 3=4, ([2],2)=22)
u(22) + v(22) + w(22)
u(v(w(22)))
2 2
cos(42) + sin(42)
1.0
P[1](22)-P[2](22)
8
At any time further operators can also be defined by the user.
{1, 2, 3}
{-1, -2, -3}
_union
{1, -1, 2, -2, 3, -3}
a, b, c
3
T, a, b
b
a
a + e + c*d
/ ln(exp(x)) \
tan | exp(x) + -------------------- |
\ ln(sin(exp(exp(x)))) /
/ x \
tan | exp(x) + -------------------- |
\ ln(sin(exp(exp(x)))) /
c + 42
42
666
>> Max:= proc(a,b) >> begin >> if a < b then b; >> else a; >> end_if; >> end_proc: >> Max( 42,666);
666
>> L:= [1, 2, 3, 4]: >> result:= []: >> for i in L do result:= result.[i+c]; >> end_for;
[c + 1, c + 2, c + 3, c + 4]
1560
30920
290
The MuPAD function profile can be used to get statistics about the (recursive) calling sequences of an algorithm. This is usefull to optimize algorithms. MuPAD has also a source level debugger to execute programs statement by statement under the user's control. Please refer to the demo distributed with the MuPAD system to get further information about it.
Total time: 80 ms
-----------------
taylor : 49.9 % 40 ms total 1 call(s) 0 lookup(s) 40.0 ms/call
O::simplify: 12.4 % 10 ms total 2 call(s) 0 lookup(s) 5.0 ms/call
sin : 12.4 % 10 ms total 4 call(s) 3 lookup(s) 2.5 ms/call
O::_plus : 12.4 % 10 ms total 1 call(s) 0 lookup(s) 10.0 ms/call
O::icontent: 12.4 % 10 ms total 2 call(s) 0 lookup(s) 5.0 ms/call
O::new : 0.0 % 0 ms total 1 call(s) 0 lookup(s) 0.0 ms/call
cos : 0.0 % 0 ms total 3 call(s) 3 lookup(s) 0.0 ms/call
<taylor> calls
cos : 3 time(s)
O::_plus : 1 time(s)
sin : 4 time(s)
O::new : 1 time(s)
<O::_plus> calls
O::simplify : 1 time(s)
<O::simplify> calls
O::icontent : 2 time(s)
<O::new> calls
O::simplify : 1 time(s)
-x + PI + (x-PI)^3*1/6 + (x-PI)^5*(-1/120) + O(x^6)
3 5
(x - PI) (x - PI) / 6 \
- x + PI + --------- - --------- + O \ x /
6 120
O(x^6)
O(x^5)
Domain 'O': Big O order terms of series.
No Interface.
2 mod 7
4 mod 7
6 mod 7
1 mod 7
2 mod 7
4 mod 7
IntegerMod(7)
TRUE
FALSE