mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-28 10:13:56 +00:00
* fix js unsigned integer
* Use `std` prefix for standard library modules
* fix #17118
(cherry picked from commit 32bf10126c)
This commit is contained in:
@@ -1185,6 +1185,22 @@ when isMainModule:
|
||||
doAssert(classify(trunc(f_nan.float32)) == fcNan)
|
||||
doAssert(classify(trunc(0.0'f32)) == fcZero)
|
||||
|
||||
block:
|
||||
when not defined(js):
|
||||
# check for no side effect annotation
|
||||
proc mySqrt(num: float): float {.noSideEffect.} =
|
||||
# xxx unused
|
||||
sqrt(num)
|
||||
|
||||
# check gamma function
|
||||
doAssert gamma(5.0) == 24.0 # 4!
|
||||
doAssert lgamma(1.0) == 0.0 # ln(1.0) == 0.0
|
||||
doAssert erf(6.0) > erf(5.0)
|
||||
doAssert erfc(6.0) < erfc(5.0)
|
||||
|
||||
when not defined(js) and not defined(windows): # xxx pending bug #17017
|
||||
doAssert gamma(-1.0).isNaN
|
||||
|
||||
block: # sgn() tests
|
||||
assert sgn(1'i8) == 1
|
||||
assert sgn(1'i16) == 1
|
||||
|
||||
Reference in New Issue
Block a user