Even more math (#56)

Remaining implementations of JavaScript's Math functions (except sin/cos/tan), both double (Math) and single (Mathf) precision, ported from musl incl. tests from libc-test, plus some changes to match JS semantics. Also binds fmod to `%` and pow to `**`.
This commit is contained in:
Daniel Wirtz
2018-03-30 17:25:54 +02:00
committed by GitHub
parent e47a130771
commit 164f134053
29 changed files with 143290 additions and 15143 deletions

View File

@ -444,6 +444,7 @@ function parse<T>(str: String, radix: i32 = 0): T {
return sign * num;
}
// FIXME: naive implementation
export function parseFloat(str: String): f64 {
var len: i32 = str.length;
if (!len) {