Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
When I use trig in VB, I get inaccurate answers for some angles. For instance, it says that cos(90)=6.123E-17 instead of 0 and that tan(90)=1.633E+16 instead of undefined. Does anyone know a solution to this problem? Oh, and just in case you were wondering, my program does convert the input from degrees to radians.
Take a look at my programs. Go to my web site.
Posted
Is there a way of solving this problem other than just telling it to show the correct answer if the user puts in one of the angles that is causing a problem?
Take a look at my programs. Go to my web site.
Posted
Math.Round() works for the ones where the answer should be zero, but not for the ones where it should be undefined. Unless someone knows of another way to fix this, it looks like I'll have to tell it which answer to give if it's one of the inaccurate angles.
Take a look at my programs. Go to my web site.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...