Opened 2 years ago

Closed 23 months ago

#31374 closed defect (fixed)

Fix an if statement that is never called in normal_form

Reported by: sbrandhorst Owned by:
Priority: minor Milestone: sage-9.3
Component: quadratic forms Keywords:
Cc: Merged in:
Authors: Simon Brandhorst Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 7d304d6 (Commits, GitHub, GitLab) Commit: 7d304d69f42b7ae930f8c91ab298e52427f0c24d
Dependencies: Stopgaps:

Status badges


In line 1483 in sage.quadratic_forms.genera.normal_form we have

        b = [[0,5], [2,7], [1,2], [0,3], [0,1,5], [1,2,7], [0,3,7], [0,1,3]]
        if x in b:
            w = W[-1]
            if x == [3,7]:
                w = W[0]

The second if statement is never true due to a typo. It should be x == [0,3,7]. Actually the bug is cleaned up later so the output should be correct anyways.

Change History (8)

comment:1 Changed 2 years ago by sbrandhorst

Branch: u/sbrandhorst/fix_an_if_statement_that_is_never_called_in_normal_form

comment:2 Changed 2 years ago by sbrandhorst

Commit: 89467edba8a1dac0dd5192f1e78f13241daef5fb
Status: newneeds_review

New commits:

89467edclean up an if statement that is never called

comment:3 Changed 2 years ago by chapoton

Status: needs_reviewpositive_review

ok, let it be

comment:4 Changed 2 years ago by vbraun

Status: positive_reviewneeds_work

Reviewer name is missing

Last edited 2 years ago by vbraun (previous) (diff)

comment:5 Changed 23 months ago by git

Commit: 89467edba8a1dac0dd5192f1e78f13241daef5fb7d304d69f42b7ae930f8c91ab298e52427f0c24d

Branch pushed to git repo; I updated commit sha1. New commits:

7d304d6Merge branch 'develop' into t/31374/fix_an_if_statement_that_is_never_called_in_normal_form

comment:6 Changed 23 months ago by sbrandhorst

Status: needs_workneeds_review

Please add your name :-)

comment:7 Changed 23 months ago by chapoton

Reviewers: Frédéric Chapoton
Status: needs_reviewpositive_review

comment:8 Changed 23 months ago by vbraun

Branch: u/sbrandhorst/fix_an_if_statement_that_is_never_called_in_normal_form7d304d69f42b7ae930f8c91ab298e52427f0c24d
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.