neuper@37906
|
1 |
(*Komplexe Zahlen, anders als von Isabelle vorgeschlagen,
|
neuper@37906
|
2 |
und naeher an der traditionellen Schreibweise (sh.auch Mathematica)*)
|
neuper@37906
|
3 |
|
neuper@37906
|
4 |
|
neuper@37906
|
5 |
(*---- solche Tests gehoeren nach kbtest/complex.sml ---
|
neuper@37906
|
6 |
val t = (term_of o the o (parse thy)) "I__";
|
neuper@37906
|
7 |
atomt t;
|
neuper@37906
|
8 |
val t = (term_of o the o (parse thy)) "1 + 2 * I__";
|
neuper@37906
|
9 |
atomt t;
|
neuper@37906
|
10 |
val t = (term_of o the o (parse thy))
|
neuper@37906
|
11 |
"1 + 2 * I__ + 3 + 4 * I__ * (5 + 6 * I__) / (7 + 8 * I__)";
|
neuper@37906
|
12 |
atomt t;
|
neuper@37906
|
13 |
(*andere konkrete Syntax ???*)
|
neuper@37906
|
14 |
|
neuper@37906
|
15 |
val t = (term_of o the o (parse thy)) "Float ((1,2),(0,0)) * I__";
|
neuper@37906
|
16 |
atomt t;
|
neuper@37906
|
17 |
(*term2str t;*)
|
neuper@37906
|
18 |
val t = (term_of o the o (parse thy))
|
neuper@37906
|
19 |
"Float ((1,2),(0,0)) + Float ((3,4),(0,0)) * I__";
|
neuper@37906
|
20 |
atomt t;
|
neuper@37906
|
21 |
(*term2str t;*)
|
neuper@37906
|
22 |
---------------------------------------------------------*) |