The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled C++ Code
Posted by: FUUU | April 8, 2010 @ 5:36pm
C++ Code
[
Download
]
typedef std::size_t nrs; uint_fixed& operator*=(const uint_fixed& a) //! f�r endianess und 3er klasse { uint_fixed tmp(*this); std::memset(number, 0u, array_size*sizeof(nrs); for(nrs i(0u);i!=array_size;++i) { for(nrs j(0u);j!=bpn;++j) { if(a.number[i] & (1u<<j) ) { for(nrs l(i);l!=array_size;++l) //stimmt das so, erst mit dem i-ten element anzufagen? { number[l]+=tmp.number[l]; if(number[l]<tmp.number[l]) for(nrs m(l+1u);m!=array_size;++m) if(++number[m]) break; } } for(nrs k(i);k!=array_size-1u;++k) { tmp.number[k]>>=1u; tmp.number[k]|=(tmp.number[k+1u]<<(bpn-1u)); } tmp.number[array_size-1u]>>=1u; } } return *this; }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.83 / 8
70 Votes
http://codebin.yi.org/577
page generated in 0.01 seconds