2,966 reputation
11122
bio website
location
age
visits member for 3 years, 11 months
seen Dec 18 at 10:02

Jun
21
comment How to compute a signature of a matrix
MD5 and SHA aren't defined over text but over byte streams.
Jun
13
comment Does the ray tracing algorithm involves rasterization of image?
What image do you have available to rasterise?
Jun
6
comment How to generate random numbers with a (negative) sloping distribution?
@JanDoggen, that follow-up question is more suited for math.stackexchange.com
Jun
3
comment Where to learn graph theory applications
Not quite an answer, but the graphs tag on the codegolf stack will give you a few problems which you could treat as exercises (and you could also search for graph to see where people describe their solutions as using graphs). (Just don't post your answers to the questions tagged codegolf unless you've made an effort to write the shortest solution you can rather than the clearest, which is what you'd probably want to do when studying graph algorithms).
May
21
awarded  Nice Answer
May
16
comment Why is 0 false?
This argument just about works for abusing bitwise | as a Boolean operator but it breaks down for & and ^ because of the existence of distinct non-zero values.
May
14
comment Single codebase for client and server with Node.js
@hippietrail, en.wikipedia.org/wiki/WAR_file_format_(Sun)
May
14
answered Single codebase for client and server with Node.js
May
4
comment Is there any situation when there's no alternative to instanceof?
There's a variant on the second approach which can be used in e.g. Java: try an explicit cast and be ready to catch the ClassCastException. It's probably open for debate whether this is really just hiding an instanceof check behind syntactic sugar.
May
1
awarded  Nice Answer
Apr
26
comment Why does Donald Knuth write TAOCP using assembly language?
Knuth implemented an ALGOL compiler in 1960, and ALGOL was intended to be suitable for publishing algorithms, so I don't think this really answers the question.
Apr
25
awarded  Custodian
Apr
17
comment Does any well-known license require to make modifications available when only derived *output* is published?
The GPL itself claims to be protected by copyright, so unless the lawyer / law student thinks they have a solid argument that it's ineligible, they might be reluctant to create an unauthorised derived work.
Apr
12
answered How can I evaluate a candidate's knowledge of Html/CSS during an interview?
Apr
5
comment Implementing base-10 floating point division
Your multiplication is a bit overkill. You're multiplying two 9-digit numbers, so the result will have 17 or 18 digits. You then want to reduce to 9 digits, so you're dropping 8 or 9 digits. Therefore you can safely drop the bottom 3 digits from each number before multiplying, and eliminate all of the terms containing C or F.
Apr
4
revised Computing integration with the Trapezoidal Rule
Fix scope
Apr
3
comment Is (1/(1/x)) always a perfect round trip?
Nice use of the pigeonhole principle. It can be extended to get a bound equal to my estimate for the number of collisions. For x in (1, 2), the range (x, 2) maps onto the range (0.5, x^-1), so given the difference in ulp the proportion of collisions is at least (2 - x) - 2(x^-1 - 0.5) = 3 - x - 2x^-1. Differentiate: this has extrema when -1 + 2x^-2 = 0 i.e. x^2 = 2. Only the positive root is in range, so we get that the proportion of collisions is at least 3 - sqrt(2) - 2/sqrt(2) = 3 - 2sqrt(2).
Apr
2
awarded  Nice Answer
Apr
2
revised Is (1/(1/x)) always a perfect round trip?
Analysis backs up empirical results
Apr
1
comment Is (1/(1/x)) always a perfect round trip?
@MichaelShaw, there's no good reason to expect that the reciprocal should even be injective, which would be a precondition for double-reciprocal to round-trip. However, there's a difference between a) stating without proof that there's probably at least one number that doesn't round-trip; b) calculating and justifying an estimate for the number of mantissas which don't round-trip; c) proving that at least one mantissa doesn't round-trip. I would be quite interested to see a careful analysis which shows how good or bad my empirical measurement is.