summaryrefslogtreecommitdiff
path: root/2.3-1/demos/Abhinav_Demos/modula.sci
blob: 8f56e6c1f4cfee7405801b367ea7cf3c79f96ba7 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
function modula()

a=312
b=18.12
disp('Double')

disp(pmodulo(a,b))

disp(pmodulo(a,-b))

disp(pmodulo(-a,b))

disp(pmodulo(-a,-b))

k=[12 , -134 , 1213; -12.12, -0.12, 91281]
l=[12, ,1212 ,12; -91288.12, -0.912, -10000]

disp(pmodulo(k,l))

disp('Float')
c= float(312)
d=float(121.212)

disp(pmodulo(c,d))

disp(pmodulo(c,-d))

disp(pmodulo(-c,d))

disp(pmodulo(-c,-d))

e=float([12 , -134 , 1213; -12.12, -0.12, 91281])
f=float([12, ,1212 ,12; -91288.12, -0.912, -10000])

disp( pmodulo(e,f))

disp('Uint16')

g= int16(112)
h= int16(121)

disp(pmodulo(g,h))

disp(pmodulo(g,-h))

disp(pmodulo(-g,h))

disp(pmodulo(-g,-h))

i= int16([12 , -134 , 1213; -12.12, -12.54, 91281])

j= int16([12, ,1212 ,12; 1121, -6000, -10000])
disp( pmodulo(i,j))


endfunction