what is sgn?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A discusion group entry on 4/20 contained the following formula:

q = -(b + sgn(b)*sqrt(b^2-4a*c))*0.5

in relation to the quadratic function.
What is sgn? Does it appear in Excel 2000?
Thanks everyone.
CJ
 
Hi CJ,

sgn is a VB math method that returns -1,0 or 1.
sgn(b) = -1 if b<0, 0 if b=0 and 1 if b>0.

I'm pretty sure it would be in all versions of Excel

The Worksheet function equivalent is called SIGN.

Ken Johnson
 
Thank you, SIGN is: "Determines the sign of a number. Returns 1 if the
number is positive, zero (0) if the number is 0, and -1 if the number is
negative." quoted from Excel 2000.

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top