Bug #178
IsHomog: should it throw an error when there is no grading?
Status:
Closed
Priority:
Normal
Assignee:
Category:
Safety
Target version:
Description
Here is a piece of code from CoCoA-5
/**/ Use QQ[x,y], Lex; /**/ IsHomog(x-1); true
It is correct because GradingDim = 0, but a naive user might think in terms of standard grading.
An expert user instead should not even ask that question (like gcd in a field)
I think it should throw an error. Comments?
12 feb 2013: now throws an error
Related issues
History
#1 Updated by John Abbott almost 12 years ago
Yes, I think throwing an error is best(=safest) in this case. Same applies to any other "homog" function.
2013-02-11 Also JAA cannot think of any plausible situation when it is genuinely useful to have a grading over ZZ^0.
JAA wonders whether we should make a catalogue of cases where we choose to throw an error even though there is a well-defined mathematical result. If we should make one, what form should it have?
#2 Updated by Anna Maria Bigatti almost 12 years ago
- Subject changed from IsHomog: should it trhow an error when there is no grading? to IsHomog: should it throw an error when there is no grading?
#3 Updated by Anna Maria Bigatti about 11 years ago
- Status changed from New to Feedback
- Assignee set to Anna Maria Bigatti
- Target version set to CoCoALib-0.9953
#4 Updated by Anna Maria Bigatti about 11 years ago
- % Done changed from 0 to 90
#5 Updated by John Abbott about 11 years ago
ex-PolyRing1 with debugging active fails:
***ERROR*** UNCAUGHT CoCoA error *************************************************************************** ****CoCoA ERROR**** ErrCode: CoCoA::ERR::ZeroGradingDim ****CoCoA ERROR**** Message: GradingDim (grading dimension) is 0 ****CoCoA ERROR**** Context: IsHomog(RingElem) ****CoCoA ERROR**** File: SparsePolyRing.C ****CoCoA ERROR**** Line: 936 ***************************************************************************
#6 Updated by Anna Maria Bigatti over 10 years ago
- Status changed from Feedback to Closed