Ticket #7052 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Divide allows division by 0

Reported by: Roman Tolchenov Owned by: Mathieu Doucet
Priority: major Milestone: Release 2.6
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Peter Peterson

Description (last modified by Nick Draper) (diff)

Should it give a warning?

If the input workspace is a single value and 0. Then the algorithm should fail with a sensible warning.

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner set to Anyone
  • Description modified (diff)

comment:2 Changed 7 years ago by Mathieu Doucet

  • Owner changed from Anyone to Mathieu Doucet
  • Status changed from assigned to accepted

comment:3 Changed 7 years ago by Mathieu Doucet

Re #7052 Add warning when dividing by zero

Changeset: ba2a82faf995e07abc4ac88540525ef628d8ed82

comment:4 Changed 7 years ago by Mathieu Doucet

To test:

Test 1:

  • Load a matrix workspace (not an event workspace)
  • zero=CreateSingleValuedWorkspace(DataValue=0, ErrorValue=0)
  • test_output=mtd['your_workspace'] / mtd['zero']
  • A warning should appear in the log

Test 2:

  • Load an event workspace
  • zero=CreateSingleValuedWorkspace(DataValue=0, ErrorValue=0)
  • test_output=mtd['your_workspace'] / mtd['zero']
  • An errorshould appear in the log. This was the original behavior, which should not change.

comment:5 Changed 7 years ago by Mathieu Doucet

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:6 Changed 7 years ago by Peter Peterson

  • Status changed from verify to verifying
  • Tester set to Peter Peterson

comment:7 Changed 7 years ago by Peter Peterson

  • Status changed from verifying to closed

comment:8 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:9 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7898

Note: See TracTickets for help on using tickets.