apense
bfcbe64778
Specific float32/float64 procs
...
I still used generics, but made them choose from `float32` or `float64`. I can rewrite in separate, explicit procs if is wanted
2015-06-24 14:49:15 -04:00
apense
67b3c4b31f
Added documentation for mod
...
Along with a brief example for sign demonstration
2015-06-24 03:33:48 -04:00
apense
edbd191f74
Conversion between radians and degrees.Fixes #2881
...
provides a new constant for conversion (not public, but that can be changed if it's wanted). the functions are pretty simple, honestly. top-level comment so documentation for each function could remain. Fixes #2881
2015-06-24 03:22:04 -04:00
apense
c0c4a7d6a6
Added some C99 funcs
...
Error function (and complementary) and gamma function (and truncated)
2015-06-18 16:07:00 -04:00
apense
4072a39c69
Updated RNG for Visual C
...
Can't test it, but it should work just fine. Can be extended to MinGW w/ GCC and other compilers sometime in the future
2015-06-14 21:16:39 -04:00
apense
7fba7d934b
Discarded randomize for windows
...
It actually doesn't use it because `rand_s` doesn't.
2015-06-11 18:56:59 -04:00
apense
294989daf5
Updated random functions
...
For Windows, `rand_s` has been available since Windows XP (see https://msdn.microsoft.com/en-us/library/sxtz2fa8.aspx ). It gives a better quality random number in a larger range (the max is actually `0xffffffff`).
2015-06-11 18:47:28 -04:00
Boris Vassilev
9723e30647
Document explicitly the behaviour of math.gcd with float arguments
2015-05-13 13:00:20 +03:00
Varriount
ace11f08aa
Merge pull request #2537 from jsanjuas/devel
...
Generalize mean to other types
2015-05-07 12:59:01 -04:00
Koala Zen
cf68d926d8
fixes isPowerOfTwo returning true on the smallest integer
2015-05-06 12:37:15 -07:00
Oleh Prypin
32109a7867
Don't run non-test code when defined(testing)
2015-04-21 14:37:29 +03:00
Josep Sanjuas
f72bb57fff
Convert to float before sum
2015-04-18 13:40:20 +02:00
Josep Sanjuas
44246b6709
Document toFloat is necessary
2015-04-18 13:38:15 +02:00
Josep Sanjuas
e76f54e059
Generalize variance to other types
2015-04-18 13:28:48 +02:00
Josep Sanjuas
d0ff06b8c1
Generalize mean to other types
2015-04-12 19:40:30 +02:00
Simon Hafner
4ea5f3e6e6
no side effects on math procs, fixes #2458
2015-04-04 16:44:59 -05:00
def
43bc72f1fe
Make gcd iterative instead of recursive
2015-02-16 20:44:24 +01:00
def
cc757d538c
Remove shuffle again
2015-02-16 20:44:24 +01:00
def
8c92a78853
Export new math procs
2015-02-16 20:44:24 +01:00
def
d57d1f00cd
Add shuffle to math module
2015-02-16 20:44:24 +01:00
def
1ad1b93f0a
Add ^, gcd and lcm to math
2015-02-16 20:43:20 +01:00
Andreas Rumpf
2f62cc91a4
Merge pull request #2111 from lyro/fix-2110
...
fix conditions for int size in 'math.nextPowerOfTwo' #2110
2015-02-12 15:18:55 +01:00
Araq
10335fd726
fixed minor bugs; cleaned up tests
2015-02-12 14:56:56 +01:00
Frank Fischer
fcfaf2a844
fix conditions for int size in 'math.nextPowerOfTwo' #2110
2015-02-12 12:47:58 +01:00
Guillaume Gelin
3119fe087d
Happy new year!
2015-01-06 15:26:33 +01:00
def
f52fd8785f
Fix some deprecation warnings caused by renames
2014-11-13 21:34:46 +01:00
Araq
adad2d5f4a
Merge branch 'devel' into bigbreak
...
Conflicts:
lib/impure/db_postgres.nim
lib/pure/json.nim
lib/pure/math.nim
lib/system/atomics.nim
2014-11-03 11:42:36 +01:00
Varriount
6935171b85
Fix math.nim on windows
2014-11-03 02:17:39 -05:00
Andreas Rumpf
a0ecfd19be
Merge pull request #1448 from def-/posix-math
...
Add -lm for fesetround and fegetround
2014-11-03 01:58:50 +01:00
Araq
d05df2173b
Nimrod renamed to Nim
2014-08-28 09:50:51 +02:00
Araq
11b6958755
big rename
2014-08-27 23:42:51 +02:00
Araq
2f43fdb837
renamefest
2014-08-23 01:43:49 +02:00
def
a019825d8f
Move fenv to its own module
2014-08-22 13:12:49 +02:00
Dominik Picheta
add0a0e9bc
Merge pull request #1351 from def-/random-openarrays
...
Add random() for openarrays
2014-08-13 21:12:12 +01:00
Araq
dd806cafa0
distinguish between 'defined' and 'declared'
2014-08-11 20:38:28 +02:00
def
c0422ae8af
Move floating point rounding and exceptions handling to math
...
(it's C99 as well, not just POSIX)
2014-08-06 02:31:19 +02:00
def
fc6a799fc6
Add random() for openarrays
2014-07-12 03:04:43 +02:00
Grzegorz Adam Hankiewicz
2353b5633e
Hyperlinks back JavaScript target.
2014-06-21 23:48:41 +02:00
Charlie
d32b4272c3
added a note about random(max: float): float's resolution on windows
2014-05-18 15:16:35 -04:00
Charlie
8a183dac78
added random(max: float): float support to windows
2014-05-18 15:13:37 -04:00
Araq
e6d17e6273
made large parts of the stdlib gcsafe
2014-04-20 20:01:24 +02:00
Dominik Picheta
96c97d4103
JS: Fixes math and streams module and implements json.
2014-04-11 21:41:45 +01:00
ReneSac
8095fbf982
Removed trailing ';'.
2014-04-06 15:07:20 -03:00
ReneSac
a4559ab17e
Zero is not a power of two. Fix #1047
...
Also, fixed some docstrings and added {.noSideEffect.} pragma to nextPowerOfTwo().
2014-04-06 14:18:16 -03:00
Jason Livesay
cabc5c80d3
Calling randomize() again within 1 second will now provide a different seed
2014-03-26 18:54:34 -07:00
Araq
92b8fac94a
case consistency part 4
2013-12-27 23:10:36 +01:00
Araq
891f871ba7
better support for GNU's assembler
2013-09-03 23:44:31 +02:00
Araq
52851b722d
--os:standalone works again
2013-06-30 21:15:28 +02:00
Grzegorz Adam Hankiewicz
72a3e21f28
Removes executable bit for text files.
2013-03-16 23:53:07 +01:00
Simon Hafner
1785c6877b
EcmaScript => JS. Fixes #330
...
No one calls it EcmaScript anymore.
2013-02-15 11:08:30 -06:00