Skip to content

[css-values] Behavior of NaN in pow()/hypot() #4161

Closed
@tabatkins

Description

@tabatkins

While fixing #4158, I stumbled across the fact that Math.hypot(Infinity, NaN) yields Infinity, and Math.pow(NaN, 0) yields 1 (both in spec and impl). These are the only two cases in the math functions I could find where NaN wasn't "infectious".

Do we want to carry this behavior along to CSS? Should we specify that NaN is specially handled in these functions? Or perhaps officially undefine it, allowing either "infectious" or "JS" behavior as valid?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions