Help: Need to solve a SECOND DEGREE equation in VB 
Author Message
 Help: Need to solve a SECOND DEGREE equation in VB

HI,
I need to solve a second degree equation in Visual Basic....something
like this:
12.32*X^2 + 179.24*X - 958.1625 = 0
and I need the "positive" ( X=4.157 ) solution to be defined in a
variable
Im using Visual Basic 4.
Can anybody help me??

 Thanks in advance

Joao Marques




Tue, 20 Jul 1999 03:00:00 GMT  
 Help: Need to solve a SECOND DEGREE equation in VB

Quote:

> HI,
> I need to solve a second degree equation in visual basic....something
> like this:
> 12.32*X^2 + 179.24*X - 958.1625 = 0
> and I need the "positive" ( X=4.157 ) solution to be defined in a
> variable
> Im using Visual Basic 4.

How would you solve it if you *didn't* have VB4?

Quote:
> Can anybody help me??

Hmmm. The unmistakable odour of homework, methinks.

Quote:
>  Thanks in advance
> Joao Marques


--

Vox (0|+44)1642 216 200  }*|*{  *o|o*  }o|o{ Zetland Buildings, Exchange Square
Fax (0|+44)1642 216 201    o      o      *   Middlesbrough, Cleveland.  TS1 1DE
--------- "Estimate how many people in the UK can make this estimate" ---------


Tue, 20 Jul 1999 03:00:00 GMT  
 Help: Need to solve a SECOND DEGREE equation in VB

Hello !

Eq :
        aX2+bX+c=0
calculate :
        d=b2-4*a*c
if d<0, there is no real solution.
if d=0, there is only one solution :
        X= -b/(2*a)
if d>0, ther is two real solutions
        X1= (-b+sqrt(d))/(2*a)  (sqrt = square root)
        X2= (-b-sqrt(d))/(2*a)
Then, you just have to choose the one you want.

bye.
                        Sylvain.



Quote:
> HI,
> I need to solve a second degree equation in visual basic....something
> like this:
> 12.32*X^2 + 179.24*X - 958.1625 = 0
> and I need the "positive" ( X=4.157 ) solution to be defined in a
> variable
> Im using Visual Basic 4.
> Can anybody help me??

>  Thanks in advance

> Joao Marques





Tue, 20 Jul 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help: how to solve a SECOND DEGREE equation in VB

2. help in VB coding: solving math equations, or find OCX that's equation solver

3. Need Equation Simplify/Solve

4. How To solve a Cubic equation in VB?

5. Solving the system of linear equations???

6. Solve EQUATIONS in Visual Basic 5

7. solve 3 simultaneous equations

8. Solving equations

9. Solving linear system of equations

10. Looking for library or control that solves linear equation systems

11. Is there an API for solving linear equations?

12. Challenge: Solving for 2 equations

 

 
Powered by phpBB® Forum Software