correction in setting T variable
changing from single precision to double one
changing from single precision to double one in the testing part