A VB Single data type is a 4 byte floating point number
A VB Double data type is a 8 byte floating point number

So, when you go to declare those variables in PHP, they may have to be declared with the PHP equivalents in order for the calculation to work.