Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v
/
vlib
/
math
/
bits.js.v
18
lines
·
15
sloc
·
211 bytes
·
1570e613b51ddaac51aa97f0c8584efa2552603a
Raw
1
module
math
2
3
pub
fn
inf(sign int) f64 {
4
mut
res := 0.0
5
if
sign >= 0 {
6
#res.val = Infinity
7
}
else
{
8
#res.val = -Infinity
9
}
10
return
res
11
}
12
13
pub
fn
nan() f64 {
14
mut
res := 0.0
15
#res.val = NaN
16
17
return
res
18
}
19