Trigometric function

Trigometric function

Postby Vytas » Fri Mar 05, 2010 3:59 pm

Hi,

Currently am working with FWH 2.7 January 2007 version Using Harbour Alpha build 45.0 Intl. (Flex).
I require access to the ArcTan function. Is there a library that I can link in to provide the missing trigonometric functions?

Thanks,

Vytas
Vytas
 
Posts: 25
Joined: Sun Oct 23, 2005 9:58 pm

Re: Trigometric function

Postby Verhoven » Fri Mar 05, 2010 4:23 pm

Here is the solution for nearly every function you need: The Taylor series.

http://es.wikipedia.org/wiki/Serie_de_Taylor

This message is in Spanish but you can be sure to find it in English too.
Verhoven
 
Posts: 520
Joined: Sun Oct 09, 2005 7:23 pm

Re: Trigometric function

Postby nageswaragunupudi » Fri Mar 05, 2010 5:12 pm

All the necessary Trigonometric functions are available in CT.LIB of XHarbour or HBCT.LIB for Harbour. These libraries come along with xHarbour and Harbour. We just need to link these libraries also to use the functions.

We have SIN, COS, TAN, ASIN, ACOS, ATAN, ATAN2, TANH, etc
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10595
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Trigometric function

Postby Vytas » Fri Mar 05, 2010 6:26 pm

Thanks for pointing me to the newer Harbour software. I cannot link it in using a modified FWH 2.7 link script. Perhaps I need a more current rmk file. If so where can I get one? Or do I have to upgrade my FWH software?

Thanks,

Vytas
Vytas
 
Posts: 25
Joined: Sun Oct 23, 2005 9:58 pm

Re: Trigometric function

Postby James Bott » Fri Mar 05, 2010 6:56 pm

Go to this page and look for trig.zip and triglib.zip.

http://www.the-oasis.net/ftpmaster.php3 ... pgenrl.htm

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Trigometric function

Postby nageswaragunupudi » Sat Mar 06, 2010 6:40 am

Vytas wrote:Thanks for pointing me to the newer Harbour software. I cannot link it in using a modified FWH 2.7 link script. Perhaps I need a more current rmk file. If so where can I get one? Or do I have to upgrade my FWH software?

Thanks,

Vytas

You can use the FWH 2.7 also.
You need to change your link script to include 'hbct.lib' if you are using Harbour and 'ct.lib' if you are using xHarbour. These libraries should be available in (x)Harbour\lib folder.

Are you using Harbour or xHarbour and which version?

All these trigonometric functions were available from the days of Clipper. Clipper users were required to purchase CA Tools lib separately.

Now (x)Harbour provides these functions free of cost.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10595
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Trigometric function

Postby Biel EA6DD » Wed Mar 10, 2010 8:40 am

Include in your PRG, and ready to use. (Tang(n),Atn(),Cos(),Sin(),Acos())
Code: Select all  Expand view

#pragma BEGINDUMP
#include "windows.h"
#include "math.h"
#include "hbapi.h"

HB_FUNC( TANG )
{
   hb_retnd((double) tan((double)hb_parnd(1) ));
}

HB_FUNC( ATN )
{
   hb_retnd((double) atan((double)hb_parnd(1)));
}
HB_FUNC( COS )
{
   hb_retnd((double) cos((double)hb_parnd(1)));
}
HB_FUNC( ACOS )
{
   hb_retnd((double) acos((double)hb_parnd(1)));
}
HB_FUNC( SIN )
{
   hb_retnd((double) sin((double)hb_parnd(1)));
}

#pragma ENDDUMP

 
Saludos desde Mallorca
Biel Maimó
http://bielsys.blogspot.com/
User avatar
Biel EA6DD
 
Posts: 682
Joined: Tue Feb 14, 2006 9:48 am
Location: Mallorca


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 33 guests