LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Trig Problems

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?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trig Function seems odd. Ken McLennan Excel Worksheet Functions 9 May 8th 08 01:26 PM
Trig functions Kokopeelle Excel Worksheet Functions 3 September 30th 06 08:58 PM
Trig on drag and drop event? Maria J-son Excel Programming 1 July 8th 05 02:30 PM
Trig in degrees not radians Alex[_13_] Excel Programming 0 April 16th 04 03:36 AM
Data Types and inaccuracies with Trig functions in VBA Peter M[_3_] Excel Programming 4 February 13th 04 10:40 PM


All times are GMT +1. The time now is 12:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"