6502

Italy

gripho.it

Age: 48

Programmer... some quite outdated infos on my website (that is abandonware because I've yet to find a way to create time, so I had to take decisions instead).

Aug
28
comment Deferred method inside while loop
@Tomalak: Mine is not a rant. I simply observed that the "nested event loop" concept is absent from Javascript and this has consequences, one of them making impossible converting a asynchronous function into a synchronous form (what the OP seemed to me being asking). For sure it's not simply unintentional but I don't know the reasons for that choice (I never investigated for them, though).
Aug
28
answered Deferred method inside while loop
Aug
27
comment why can't I get a prime number using this python file?
range of the for is computed first and then x is reduced for each factor found. This means for example that 768 = 2**8 * 3 would find 2, reduce x to 3 and then loop up to 28 (i.e. 768**0.5) while looking for divisors of 3...
Aug
26
answered Delta V Calculator issue with Logarithms
Aug
25
answered How to change the file name to search for in c++
Aug
25
comment Closing a CSV file in Python
Are you sure that's your code the other process that is preventing windows from renaming the file? May be are there other processes that watch for files being created to analyze them (e.g. antivirus)?
Aug
24
revised Log(2 ** 62,2).is_integer() is returning false . Any ideas why?
added 364 characters in body
Aug
24
comment Log(2 ** 62,2).is_integer() is returning false . Any ideas why?
@Prashant: then may be what I've heard about MS compilers is not valid any more... or may be there is some inline assembly for the windows build. I'm trying to update my quite outdated sandbox with the source but it's taking ages...
Aug
24
comment Log(2 ** 62,2).is_integer() is returning false . Any ideas why?
@SylvainLeroux: I think s/he is talking about math.log2(2**31) in Python 3
Aug
24
revised Log(2 ** 62,2).is_integer() is returning false . Any ideas why?
added 149 characters in body
Aug
24
comment Log(2 ** 62,2).is_integer() is returning false . Any ideas why?
@BasSwinckels: whoops you're right... I'll fix that part. For log2 implementation in Python3 look for mathmodule.c (in my quite old checkout is at line 592) and see the #ifdef HAVE_LOG2 part.
Aug
24
comment Log(2 ** 62,2).is_integer() is returning false . Any ideas why?
@SylvainLeroux: 2*31 is still clearly exactly computable by the hardware without problems, and it's the first "small enough" value in the list that was in the question. Of course if you do a base change even 2**3 is going to be "risky"... it may end up rounded to the integer or not.
Aug
24
revised Log(2 ** 62,2).is_integer() is returning false . Any ideas why?
added 412 characters in body
Aug
24
answered Log(2 ** 62,2).is_integer() is returning false . Any ideas why?
Aug
24
comment Is there any library for binary Search in C++
Are you sure that binary searching a list is going to be a good idea?
Aug
22
revised Different composition of a number using small numbers
indentation
Aug
22
answered Different composition of a number using small numbers
Aug
22
revised Different composition of a number using small numbers
indent
Aug
22
revised Python re.findall() and precedence
added 103 characters in body
Aug
22
comment Python re.findall() and precedence
@Veritas: I'm not omitting them in the expression... I'm requiring exactly one parenthesis set around the number. If you're looking for balancing parenthesis then I've bad news... see edit.
1 2 3 4 5