Page 1 of 1 1
Topic Options
#38807 - 2003-04-04 02:42 PM Sin Cos Tan
r.van.der.velden Offline
Fresh Scripter

Registered: 2003-04-04
Posts: 6
Are there any Sin, Cos, Tan functions available for kix?
_________________________
Use the source, Luke

Top
#38808 - 2003-04-04 02:52 PM Re: Sin Cos Tan
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
AFAIK, no !

Tell me what one could need these for and I may write those [Wink]
_________________________



Top
#38809 - 2003-04-04 03:14 PM Re: Sin Cos Tan
r.van.der.velden Offline
Fresh Scripter

Registered: 2003-04-04
Posts: 6
Well... Basic Mathematic function.. there a lots and lots of ways to use them.
_________________________
Use the source, Luke

Top
#38810 - 2003-04-04 03:16 PM Re: Sin Cos Tan
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
... I know that for sure as my educational background is electronics

Oh well, just wait and see If I got the time [Roll Eyes]
_________________________



Top
#38811 - 2003-04-04 03:19 PM Re: Sin Cos Tan
Ghost Offline
Starting to like KiXtart

Registered: 2000-09-14
Posts: 171
What are you trying to do with Cos, Tan, Etc?

[Smile]
_________________________
Who are you? Who slips into my robot body and whispers to my ghost?

Top
#38812 - 2003-04-04 03:20 PM Re: Sin Cos Tan
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Can you provide a specific example?

Why would you need this in a login script?

Now, if you are developing a KiXForms calculator, that would be a different story. [Smile]

I believe there was one done for SQRT..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#38813 - 2003-04-04 04:46 PM Re: Sin Cos Tan
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
See for example Eric Weisstein's World of Mathematics under http://mathworld.wolfram.com/Sine.html , which contains approximation formulas for SIN().
_________________________
There are two types of vessels, submarines and targets.

Top
#38814 - 2003-04-04 04:50 PM Re: Sin Cos Tan
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Think I know where R. is coming from. These functions have much use in certain classes of windows (forms) applications. Especially the kind that employ drawing ... I could have used these myself a while ago, I think Jooel ended-up writting a table driven version of the functions but they aren't very accurate.

-Shawn

Top
#38815 - 2003-04-04 10:19 PM Re: Sin Cos Tan
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
ermmmm ....

I took some time and already gave up on the first function sin() ... near to impossible (for me at least) using kix intrinsic methods [Frown]

All what I got so far is the knowledge that the nearest approach for e within KiXtart would be 2.71828182845905 (which is not precise enough I think)

Another rather crude thing I created within this short excursion to the world of ars mathematica is my attempt to code a pwr() func which allows one to calc x^y (OF COURSE y only allows integers !)



function pwr($x,$y)
    dim $i
    $pwr = cdbl($x)
    for $i = 2 to $y
        $pwr = $pwr * $x
    next
endfunction



should be better intrinsic [Roll Eyes]

Well, I also gave up to only understand what the heck an imaginary number is ... only so much : my scientific Casio Calculator gave up calculating Square Root of -1 [Eek!]

On the other side I would really like to see those very basic mathemtical function in KiX [Big Grin]

l8r
_________________________



Top
#38816 - 2003-10-14 09:05 PM Re: Sin Cos Tan
RearView Offline
Lurker

Registered: 2003-10-14
Posts: 2
Loc: N. Fort Myers Fl.
Hey Guys!
I just began looking for this very thing. Here is the Application that someone above ask for... I am currently writing a KiXforms Program to Calculate the Heel Height of a Truss. This requires the use of Cos and Sqr. I realize that this program is much more than a logon script ... but Kix's flexability is part of what makes it a great tool. - Shane

Top
#38817 - 2003-10-14 09:17 PM Re: Sin Cos Tan
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
As I already posted above, you can either use approximation formulas, use a lookup table with pre-calculated values, or write your own custom COM-DLL that provides math functions.
_________________________
There are two types of vessels, submarines and targets.

Top
#38818 - 2003-10-14 10:42 PM Re: Sin Cos Tan
macIntoz Administrator Offline
Administrator
*****

Registered: 2002-11-12
Posts: 22
shawn, you wrong.
jooel wrote his own functions to calculate...
afaik, this is inside coord() udf.
no tables, pure approximation with floating numbers and all.

Top
#38819 - 2003-10-15 05:24 AM Re: Sin Cos Tan
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3166
Loc: Houston TX
well...

SQRT() A square root function

SQR() A Square and or raise to the power of X function

hmm... sounds like a good research/project to do [Big Grin]

[ 15. October 2003, 05:25: Message edited by: Bryce ]

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 307 anonymous users online.
Newest Members
Thechadpma, CestMoi, MeMyselfAndI, Praveer, Ollero
17745 Registered Users

Generated in 0.378 seconds in which 0.353 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org