Click here to Skip to main content
15,887,135 members
Home / Discussions / Algorithms
   

Algorithms

 
QuestionGreedy problem with filling sequence Pin
proggged26-Feb-09 4:23
proggged26-Feb-09 4:23 
AnswerRe: Greedy problem with filling sequence Pin
Perisic, Aleksandar28-Feb-09 5:38
Perisic, Aleksandar28-Feb-09 5:38 
GeneralRe: Greedy problem with filling sequence Pin
Perisic, Aleksandar1-Mar-09 3:45
Perisic, Aleksandar1-Mar-09 3:45 
QuestionAnd Or and Xor with floating point Pin
PIEBALDconsult25-Feb-09 4:35
mvePIEBALDconsult25-Feb-09 4:35 
AnswerRe: And Or and Xor with floating point Pin
Dan Neely25-Feb-09 4:47
Dan Neely25-Feb-09 4:47 
GeneralRe: And Or and Xor with floating point Pin
supercat925-Feb-09 5:28
supercat925-Feb-09 5:28 
GeneralRe: And Or and Xor with floating point Pin
Dan Neely25-Feb-09 5:38
Dan Neely25-Feb-09 5:38 
GeneralRe: And Or and Xor with floating point Pin
supercat925-Feb-09 6:08
supercat925-Feb-09 6:08 
I have to disagree. Bitwise operators should by definition be data agnostic and only look at the raw bits.

In C, the bitwise operators are not data agnostic. Their particular behavior was chosen to match the behavior of many common architectures, but on architectures which store things differently, the behavior of bitwise operators is required to emulate the common hardware rather than operate on the actual stored bits.

For example, on many machines the 16-bit quantity -5 is represented as 1111111111111011. On some it would have been represented as 1000000000000101. On either type of machine, however, the C standard specifies that (-5 & 12)==8.

I can imagine scenarios where it would be useful to apply Boolean operators to fractional numbers using aligned-binary-point maths; I can't imagine any scenario where applying Boolean operators to the binary representation of floating-point numbers would yield anything of value except in cases aligned-binary-point math would be just as useful (indeed, just about the only scenario I can see having any use would be or'ing a bunch of numbers to see if any are negative or exceed some particular magnitude).
GeneralRe: And Or and Xor with floating point Pin
PIEBALDconsult25-Feb-09 6:48
mvePIEBALDconsult25-Feb-09 6:48 
QuestionCalculate intersection between arcs / lines and arc /arc Pin
sagaert21-Feb-09 8:12
sagaert21-Feb-09 8:12 
AnswerRe: Calculate intersection between arcs / lines and arc /arc Pin
Arash Partow21-Feb-09 16:40
Arash Partow21-Feb-09 16:40 
GeneralRe: Calculate intersection between arcs / lines and arc /arc Pin
sagaert22-Feb-09 3:13
sagaert22-Feb-09 3:13 
QuestionCaculate time left for data transfer Pin
cdpace17-Feb-09 6:21
cdpace17-Feb-09 6:21 
GeneralRe: Caculate time left for data transfer Pin
Luc Pattyn17-Feb-09 6:32
sitebuilderLuc Pattyn17-Feb-09 6:32 
GeneralRe: Caculate time left for data transfer Pin
cdpace17-Feb-09 11:30
cdpace17-Feb-09 11:30 
GeneralRe: Caculate time left for data transfer Pin
Luc Pattyn17-Feb-09 13:51
sitebuilderLuc Pattyn17-Feb-09 13:51 
AnswerRe: Caculate time left for data transfer Pin
Leonardo Muzzi17-Feb-09 9:12
Leonardo Muzzi17-Feb-09 9:12 
Questionthinning algorithm Pin
Swati Khanna17-Feb-09 1:40
Swati Khanna17-Feb-09 1:40 
AnswerRe: thinning algorithm Pin
riced17-Feb-09 2:33
riced17-Feb-09 2:33 
AnswerRe: thinning algorithm Pin
Andrew Kirillov5-Mar-09 0:49
Andrew Kirillov5-Mar-09 0:49 
QuestionAES Rijndael Cryptography fails Pin
Leonardo Muzzi16-Feb-09 10:16
Leonardo Muzzi16-Feb-09 10:16 
GeneralRe: App fails to use AES Rijndael Cryptography correctly? Pin
Luc Pattyn16-Feb-09 10:41
sitebuilderLuc Pattyn16-Feb-09 10:41 
AnswerRe: App fails to use AES Rijndael Cryptography correctly? Pin
Leonardo Muzzi17-Feb-09 3:13
Leonardo Muzzi17-Feb-09 3:13 
QuestionCreating graph of file usage in build tree Pin
Adam Dare13-Feb-09 3:38
Adam Dare13-Feb-09 3:38 
AnswerRe: Creating graph of file usage in build tree Pin
ky_rerun24-Feb-09 15:16
ky_rerun24-Feb-09 15:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.