stdlib-js / stdlib-js/stdlib

Why is `0.0 / 0.0` preferred over using NaN

未关闭
#11,028 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Question
主要语言
JavaScript
星标
6k
派生
1.3k
平均合并
1 天 3 小时
30 天内合并 PR
611

描述

### Description

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

Why do we prefer returning `0.0 / 0.0` instead of `NAN` from ``?

Example:

https://github.com/stdlib-js/stdlib/blob/a1f8442b4ed11aceb97c2b5e6e7e8fdc18d8317b/lib/node_modules/%40stdlib/stats/base/dists/negative-binomial/skewness/src/main.c#L42

### Related Issues

_No response_

### Questions

No.

### Demo

_No response_

### Reproduction

```shell

```

### Expected Results

```shell

```

### Actual Results

```shell

```

### Version

_No response_

### Environments

Node.js

### Browser Version

_No response_

### Node.js / npm Version

_No response_

### Platform

_No response_

### Checklist

- [x] Read and understood the [Code of Conduct](https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md).
- [x] Searched for existing issues and pull requests.

贡献指南

打开贡献指南

调研方向

Start with the cited lib/node_modules/@stdlib/stats/base/dists/negative-binomial/skewness/src/main.c line and inspect how native add-ons are compiled with MSVC. Search the repository for similar uses of 0.0 / 0.0 and NAN, then reproduce the reported compilation issue; done means the portability rationale and any required follow-up are documented.

由索引模型根据 Issue 内容生成。

评估

技术栈
c, javascript, node.js
领域
build-system
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
需要澄清
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。