Opened 8 years ago

Closed 8 years ago

#13786 closed defect (fixed)

Fix remaining instances of ArithmeticError: 0^0 is undefined

Reported by: mjo Owned by: AlexGhitza
Priority: major Milestone: sage-5.8
Component: algebra Keywords:
Cc: kcrisman Merged in: sage-5.8.beta2
Authors: Michael Orlitzky Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by mjo)

Some of these were fixed in #10772, but a few remain. Find/grep show,

  • ./rings/padics/padic_capped_relative_element.pyx
  • ./rings/padics/padic_fixed_mod_element.pyx
  • ./rings/padics/padic_ZZ_pX_CR_element.pyx
  • ./rings/padics/padic_ZZ_pX_FM_element.pyx

Unless any of these are special (for whatever reason), we should return 1 instead from the appropriate ring.

See also: #13894, #13895, #13897, #13941.

Attachments (1)

sage-trac_13786.patch (6.9 KB) - added by mjo 8 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 Changed 8 years ago by kcrisman

  • Cc kcrisman added

comment:2 Changed 8 years ago by mjo

  • Description modified (diff)

comment:3 Changed 8 years ago by mjo

  • Description modified (diff)

comment:4 Changed 8 years ago by mjo

  • Description modified (diff)

comment:5 Changed 8 years ago by mjo

  • Dependencies set to #13940

comment:6 Changed 8 years ago by mjo

  • Description modified (diff)

comment:7 Changed 8 years ago by mjo

  • Dependencies changed from #13940 to #13894, #13895, #13897, #13940, #13941

comment:8 Changed 8 years ago by tscrim

Just a general statement on the documentation in these patches. I'd prefer to see the 0^0 formatted either in latex `0^0` (which would display as 00) or as a code literal ``0^0``.

Thanks,
Travis

comment:9 Changed 8 years ago by mjo

I finally added double backticks to the other patches. While those functions aren't in the reference manual, they should and hopefully someday will be.

comment:10 Changed 8 years ago by tscrim

Thank you. It suppose to make the docreader (which may only really be me) understand that it is suppose to be code/input.

Also, for the remaining ones in the padics, could you just put them all in one patch (possibly on this ticket)?

Thanks,
Travis

Changed 8 years ago by mjo

comment:11 follow-up: Changed 8 years ago by mjo

  • Description modified (diff)
  • Status changed from new to needs_review

Patch is up. I had split them initially to make it easier for (potentially) multiple reviewers. Thanks for taking a look at all of them.

I've removed ntl_lzz_p.pyx from the list per #13940. This patch should take care of the remaining four.

comment:12 Changed 8 years ago by mjo

  • Authors set to Michael Orlitzky

comment:13 Changed 8 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

Looks good to me. Thank you.

Travis

comment:14 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.8 to sage-pending

comment:15 in reply to: ↑ 11 Changed 8 years ago by tscrim

Replying to mjo:

I've removed ntl_lzz_p.pyx from the list per #13940. This patch should take care of the remaining four.

Does this depend on #13940 anymore?

comment:16 Changed 8 years ago by mjo

  • Dependencies #13894, #13895, #13897, #13940, #13941 deleted
  • Description modified (diff)

No, good catch. I've removed all of the dependencies; no need to confuse things. This patch can be merged without any of those. If an archaeologist is curious, he can check the description diff.

comment:17 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-pending to sage-5.8

comment:18 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.8.beta2
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.