Skip to content

Overflow error due to pointless type cast #2

@h3ssto

Description

@h3ssto

KUS/KUS.py

Line 142 in 0dfba46

p = (1.0*z0)/(z0+z1)

This type conversion to float will cause an Overflow Error when z0 is too large. As Python does floating point division by default, this cast is unnecessary. Replacing the line by p = z0 / (z0+z1) solves the problem. Optionally, one could invert the division to remove the need to divide by z0+z1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions