#112493 - 2004-01-27 11:11 PM
Re: Enhanced Math - power of n
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Just ran your code as spec'd ... yields:
t = 3.29999999944272
Is this good or bad ? Heres the code:
Code:
$System = CreateObject("Kixtart.System")
$Math = $System.Math()
$e = 3.3
$b = 2.718281828
$t = $Math.log($b) * $e
?"t = " $t
-Shawn
|
Top
|
|
|
|
#112498 - 2004-01-27 11:50 PM
Re: Enhanced Math - power of n
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
ja, right now KF has these functions:
COS() LOG() LOG10() POW() SIN() SQRT()
And I dont really want to implement every single possible math function known to man (in this release ... I will take it on your expert opinion that Exp is a good thing to add. You are a Math teacher after all, ja ?
|
Top
|
|
|
|
#112501 - 2004-01-28 04:17 PM
Re: Enhanced Math - power of n
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
I have to agree with Jack. Using the afore-mentioned math (basic/trigonometric) functions, one create other more complex functions as UDFs if necessary. However, I do have one request though, can you also throw in some bit-wise and binary operators, like NOT/AND/OR/XOR such as
Code:
C = BITAND(A,B) returns the bit-wise AND of the two arguments
C = BITCMP(A,N) returns the bit-wise complement of A as an N-bit non-negative integer
C = BITOR(A,B) returns the bit-wise OR of the two arguments A and B
C = BITXOR(A,B) returns the bit-wise exclusive OR of the two arguments A and B
C = BITSET(A,BIT,V) sets the bit at position BIT to the value V
C = BITGET(A,BIT) returns the value of the bit at position BIT in A
C = BITSHIFT(A,K,N) returns the value of A shifted by K bits. Shifting by K is the same as multiplication by
2^K and then rounding to the nearest integer (i.e. C = fix(A*2^K)). If the shift causes
C to overflow N bits, the overflowing bits are dropped
C = XOR(S,T) is the logical symmetric difference of elements S and T. The result is one where either S or T,
but not both, is nonzero. The result is zero where S and T are both zero or nonzero.
BTW, it seems that Jacks clain to fame are these two articles:
Quote:
Lothian, J. and Morry, M. (1977). The problem of aggregation: direct or indirect seasonal adjustment. Research paper 77-08-001E, Seasonal Adjustment and Time Series Staff, Statistics Canada.
Lothian, J. and Morry, M. (1978). A test for the presence of identifiable seasonality when using the X-11 program. Research paper 78-10-002E, Seasonal Adjustment and Time Series Staff, Statistics Canada.
Edited by sealeopard (2004-01-28 04:22 PM)
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#112502 - 2004-01-28 07:22 PM
Re: Enhanced Math - power of n
|
Jack Lothian
MM club member
Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
|
|
Top
|
|
|
|
#112504 - 2004-01-29 09:54 AM
Re: Enhanced Math - power of n
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 265 anonymous users online.
|
|
|