[BUG]: quantile function of Beta distribution fails in production build with Next.js
- 主要语言
- JavaScript
- 星标
- 6k
- 派生
- 1.3k
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 611
描述
### Description
I have an application written in Next.js and some code that uses `beta` distribution from `'@stdlib/stats-base-dists/dist'`. I noticed that the `quantile` function is completely broken while building the application in production mode (`next build && next start`). For example the output in Chrome console:
```js
> dist = new window.beta_test.Beta(5, 5) // I did an ugly hack window.beta_test = beta in the code
w {}
> dist.quantile(0.1)
0.9999999996744877
> dist.quantile(0.5)
4.6663115970492885e-302
```
The quantile function works as expected if I run the application in the development mode (`next dev`)
```js
> dist = new window.beta_test.Beta(5, 5)
t {}
> dist.quantile(0.1)
0.30096876359321467
> dist.quantile(0.5)
0.5
```
I'm not sure if this is the case with other distributions
### Related Issues
Related issues # , # , and # .
### Questions
No.
### Demo
_No response_
### Reproduction
- a
- b
- c
### Expected Results
_No response_
### Actual Results
_No response_
### Version
0.2.2
### Environments
Chrome
### Browser Version
129.0.6668.91
### Node.js / npm Version
_No response_
### Platform
MacOS
### 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 @stdlib/stats-base-dists/dist Beta entry point and reproduce the reported quantile calls under next dev versus next build && next start. Trace the production bundle behavior around Beta.quantile and compare it with development behavior. Done means quantile returns the expected values in a production Next.js build, with regression coverage if the relevant test location is identified.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, next.js
- 领域
- build-system
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100