HP 40g hp 39g+ (39g & 40g)_mastering the hp 39g+_English_E_F2224-90010.pdf - Page 256
LINEAR?, QUAD, The main use for this is going to be when a programmer does not know
View all HP 40g manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 256 highlights
LINEAR?(expression,var.name) This is another of those functions which is probably aimed more at the programmer than at the normal user. It is designed to test whether a supplied expression is linear or non-linear in the variable you specify, returning zero for non-linear and 1 for linear. Eg. Suppose we use the expression AX 2 − B + 4 If X is the variable and A and B are both constants (say A=4, B=5) then the expression AX 2 − B + 4 would become 4X 2 − 5 + 4 which would be non-linear. Thus LINEAR? returns zero (right). On the other hand, if X were one of the constants (say X=6) and A were the variable, then the expression AX 2 − B + 4 would become A× 62 − 5 + 4 or 36A −1 , which is linear. Thus LINEAR? would return 1. The main use for this is going to be when a programmer does not know in advance what function the user is going to type in. QUAD(expression,var.name) This function uses the quadratic formula x = −b ± b2 − 4ac to give both roots of a 2a quadratic, using the 'S1' formal variable to represent the ± symbol. The quadratic is entered as an expression, and you must indicate which variable is being solved for, since you could have an equation such as Px2 + Qx − 5 = 0 where P and Q were memory values, and you would need to specify to solve for X. 256