18.08.2013 Views

Scilab 2 - Robotica

Scilab 2 - Robotica

Scilab 2 - Robotica

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Le stringhe I numeri interi Strutture di controllo<br />

Overflow, circolarità e problemi di portabilità<br />

altri programm simili a <strong>Scilab</strong>, come Matlab o Octave, non<br />

si comportano allo stesso modo in caso di overflow<br />

sia Matlab che Octave saturano il valore di in overflow<br />

octave:1> uint8(0 + (-4:4))<br />

ans =<br />

0 0 0 0 0 1 2 3 4<br />

octave:2> uint8(2^8 + (-4:4))<br />

ans =<br />

252 253 254 255 255 255 255 255 255<br />

octave:3> int8(2^7 + (-4:4))<br />

ans =<br />

124 125 126 127 127 127 127 127 127<br />

Tullio Facchinetti CNeP: Introduzione a <strong>Scilab</strong> (2)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!