diff options
author | Abhinav Dronamraju | 2017-07-20 21:48:58 +0530 |
---|---|---|
committer | Abhinav Dronamraju | 2017-07-20 21:48:58 +0530 |
commit | a5d7599fd743ed83186f48905b827af8587f6b9a (patch) | |
tree | 352ad1216ffa6a31537766ba94295e9c551bbcdf /demos/Abhinav_Demos/modula.sci | |
parent | 35ff505ddd9b1f269f2b6bfb4e7ed8e4ee20bf41 (diff) | |
parent | 29388094e30cae9f11ba82360c1d9bc03b229d10 (diff) | |
download | scilab2c-a5d7599fd743ed83186f48905b827af8587f6b9a.tar.gz scilab2c-a5d7599fd743ed83186f48905b827af8587f6b9a.tar.bz2 scilab2c-a5d7599fd743ed83186f48905b827af8587f6b9a.zip |
Added demos and merged FOSSEE master
Diffstat (limited to 'demos/Abhinav_Demos/modula.sci')
-rw-r--r-- | demos/Abhinav_Demos/modula.sci | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/demos/Abhinav_Demos/modula.sci b/demos/Abhinav_Demos/modula.sci new file mode 100644 index 00000000..8f56e6c1 --- /dev/null +++ b/demos/Abhinav_Demos/modula.sci @@ -0,0 +1,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 + |