Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f6ad306
Improve Math routines
MaxGraey Oct 5, 2018
4ba5dbe
more "select" replacements
MaxGraey Oct 5, 2018
004c11d
refactoring <book>k to k != 0. Avoid unnecessary annotations
MaxGraey Oct 5, 2018
084bf28
more tweaks
MaxGraey Oct 5, 2018
3fb8ae8
simplificate Math.round
MaxGraey Oct 5, 2018
a2ff04b
improve Math.round
MaxGraey Oct 6, 2018
c42d061
remove isFinite check for Math.round
MaxGraey Oct 6, 2018
5796d2b
finalize Math.round
MaxGraey Oct 6, 2018
4f25f40
optimize expm1
MaxGraey Oct 6, 2018
4b8b724
more branch optimizations for expm1
MaxGraey Oct 6, 2018
e333a40
fix seed random for second state
MaxGraey Oct 6, 2018
174952b
minor improve asinh
MaxGraey Oct 6, 2018
35545eb
add copysign for Mathf.atan
MaxGraey Oct 6, 2018
00d5bd5
revert back branch stuff for asinh and remove redundancy
MaxGraey Oct 6, 2018
693f2c6
minor refactorings
MaxGraey Oct 6, 2018
e5f8e0d
optimize sinh
MaxGraey Oct 6, 2018
75e4d8c
inline some internals
MaxGraey Oct 6, 2018
8a3cfca
revert Rf inlining
MaxGraey Oct 6, 2018
3b00b76
minor improvments
MaxGraey Oct 6, 2018
29addf2
use renterpreted select for float constants
MaxGraey Oct 7, 2018
577f56d
add cast_select internal helper
MaxGraey Oct 7, 2018
c9b69dc
fixes
MaxGraey Oct 7, 2018
59bcf0f
remove redundant casting for casted_select
MaxGraey Oct 7, 2018
11eed0e
implement random for float math based on xoroshiro64starstar
MaxGraey Oct 7, 2018
ad7af21
use faster casting to float for Math.random
MaxGraey Oct 7, 2018
0683e6d
use splitmix32 for initial states
MaxGraey Oct 7, 2018
f88e328
refactoring
MaxGraey Oct 7, 2018
78151bf
update
MaxGraey Oct 7, 2018
d4708cf
update
MaxGraey Oct 8, 2018
f247bf8
optimize mod/rem using count leading zeros instead loops
MaxGraey Oct 8, 2018
9b74de7
father optimization for mod/rem
MaxGraey Oct 8, 2018
f752222
refactor rem/mod
MaxGraey Oct 8, 2018
16293ca
optimize some logical orders
MaxGraey Oct 8, 2018
17f6f3d
update tests
MaxGraey Oct 8, 2018
0596540
avoid redundant casting for Math.mod/rem
MaxGraey Oct 8, 2018
11cf85a
optimize scalbn
MaxGraey Oct 8, 2018
6034c26
Merge branch 'master' into improve-math
MaxGraey Oct 11, 2018
622be4d
Merge branch 'master' into improve-math
MaxGraey Oct 11, 2018
ddcf47c
fixing scalbn to avoid rounding sub normal values
MaxGraey Oct 11, 2018
f673b76
Merge branch 'master' into improve-math
MaxGraey Oct 19, 2018
4669e6a
elliminate some branch in Math.pow
MaxGraey Oct 19, 2018
f050cbd
[refactor] Use global PI constant
MaxGraey Oct 19, 2018
01d97a9
refactor and minimize Math.atan
MaxGraey Oct 19, 2018
1b8cbf7
use ariphmetic OR instead logic OR for simple expressions
MaxGraey Oct 19, 2018
87a4652
slightly optimize mod
MaxGraey Oct 19, 2018
20b4d42
optimal balance for Math.sign
MaxGraey Oct 21, 2018
34db62b
fix Math.sign
MaxGraey Oct 21, 2018
8762829
add comments with original musl's code
MaxGraey Oct 22, 2018
b82ee2f
revert back logical expresseions optimizations
MaxGraey Oct 25, 2018
72aee90
add more comments
MaxGraey Oct 25, 2018
9beb49f
finalize revert logical ops
MaxGraey Oct 25, 2018
c3bb8ae
more reverts
MaxGraey Oct 25, 2018
3899a4f
last one
MaxGraey Oct 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,005 changes: 616 additions & 389 deletions package-lock.json

Large diffs are not rendered by default.

550 changes: 273 additions & 277 deletions std/assembly/math.ts

Large diffs are not rendered by default.

349 changes: 151 additions & 198 deletions tests/compiler/binary.optimized.wat

Large diffs are not rendered by default.

1,293 changes: 589 additions & 704 deletions tests/compiler/binary.untouched.wat

Large diffs are not rendered by default.

285 changes: 175 additions & 110 deletions tests/compiler/std/array.optimized.wat

Large diffs are not rendered by default.

346 changes: 207 additions & 139 deletions tests/compiler/std/array.untouched.wat

Large diffs are not rendered by default.

1,484 changes: 600 additions & 884 deletions tests/compiler/std/libm.optimized.wat

Large diffs are not rendered by default.

1,560 changes: 654 additions & 906 deletions tests/compiler/std/libm.untouched.wat

Large diffs are not rendered by default.

3,722 changes: 1,530 additions & 2,192 deletions tests/compiler/std/math.optimized.wat

Large diffs are not rendered by default.

3,820 changes: 1,596 additions & 2,224 deletions tests/compiler/std/math.untouched.wat

Large diffs are not rendered by default.

470 changes: 175 additions & 295 deletions tests/compiler/std/mod.optimized.wat

Large diffs are not rendered by default.

516 changes: 196 additions & 320 deletions tests/compiler/std/mod.untouched.wat

Large diffs are not rendered by default.

341 changes: 159 additions & 182 deletions tests/compiler/std/operator-overloading.optimized.wat

Large diffs are not rendered by default.

697 changes: 344 additions & 353 deletions tests/compiler/std/operator-overloading.untouched.wat

Large diffs are not rendered by default.