12,902 reputation
13061
bio website
location Seattle, WA
age 58
visits member for 4 years, 2 months
seen 28 secs ago

Dec
13
comment Maintenance cost of SIMD programming code base
Do have performance requirements? Can you meet your performance requirements without using SIMD? If not the question is moot.
Dec
6
comment Why do we have to mention the data type of the variable in C
@user31782 (cont) Contrast this with printf("%d\n",(int) h); Here the cast directs the compiler to force a conversion to an integer before passing the results to printf. This prints '65' as you expect.
Dec
6
comment Why do we have to mention the data type of the variable in C
@user31782, What's wrong with this: float h; h='A'; printf("%d",h) Now your are mixing in the runtime behavior of a library function. By specifying the '%d' in the format specifier you are directing the printf function to treat the variable h as an integer. Note that this does not mean "convert h to an integer"! It means "interpret the bits stored in h as an integer, regardless of its actual type." On my computer your printf call prints out 1405020384. I'm suspicious of your seeing 0 in the output. Are you running an Intel CPU? You may have a typo in your program.
Nov
23
awarded  Nice Answer
Nov
14
awarded  Nice Answer
Nov
13
revised Why were punch cards used for programming
Added paragraph about the problems of batch processing.
Nov
13
revised Why were punch cards used for programming
Added paragraph about the problems of batch processing.
Nov
13
revised Why were punch cards used for programming
added 82 characters in body
Nov
13
answered Why were punch cards used for programming
Oct
22
awarded  Guru
Oct
22
awarded  Enlightened
Oct
22
comment Why are floating point numbers used often in Science/Engineering?
@MichaelGrünewald, we can't represent real numbers exactly, but we are able to solve problems to a close enough approximation that we can build structures a couple thousand feet high, identify genes in DNA, and rendezvous a satellite with a comet after two years in space. To paraphrase Randy Newman, that may not be exact, but it is all right. In fact we can represent rationals exactly using arbitrary precision libraries (subject to limitations of memory).
Oct
22
awarded  Good Answer
Oct
21
awarded  Nice Answer
Oct
21
comment Why are floating point numbers used often in Science/Engineering?
@gnat I disagree that the question is overly broad. It's actually very easily answered, and the fact that all the answers and comments are in agreement (and indeed somewhat repetitive) is evidence that it is not simply a matter of opinion.
Oct
21
revised Why are floating point numbers used often in Science/Engineering?
deleted 2 characters in body
Oct
21
answered Why are floating point numbers used often in Science/Engineering?
Oct
8
awarded  Yearling
Oct
5
awarded  Booster
Oct
4
awarded  Announcer