Skip to content

Correct restrictions on arithmetic conversions in GeneralMaths #2128

Closed

Description

@CoePaul

Background

Owing to original misunderstanding of the nature of the StrictFloat type hint,
many of the conversion functions inside general_maths take only StrictFloats and will reject integers.

This was never the intended signature - it was incorrectly assumed that integers would be included
automatically - ( since $\mathbb{Z}$ is a subset of $\mathbb{R}$ in maths )

Task
a) Find over restrictions of StrictFloat and widen to StrictFloat|StrictInt
b) where necessary update tests to check that integers are not rejected

Acceptance Criteria

  • that all conversion functions are tested against appropriate integer input in updated unit tests
  • that all modified and all (ostensibly) unrelated tests pass

Activity

  1. self-assigned this
    on Jul 21, 2026
  2. added theissue type on Jul 21, 2026
  3. CoePaul commented on Jul 21, 2026

    @CoePaul
    ContributorAuthor

    Oh apparently integers are permitted by StrictFloat after all

    • in which case the commit here in related PR 2129 merely enhances the unit tests a bit
  4. CoePaul commented on Jul 21, 2026

    @CoePaul
    ContributorAuthor

    Closing as redundant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions