File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2959,6 +2959,14 @@ cdef class pAdicGenericElement(LocalGenericElement):
29592959 sage: x. exp( algorithm='generic') # indirect doctest # needs sage. libs. ntl
29602960 1 + w* 7 + ( 4* w + 2) * 7^ 2 + ( w + 6) * 7^ 3 + 5* 7^ 4 + O( 7^ 5)
29612961
2962+ TESTS::
2963+
2964+ Verify that :trac:`38037` is fixed::
2965+
2966+ sage: R. <a> = Zq( 9)
2967+ sage: exp( R. zero( ))
2968+ 1 + O( 3^ 20)
2969+
29622970 AUTHORS:
29632971
29642972 - Genya Zaytman ( 2007-02-15)
@@ -2973,6 +2981,8 @@ cdef class pAdicGenericElement(LocalGenericElement):
29732981 R=self. parent( )
29742982 p=self. parent( ) . prime( )
29752983 e=self. parent( ) . absolute_e( )
2984+ if self. _is_exact_zero( ) :
2985+ return R. one( )
29762986 x_unit=self. unit_part( )
29772987 p_unit=R( p) . unit_part( ) . lift_to_precision( )
29782988 x_val=self. valuation( )
You can’t perform that action at this time.
0 commit comments