Home Online Manual
Top
Back: aksaka_lib
Forward: log2
FastBack:
FastForward:
Up: aksaka_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.12.1.1 fastExpt

Procedure from library aksaka.lib (see aksaka_lib).

Usage:
fastExpt(a,m,n); a, m, n = number;

Return:
the m-th power of a; if a^m>n the procedure returns n+1

Note:
uses fast exponentiation

Example:
 
LIB "aksaka.lib";
fastExpt(2,10,1022);
==> 1023