Add math.copySign (#16406)

* add math.copySign
* fix + tests
This commit is contained in:
flywind
2020-12-30 08:09:30 -06:00
committed by GitHub
parent 73f778e441
commit 515cd45420
4 changed files with 94 additions and 1 deletions

View File

@@ -13,6 +13,9 @@ from math import sqrt, ln, log10, log2, exp, round, arccos, arcsin,
arctan, arctan2, cos, cosh, hypot, sinh, sin, tan, tanh, pow, trunc,
floor, ceil, `mod`
when declared(math.copySign):
from math import copySign
from os import getEnv, existsEnv, dirExists, fileExists, putEnv, walkDir, getAppFilename
from md5 import getMD5
from sighashes import symBodyDigest
@@ -168,6 +171,9 @@ proc registerAdditionalOps*(c: PCtx) =
wrap1f_math(floor)
wrap1f_math(ceil)
when declared(copySign):
wrap2f_math(copySign)
wrap1s(getMD5, md5op)
proc `mod Wrapper`(a: VmArgs) {.nimcall.} =