Continue to Site

# How to have a value of the tangent with decimal point?

Status
Not open for further replies.

#### vincentspm

##### Newbie level 6
tangent=(SinE3(angle)/CosE3(angle);

by using this code, how to have an value of the tangent with decimal point?what should i declare for tangent?
i need to have this value then send to LCD, i'm using PIC16F877A

trigonometry

I think you will have to make your question a little clearer. Are you asking what function to use to evaluate this equation? If so, you will have to either write cos and sin functions yourself, or perhaps you can find a math library to do it for you.

trigonometry

i think PCW compiler have gud math lib having all trignometery functions

Re: trigonometry

tangent initliaze as Float
or
the
use the conversion spcaifer of %f when u takeing the numeric value of tangent.other is whatever...
int cos
int sin
float tang
and
so on

this will help better i think see precise the topics

Re: trigonometry

tangent will be a float. Most of the std C match libraries already include the trig. functions. Using the %f modifier will help when sending data to the LCD.

Cheers
Slayer

Re: trigonometry

thanks for helping, i will go and try it

Status
Not open for further replies.