Project

General

Profile

Feature #269

PPMonoids: check for exponent overflow in power function

Added by John Abbott over 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Safety
Target version:
Start date:
18 Oct 2012
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

A cheap safety check for exponent overflow would be simply to conduct the check in the power functions for PPMonoids. This should detect cases where an input contains exponents which exceed the implementation's limit.

We have already decided that checking each product is too costly (except in DEBUG mode). JAA suspects that the power functions are called relatively rarely, so adding the check to them should incur no perceptible run-time cost, yet would help detect oversize input.

What do you think?


Related issues

Related to CoCoALib - Design #268: Exponent range (in power products)Closed2012-10-18

Related to CoCoALib - Slug #679: power for PPs is too slowClosed2015-04-13

Related to CoCoA-5 - Bug #275: Unhelpful error messages when SmallExponent_t is unsigned char.Closed2012-11-15

Related to CoCoALib - Design #683: Module index component in internal compressed representationClosed2015-04-14

History

#1 Updated by Anna Maria Bigatti over 11 years ago

Suggestion:
We need a function sounding like "myIsTooBigForExponent(EXP)" to be called before

    owner(pp)->myPower(raw(ans), raw(pp), EXP);

#2 Updated by Anna Maria Bigatti over 11 years ago

  • Target version set to CoCoALib-0.9953

#3 Updated by John Abbott about 11 years ago

  • Status changed from New to In Progress
  • Assignee set to John Abbott
  • % Done changed from 0 to 50

I have modified the powering mem fns for PPMonoidEvImpl and PPMonoidEvOvImpl (the Ev half).
I have also made a similar change to OrdvArith::base::myPower; this covers half of PPMonoidEvOv and all of PPMonoidOv.

A couple of simple tests showed that the checks are working.

#4 Updated by John Abbott about 11 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 50 to 90

Some casual tests were passed without problem; so I have checked in everything.
Changing status to feedback.

#5 Updated by Anna Maria Bigatti about 11 years ago

All tests pass on my machine.

#6 Updated by John Abbott almost 11 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

This issue has been in feedback for about 2 months; no problems have surfaced, so I'm closing the issue.

Also available in: Atom PDF