-
Notifications
You must be signed in to change notification settings - Fork 0
/
d.ex
43 lines (32 loc) · 890 Bytes
/
d.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
with trace
include eunumber/my.e
object a, b, c, d
trace(1)
isRoundToZero = FALSE
IntegerModeOn()
a = ToEun("95.555") --here, working on IntegerMode in AdjustRound()
? a
b = AdjustRound(a[1], a[2], 0, a[4], NO_SUBTRACT_ADJUST)
? b
b = AdjustRound(a[1], a[2], 1, a[4], NO_SUBTRACT_ADJUST)
? b
trace(1)
b = AdjustRound(a[1], a[2], 2, a[4], NO_SUBTRACT_ADJUST)
? b
c = AdjustRound(a[1], a[2], 3, a[4], NO_SUBTRACT_ADJUST)
? c
b = AdjustRound(a[1], a[2], 4, a[4], NO_SUBTRACT_ADJUST)
? b
b = AdjustRound(a[1], a[2], 5, a[4], NO_SUBTRACT_ADJUST)
? b
d = AddExp(c[1], c[2], c[5][1], c[5][2], 10, defaultRadix)
? d
d = AddExp(c[1], c[2], c[5][1], c[5][2], 4, defaultRadix)
? d
d = AddExp(c[5][1], c[5][2], c[1], c[2], 5, defaultRadix)
? d
trace(1)
d = SubtractExp(c[1], c[2], -c[5][1], c[5][2], 10, defaultRadix)
? d
d = SubtractExp(-c[1], c[2], c[5][1], c[5][2], 10, defaultRadix)
? d