|
-
Aug 14th, 2001, 09:17 AM
#1
Thread Starter
Fanatic Member
Algebra in VB
Hi does anyone know how to program Algebra in VB? For instance I want to calculate "x" times of "a". In other words, "a" cubed "x".
I was thinking in VB should be something like this:
VB Code:
x=x+1
While x=1
yo=(a*a)*x
Wend
But it doesn't seem to work. Anyone? Even not a programmer, please give me ideas

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Aug 14th, 2001, 10:54 AM
#2
I'm not really sure what you want to do...
If you want to find the answer of, say:
y = a*(x*x*x) + b*(x*x) + c
you can do this in VB by:The "^" symbol allows you to use powers. So by typing "2^3" you would get an answer of 8. "2^(-3)" gives 0.125 which is 1/8.
If this isn't quite what you need, try to explain it a bit better - do you have any formulas you need to solve?
Destined.
-
Sep 9th, 2001, 01:36 PM
#3
y = a*(x*x*x) + b*(x*x) + c
...is actually faster than the equivalent...
y = a*(x^3)+b*(x^2)+c
If performance is important to you
-
Sep 10th, 2001, 12:39 PM
#4
Function Power_Generator(a as double,x as long) as double
dim lna as double
lna = log(a)
Power_Generator = exp(lna * x)
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|