J
Jack Clift
Am having problems with the use of trig functions within in VBA.
sin(worksheetfunction.pi/2) = 1 //this is ok
cos(worksheetfunction.pi/2) = 6.12303176911189E-17 //this is causing me a
real headache... it should and needs to equal 0.
For reasons I wont go into I cannot fudge with the round() function.
I have tried using decimal type to define PI, but have not succeeded (not
sure that I am coding correctly, but VB 'truncates' anything over 15 sig.
figures in the programming environment, so I can't increase accuracy by
simple const definition.
any ideas?
sin(worksheetfunction.pi/2) = 1 //this is ok
cos(worksheetfunction.pi/2) = 6.12303176911189E-17 //this is causing me a
real headache... it should and needs to equal 0.
For reasons I wont go into I cannot fudge with the round() function.
I have tried using decimal type to define PI, but have not succeeded (not
sure that I am coding correctly, but VB 'truncates' anything over 15 sig.
figures in the programming environment, so I can't increase accuracy by
simple const definition.
any ideas?