|
-
June 17th, 2005, 04:04 AM
#1
My first day of summer project.
So... today was my first day of summer vacation, as I had my last exam Wednesday afternoon.
So, last evening, there I was, sitting there, realizing I didn't have any homework to do, and no one to do anything with (some of my friends still had exams they were studying for), so I decided I'd start a mini-project to get up to speed on my PHP, before I started a summer PHP project for Unerror.
So, I decided (for some reason) that I would code a quadratic calculator (originally that would just give the roots of the equation, now it does much more). For example:
Your a value: 32
Your b value: 64
Your c value: 54354
General form: 32x^2+64x+54354
This graph has a minimum
Domain: {x|xER}
Range: {y|y>=54322,yER}
Your discriminant is 6953216i^2, therefore, your roots will be complex roots.
Your vertex would be at (-1,54322)
The y-intercept would be: 54354
Your roots would be x=-64+sqrt(6953216)i/64 and x=-64-sqrt(6953216)i/64
You can enter your information in different forms, ax^2+bx+c=0, a(x-h)^2+k=0, or a(x-h)(x-j)+k=0.
The graphing is done by JpGraph (which is a very nice product), but may have some bugs with very large, or very small numbers.
You can find the calculator at:
http://www.unerror.com/~enmand/php/quadratic.php
Along with the souces at:
http://www.unerror.com/~enmand/php/quadratic.phps
http://www.unerror.com/~enmand/php/quadratic2.phps
http://www.unerror.com/~enmand/php/quadratic3.phps
http://www.unerror.com/~enmand/php/quadratic4.phps
Let me know if you find any bugs... any suggestions on a next project?
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
|
|