Skip to content

Why is 0.0 / 0.0 preferred over using NaN #11028

@dhruvan2006

Description

@dhruvan2006

Description

Encountered an error when compiling native add-ons with MSVC.

Why do we prefer returning 0.0 / 0.0 instead of NAN from <math.h>?

Example:

Related Issues

No response

Questions

No.

Demo

No response

Reproduction

Expected Results

Actual Results

Version

No response

Environments

Node.js

Browser Version

No response

Node.js / npm Version

No response

Platform

No response

Checklist

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionGeneral question.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions