News for hackers. Stuff that matters.
Re:4B If Statements by SkyBelow on Thursday December 28, 2023 @01:21PM (#38796589)
Given the lack of integers and my hesitancy to trust modulo for non-integer variables, I don't know if I would trust it. You would need to add some safety checks, but either you create an is_even/is_odd function that has safety checks, or you have to rely on developers adding in the checks anytime the number might have been in close proximity to a floating point number.

Something as simple as this can end up being neither even or odd.

    (0.1 + 0.2) * 10

There are no comments on this comment yet.