FIX

Contents


fix gives the truncation of a number.

 

Syntax

   fix(num_exp)

 

Parameters

Element

Description

Restrictions

num_exp

Numeric Expression

-1e80< num_exp <1e80

 

Examples

   Infbox num$(pi)-num$(fix(pi)):   # Displays 3,14... and 3
   X = fix(-pi):                    # X = -3

 

Description and Comments

fix(X) returns X without the digits located after the dot, or period.

The type of result is Integer or Decimal depending on whether the result belongs to the [-2^31, 2^31-1] interval.

 

Associated Errors

Error

Description

ERMODE (10)

The parameter is not numeric.

 

Associated Keywords

INT - AR2 - ARR - INTEGER - MOD


CONTENTS


Copyright © Sage 1999 - 2007