Files
wren/test/core/number/log2.wren
underscorediscovery 433fbc4019 core; num; add exp & log2
I've had a couple use cases in time that the code is significantly clearer with these, and makes porting less error prone
2020-07-10 19:38:45 -07:00

5 lines
178 B
Plaintext

System.print(1024.log2) // expect: 10
System.print(2048.log2) // expect: 11
System.print(100.log2) // expect: 6.6438561897747
System.print((-1).log2) // expect: nan