| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
PowComputer_class
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
File: sage/rings/padics/pow_computer.pyx (starting at line 305) Returns self.prime^n. EXAMPLES: sage: P = PowComputer(3, 4, 6) sage: P(3) 27 sage: P(6) 729 sage: P(5) 243 sage: P(7) 2187 sage: P(0) 1 sage: P(-2) 1/9 |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
|
File: sage/rings/padics/pow_computer.pyx (starting at line 231) Returns a string representation of self. EXAMPLES: sage: PC = PowComputer(3, 5, 10); PC PowComputer for 3
|
File: sage/rings/padics/pow_computer.pyx (starting at line 263) Returns the limit to which powers of prime are computed. EXAMPLES: sage: P = PowComputer(3, 5, 10) sage: P._cache_limit() 5 |
File: sage/rings/padics/pow_computer.pyx (starting at line 252) Returns whether or not self is attached to a field. EXAMPLES: sage: P = PowComputer(3, 5, 10) sage: P._in_field() False |
File: sage/rings/padics/pow_computer.pyx (starting at line 148) This function demonstrates a danger in using pow_mpz_t_tmp. EXAMPLES: sage: PC = PowComputer(5, 5, 10) When you cal pow_mpz_t_tmp with an input that is not stored (ie n > self.cache_limit and n != self.prec_cap), it stores the result in self.temp_m and returns a pointer to that mpz_t. So if you try to use the results of two calls at once, things will break. sage: PC._pow_mpz_t_tmp_demo(6, 8) # 244140625 on some architectures and 152587890625 on others: random 244140625 sage: 5^6*5^8 6103515625 sage: 5^6*5^6 244140625 Note that this does not occur if you try a stored value, because the result of one of the calls points to that stored value. sage: PC._pow_mpz_t_tmp_demo(6, 10) 152587890625 sage: 5^6*5^10 152587890625 |
File: sage/rings/padics/pow_computer.pyx (starting at line 183) Tests the pow_Integer function. EXAMPLES: sage: PC = PowComputer(3, 5, 10) sage: PC._pow_mpz_t_tmp_test(4) 81 sage: PC._pow_mpz_t_tmp_test(6) 729 sage: PC._pow_mpz_t_tmp_test(0) 1 sage: PC._pow_mpz_t_tmp_test(10) 59049 sage: PC = PowComputer_ext_maker(3, 5, 10, 20, False, ntl.ZZ_pX([-3,0,1], 3^10), 'big','e',ntl.ZZ_pX([1],3^10)) sage: PC._pow_mpz_t_tmp_test(4) 81 sage: PC._pow_mpz_t_tmp_test(6) 729 sage: PC._pow_mpz_t_tmp_test(0) 1 sage: PC._pow_mpz_t_tmp_test(10) 59049 |
File: sage/rings/padics/pow_computer.pyx (starting at line 215) Tests the pow_mpz_t_top function. EXAMPLES: sage: PC = PowComputer(3, 5, 10) sage: PC._pow_mpz_t_top_test() 59049 sage: PC = PowComputer_ext_maker(3, 5, 10, 20, False, ntl.ZZ_pX([-3,0,1], 3^10), 'big','e',ntl.ZZ_pX([1],3^10)) sage: PC._pow_mpz_t_top_test() 59049 |
File: sage/rings/padics/pow_computer.pyx (starting at line 277) Returns prec_cap, a single value that for which self._prime()^prec_cap is stored EXAMPLES: sage: P = PowComputer(3, 5, 10) sage: P._prec_cap() 10 |
File: sage/rings/padics/pow_computer.pyx (starting at line 241) Returns the base that the PowComputer is exponentiating. EXAMPLES: sage: P = PowComputer(6, 10, 15) sage: P._prime() 6 |
File: sage/rings/padics/pow_computer.pyx (starting at line 291) Returns self._prime()^self._prec_cap() EXAMPLES: sage: P = PowComputer(3, 4, 6) sage: P._top_power() 729 |
File: sage/rings/padics/pow_computer.pyx (starting at line 97) Tests the pow_Integer function. EXAMPLES: sage: PC = PowComputer(3, 5, 10) sage: PC.pow_Integer_Integer(4) 81 sage: PC.pow_Integer_Integer(6) 729 sage: PC.pow_Integer_Integer(0) 1 sage: PC.pow_Integer_Integer(10) 59049 sage: PC = PowComputer_ext_maker(3, 5, 10, 20, False, ntl.ZZ_pX([-3,0,1], 3^10), 'big','e',ntl.ZZ_pX([1],3^10)) sage: PC.pow_Integer_Integer(4) 81 sage: PC.pow_Integer_Integer(6) 729 sage: PC.pow_Integer_Integer(0) 1 sage: PC.pow_Integer_Integer(10) 59049 |
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:55 2008 | http://epydoc.sourceforge.net |