Skip to content

[css-values-4] Nit: comparing -0 and +0 in min() and max() #9631

@cdoublev

Description

@cdoublev

1 / max(-1 * 0, 1 * 0) results to -infinity in Chrome/FF. Similarly, 1 / min(1 * 0, -1 * 0) results to infinity.

They do not consider -0 < 0 to be true, like in the JS comparison, and returns the first argument. But in JS, 1 / Math.max(-1 * 0, 1 * 0) results to Infinity and 1 / Math.min(1 * 0, -1 * 0) results to -Infinity.

There is no related WPT test. Can you please tell me what is the expected result?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.css-values-4Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions