DOCUMENTATION CalcMe
  • language Translations of this page
    • Translations of this page
    • Català (ca)
    • Dansk (da)
    • Deutsch (de)
    • English (en)
    • Español (es)
    • Français (fr)

  1. Wiris Ecosystem Documentation
  2. CalcMe documentation
  3. Commands
  4. Arithmetic
  5. Sign

en:calc:commands:arithmetic:sign

Sign

Working with permutations? See sign (permutations)


Returns the sign of a number.

Syntax

sign(Real)
sign(Complex)

Description

sign(Real)

Given a real number x, returns its sign: text sign end text left parenthesis x right parenthesis equals open curly brackets table attributes columnalign left end attributes row cell 0 comma space text if  end text space x equals 0 end cell row cell 1 comma space text if  end text space x greater than 0 end cell row cell negative 1 comma space text if  end text space x less than 0 end cell end table close

sign(Complex)

Given a complex number z, returns text sign end text left parenthesis z right parenthesis space equals space open curly brackets table attributes columnalign left end attributes row cell 0 comma space text if   end text z equals 0 end cell row cell fraction numerator z over denominator open double vertical bar z close double vertical bar end fraction comma space text if  end text space z not equal to 0 end cell end table close

Related functions

Sign0, Negative?, Positive?

Table of Contents
  • Syntax
  • Description
  • Related functions
Log In

Copyright © WIRIS 2021. All rights reserved.