Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   help in ALP (http://www.go4expert.com/forums/help-in-alp-t12617/)

jolly 1Aug2008 10:57

help in ALP
i need an 8085 ALP to find the roots of a quadratic equation and to find exponent of a number(upto 10^10) pls help.

xpi0t0s 11Aug2008 14:23

Re: help in ALP
Roots of a quadratic can be found with the equation (-b +/- sqrt(b^2-4ac))/2a
where a,b and c are the constants in ax^2+bx+c=0.

sqrt() functions may barf on negative numbers (or incorrectly/misleadingly ignore the sign) so check b^2 >= 4ac; if it isn't then the roots are imaginary, e.g. x^2+1=0 has no real solution; the solutions are +i and -i.

All times are GMT +5.5. The time now is 22:06.