Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.12 KB

README.md

File metadata and controls

56 lines (36 loc) · 1.12 KB

Java Bhaskara

Example Application: bhaskara

equation

Calculate Delta

delta

Double delta = 0.0;
delta = (Math.pow(b, 2)) - 4 * (a) * (c);

Calculate X

x

Calculate x'

x'

Double x1 = 0.0;
x1 = (((b) * -1) + Math.sqrt(delta) / (2 * a);

Calculate x''

x''

Double x2 = 0.0;
x2 = (((b) * -1) - Math.sqrt(delta) / (2 * a);

Check real roots

if (Double.isNaN(x1)) {
	//TODO					
}

Some links for more in depth learning