You didn't say who could play.Steve D said:I did hear about a job where a square root needed to be extracted from a PLC that only had 4 functions ( add subtract muliply and divide ).....I would have to dust off my 6th grade math book to accomplish that I am afraid....we are spoiled. Do I have any takers on that algorithm?
Guess(n+1) = (Guess(n)^2+Number)/2*Guess(n)
LDA B ; LOAD NUMBER BEING SUBTRACTED.
CMA,INA ; COMPLEMENT AND INCREMENT REGISTER A
ADDA A ; ADD THE NUMBER BEING SUBTRACTED FROM
STA C ; C = A - B