1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

help in ALP

Discussion in 'Assembly Language Programming (ALP) Forum' started by jolly, Aug 1, 2008.

  1. jolly

    jolly New Member

    Joined:
    Aug 1, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    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.
     

Share This Page