Skip to content

optimizer: Disable identity optimizations (==, <=, >=) for floating-point NaN values #98

Description

@MohamedGonem

Identity folding (x == x, x <= x, x >= x -> true) is currently applied without verifying expression types. Under IEEE 754, comparisons involving NaN evaluate to false.

Add type checks in simplify_bool.go to prevent identity folding on floating-point operands.

Files: internal/optimizer/simplify_bool.go (lines 67, 90)

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