amber-lang / amber-lang/amber

[Feature] Proposal for Comprehensive Mathematical Module in Amber

未關閉
#451 3 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement hacktoberfest
主要語言
Rust
星號
5.2k
分支
145
平均合併
5 天 3 小時
30 天內合併 PR
7

描述

We could start with a mininal version of such library and then we could extend it with other functions. Some of the most important ones could be the following:

### Rounding

- [x] `ceil(x: Num): Num` - rounds up to the nearest integer
- [x] `floor(x: Num): Num` - rounds down to the nearest
- [x] `round(x: Num): Num` - rounds to the nearest integer

### Absolute and sign

- [x] `abs(x: Num): Num` - absolute value
- [ ] `sign(x: Num): Num` - sign function, returns -1, 0, or 1 depending on the sign of x

### Min / Max
- [ ] `min(a: Num, b: Num): Num`
- [ ] `max(a: Num, b: Num): Num`

### Optional: Power, root, exponential, logarithms and trigonometric

> These can be easily evaluated using `bc` with flag `-l`

- [ ] `pow(base: Num, exponent: Num): Num` - power function
- [ ] `sqrt(x: Num): Num` - square root
- [ ] `exp(x: Num): Num` - exponential function
- [ ] `log(x: Num): Num` - natural logarithm
- [ ] `log10(x: Num): Num` - base-10 logarithm
- [ ] `sin(x: Num): Num` - sine
- [ ] `cos(x: Num): Num` - cosine
- [ ] `tan(x: Num): Num` - tangent

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。