[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
loop vs bit manipulation: some difference decimal
From: |
LucaLuca |
Subject: |
loop vs bit manipulation: some difference decimal |
Date: |
Wed, 17 Oct 2018 01:27:13 -0500 (CDT) |
hi,
i did exercise...
i create 2 code egual but tghe first with loop and the second with bit
manipulation
1)
E(1,1:columns(D))=D(1,:);
tic
for gg=2:rows(D)
for yy=1:columns(D)
E(gg,yy)=E(gg-1,yy)+D(gg,yy); %Singola equity per ciascun sistema
endfor
endfor
2)
f=flip(triu(ones(size(D)(1))));
E2 = f*flip(D);
i try to write difference:
E-E2
https://gyazo.com/1c201c2b59efc73814ef3d8bd98032db
I found that on decimals it has small differences
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- loop vs bit manipulation: some difference decimal,
LucaLuca <=