1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

math: cbrt fix (#14395)

This commit is contained in:
David 'Epper' Marshall
2022-05-14 14:06:38 -04:00
committed by GitHub
parent 67963e0ff2
commit 8d141878ce
2 changed files with 21 additions and 2 deletions

View File

@@ -506,6 +506,13 @@ fn test_mod() {
assert (0.6447968302508578) == f
}
fn test_cbrt() {
cbrts := [2.0, 10, 56]
for idx, i in [8.0, 1000, 175_616] {
assert cbrt(i) == cbrts[idx]
}
}
fn test_exp() {
for i := 0; i < math.vf_.len; i++ {
f := exp(math.vf_[i])