Skip to content

NaN? #11

Description

@jamesdbrock

-- | Uses `Math.fround()` to convert to a `Float32`.
-- | Returns *0.0* when outside the range.
fromNumber' :: Number -> Float32
fromNumber' x = case fromNumber x of
Nothing -> Float32 0.0
Just y -> y

Is NaN a member of the Float32 type?

Maybe this should overflow to NaN rather than 0.0?

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