sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 481 forks source link

Power series exp fails uninformatively when base ring has nonzero characteristic #11889

Open 11d1fc49-71a1-44e1-869f-76be013245a0 opened 13 years ago

11d1fc49-71a1-44e1-869f-76be013245a0 commented 13 years ago
sage: R.<x> = GF(2)[[]]
sage: f = x + x^2 + O(x^5)
sage: exp(f)
---------------------------------------------------------------------------
ZeroDivisionError                         Traceback (most recent call last)

/home/masiao/<ipython console> in <module>()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/functions/log.pyc in __call__(self, x, coerce, hold, prec, dont_call_method_on_arg)
    128             return x.n(prec)
    129         return GinacFunction.__call__(self, x, coerce=coerce, hold=hold,
--> 130                 dont_call_method_on_arg=dont_call_method_on_arg)
    131 
    132 exp = Function_exp()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/symbolic/function.so in sage.symbolic.function.GinacFunction.__call__ (sage/symbolic/function.cpp:6652)()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/rings/power_series_ring_element.so in sage.rings.power_series_ring_element.PowerSeries.exp (sage/rings/power_series_ring_element.c:11024)()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/rings/power_series_ring_element.so in sage.rings.power_series_ring_element.PowerSeries.solve_linear_de (sage/rings/power_series_ring_element.c:10857)()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/rings/power_series_ring_element.so in sage.rings.power_series_ring_element._solve_linear_de (sage/rings/power_series_ring_element.c:12441)()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/rings/power_series_ring_element.so in sage.rings.power_series_ring_element._solve_linear_de (sage/rings/power_series_ring_element.c:12656)()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/rings/power_series_ring_element.so in sage.rings.power_series_ring_element._solve_linear_de (sage/rings/power_series_ring_element.c:12379)()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/structure/element.so in sage.structure.element.RingElement.__div__ (sage/structure/element.c:12803)()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/structure/coerce.so in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:6436)()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/structure/element.so in sage.structure.element.RingElement.__div__ (sage/structure/element.c:12777)()

/usr/local/sage/sage-4.7.1/local/lib/python2.6/site-packages/sage/rings/finite_rings/integer_mod.so in sage.rings.finite_rings.integer_mod.IntegerMod_int._div_ (sage/rings/finite_rings/integer_mod.c:19299)()

ZeroDivisionError: Inverse does not exist.

There's no way of making this work in a mathematically meaningful way, but it could certainly be made to fail a bit more gracefully!

Component: algebra

Branch: u/gh-belleb/power_series_exp_fails_uninformatively_when_base_ring_has_nonzero_characteristic

Issue created by migration from https://trac.sagemath.org/ticket/11889

7c779cbb-ea1e-4980-bb86-3f83d0a23347 commented 5 years ago

Branch: u/gh-belleb/power_series_exp_fails_uninformatively_when_base_ring_has_nonzero_characteristic