YCRE Header
 

Quadratic Equation Solver

Description: This script will factor and solve for both values of X, any quadratic equation that has real number solutions.

/* This script and many more are available free online at The JavaScript Source :: http://javascript.internet.com Created by: Ben Kanaev :: http://www.webhostreview.biz */ var a,b,c,x1,x2; function getValues() { signB = (document.form.firstSign.value == "+") ? 1 : -1; signC = (document.form.secondSign.value == "+") ? 1 : -1; a = document.form.x2Coef.value; b = document.form.xCoef.value * signB; c = document.form.endValue.value * signC; } function solveForX() { x1 = ((-1*b) + Math.sqrt((b*b) - 4*a*c))/ (2*a); x2 = ((-1*b) - Math.sqrt((b*b) - 4*a*c))/ (2*a); if(document.form.round.checked){ x1 = Math.round(x1*1000)/1000; x2 = Math.round(x2*1000)/1000; } } function factorEq() { if( (Boolean(x1) != false) && (Boolean(x2) != false)) { x1Print = ((x1 * -1) > 0) ? "+" + (x1*-1) : x1 * -1; x2Print = ((x2 * -1) > 0) ? "+" + (x2*-1) : x2 * -1; aPrint = (a > 1 || a < 0) ? a : ""; document.getElementById('testing').innerHTML = "The Solutions Are:
x1 = " + x1 + "; x2 = " + x2 + "
The Equation Is:
" + aPrint + "(x " + x1Print + ") (x " + x2Print + ")"; } else { document.getElementById('testing').innerHTML = "YOUR INPUT PRODUCED AN ERROR:
You have entered a non-integer into one of the fields above, or the solution(s) for your equation is(are) an imaginary(s) number!"; } } function SolveEq() { getValues(); solveForX(); factorEq(); }

X2 X
Round to the nearest thousandths?Yes

The Solution Will Appear Here!

Free JavaScripts provided
by The JavaScript Source

 

Gaudiya-Vaishnavism 

My Response to:
"The Final Order"

Introduction to:
Gaudiya Vaishnavism

16 Rounds of
Chanting

Krishna
Concentration
Game (Try it!)

Introduction to: Yoga

Educational 

Introduction to:
Human Ventilation 

Learn Spanish


eBook Readers
for Handhelds

(Free Downloads)

Mobi download
MS download
Palm (EN) download
Palm (ES) download
iSilo download
Adobe download


eBook Related 

YCRE Web Design
e-Teacher Videos
Web Instruction

My Affiliate Connections
Email Marketing
ClickBank
CPA Warehouse
Digital Storage
ebook Generator
ebook friend
ebook Secrets
e-Gold
EZ-Articles
Hosting Service
Link Cloaker
Online Charge Cards
Online Data Backup
Open Directory Project
Party Poker
PayDotCom
PayPal
Sales Letter Generator
Stuff You Can Use
Traffic Generator
Web Graphics
Web Law
Free IQ - Idea Exchange
Directory Planet
SurveyPopups.com
Liquidebooks.com
Affiliate Resale


Informational

Wikipedia
Webopedia

SEOMOZ
Great Sales Advice
Giveawayoftheday.com


    Social    
Bookmarking

Technorati
Digg
Squidoo
PRWeb
Tagged


Key Words:

free ebook
digital ebook
download ebook
free ebook reader
ebook resale rights
ebook from mobipocket
ebook software
ebook pdf
cheap digital ebooks
ebook free online
selling ebooks

ebook publishing
ebook gratis
create ebook
ebook resale
ebook microsoft reader
ebook harry potter
ebook free palm
buy ebooks
ebook internet marketing
ebook articles


 

Locations of visitors to this page

Suffering from PTSD?

Heavy Safe for Sale

Free Online Poll

FREE eBOOKs
Click on:
597 Ready to Use Sales Letters and Business Forms
597 - ebook cover
 
or
 
306 Web Design Templates
ebook: 306 Web Design Templates


Google Groups
BuckWheat's Bugle
Visit this group


"You Can Read Ebooks"
Favors:

ebook to PayPal

Make me happy!