Friday, January 8, 2010

4 GOOGLE SEARCHES IN A SINGLE PAGE !

Try "www.googlegooglegooglegoogle.com" and get the 4 google search on a single page.

Try playing with funny variations ! a mix and match with wiki and google !



Monday, January 4, 2010

ZETA IN SCIPY

PROBLEMS WITH ZETA FUNCTION IN SCIPY

Dabbling with zeta in scipy gave various unsatisfactory results. Few very obvious results of zeta function are ;

(1) For negative even integers the function is zero
(2) zeta(0) = -1/2
(3) zeta(-1) = -1/12
(4) zeta(1/2) = -1.46035450880.....
(5) zeta(1) = infinity
(6) zeta(2) = 1.6449340.....

Trying it on scipy,


The probable reason for this inconsistent behaviour and issues for zeta values below 2 and improbable results for negative numbers is; the module is probably structured abinitio from zeta function

whilst it may be a better idea to structure the zeta function using the functional equation.

It may also help to have a special provision for zeta(1/2)

AN EXPERIMENT IN ADA

MULTIPLE CONCURRENT UPDATES IN ADA-2005

Probably the best book in Ada concurrent and real time programming is,



Pic 1. Concurrent and Real time programming in Ada-2005

In this book, in page 37 the authors discuss a program which lacks protection to multiple concurrent updates,

Pic 2. The Program

On tinkering with the program, increasing the looping; strange results are seen to happen. The program is tried with increasing looping in XP and also Ubuntu 9.10. The results are as follows;

Observations in XP ( first table ) and in Ubuntu 9:10( second table ) :


The program runs on the same body and has 2 tasks, on higher loops discrepancy is observed and issues of multiple concurrent updates are visible.

On closer observations it can be seen that XP and Ubuntu 9.10 behave little differently and the issue of multiple concurrent updates come to be at different loopings.

The reasons for such behaviour is still not very well understood by me, however modifying the program using semaphores does rectify this problem.