Your most advanced math snippets
Posted: Sat Feb 25, 2012 2:21 pm
Hey! I'm creating a calculator that can do certain math operations, like solve a quadratic formula (ax^2+bx+c=0). Now, I created a function that could do this, but i want to give the application a little more meat on its bones. I'm imagining a tool that can solve most equations, reduce fractions and all of that stuff, and if it for some reason should fail to do so, ther could be a "search engine" that would run the equation through computional engines like wolframalpha and quickmath. Also, there could be a chatroom involved for chatting with other users of the application. Now, is this acctually doable in VB2010?
TLDR I want a pseudo intellegent program in VB2010 that can solve equations and algebra generally
So yeah, lets post our snippets for doing this stuff! I'll give you what i have
TLDR I want a pseudo intellegent program in VB2010 that can solve equations and algebra generally
So yeah, lets post our snippets for doing this stuff! I'll give you what i have
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
On Error Resume Next
Dim a, b, c, x1, x2 As Single
a = TextBox1.Text
b = TextBox2.Text
c = TextBox3.Text
x1 = (-b + Math.Sqrt(b ^ 2 - 4 * a * c)) / (2 * a)
x2 = (-b - Math.Sqrt(b ^ 2 - 4 * a * c)) / (2 * a)
TextBox4.Text = x1
TextBox5.Text = x2
End Sub