Top
Back: bigint declarations
Forward: bigint operations
FastBack: cring
FastForward: bigintmat
Up: bigint
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.2.2 bigint expressions

A bigint expression is:

  1. an identifier of type bigint
  2. a function returning bigint
  3. an expression involving bigints and the arithmetic operations +, -, *, div, % (mod), or ^
  4. a type cast to bigint.


Example:
 
// Note: 11*13*17*100*200*2000*503*1111*222222
// returns a machine integer:
11*13*17*100*200*2000*503*1111*222222;
==> // ** int overflow(*), result may be wrong
==> -6869239595516308480
// using the type cast number for a greater allowed range
bigint(11)*13*17*100*200*2000*503*1111*222222;
==> 12075748128684240000000

See Type conversion and casting; int; number.


Top Back: bigint declarations Forward: bigint operations FastBack: cring FastForward: bigintmat Up: bigint Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.1, 2022, generated by texi2html.