summary refs log tree commit diff stats
path: root/lib/pure/math.nim
Commit message (Collapse)AuthorAgeFilesLines
* fix float comparision failure in math testsAman Gupta2015-10-021-1/+1
| | | | | | | | | | | | | | | | | FAIL: math.nim Test "lib/pure/math.nim" in category "lib" Failure: reExitcodesDiffer Expected: exitcode: 0 Gotten: exitcode: 1 Output: Traceback (most recent call last) math.nim(478) math system.nim(3343) failedAssertImpl system.nim(3335) raiseAssert system.nim(2531) sysFatal Error: unhandled exception: tgamma(5.0'f64) == 24.0'f64 [AssertionError]
* fixes #3312Araq2015-09-181-15/+14
|
* math.nim works with NimScriptAraq2015-08-211-7/+9
|
* Fix exponentiation operation to avoid overflow.Reimer Behrends2015-08-141-1/+3
| | | | | | The exponentation implementation unnecessarily multiplied the result with itself at the end if the exponent was an even number. This led to overflow if result*result > high(int).
* Corrected erroneous descriptionapense2015-06-291-1/+2
| | | Hypotenuse is really just the euclidean norm
* Added some documentation and examplesapense2015-06-291-20/+47
| | | I think I remember reading that the documentation is generated from the normal targets (not javascript), so that's where I put the docs
* disable vcc specific code which doesn't workAraq2015-06-291-39/+39
|
* Merge pull request #2977 from apense/patch-5Andreas Rumpf2015-06-251-0/+13
|\ | | | | Conversion between radians and degrees.Fixes #2881
| * Specific float32/float64 procsapense2015-06-241-8/+4
| | | | | | I still used generics, but made them choose from `float32` or `float64`. I can rewrite in separate, explicit procs if is wanted
| * Conversion between radians and degrees.Fixes #2881apense2015-06-241-0/+17
| | | | | | 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
* | Added documentation for modapense2015-06-241-0/+6
|/ | | Along with a brief example for sign demonstration
* Added some C99 funcsapense2015-06-181-0/+18
| | | Error function (and complementary) and gamma function (and truncated)
* Updated RNG for Visual Capense2015-06-141-14/+27
| | | Can't test it, but it should work just fine. Can be extended to MinGW w/ GCC and other compilers sometime in the future
* Discarded randomize for windowsapense2015-06-111-6/+9
| | | It actually doesn't use it because `rand_s` doesn't.
* Updated random functionsapense2015-06-111-4/+12
| | | 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`).
* Document explicitly the behaviour of math.gcd with float argumentsBoris Vassilev2015-05-131-0/+3
|
* Merge pull request #2537 from jsanjuas/develVarriount2015-05-071-6/+11
|\ | | | | Generalize mean to other types
| * Convert to float before sumJosep Sanjuas2015-04-181-2/+3
| |
| * Document toFloat is necessaryJosep Sanjuas2015-04-181-0/+1
| |
| * Generalize variance to other typesJosep Sanjuas2015-04-181-3/+3
| |
| * Generalize mean to other typesJosep Sanjuas2015-04-121-2/+5
| |
* | fixes isPowerOfTwo returning true on the smallest integerKoala Zen2015-05-061-1/+1
| |
* | Don't run non-test code when defined(testing)Oleh Prypin2015-04-211-1/+3
|/
* no side effects on math procs, fixes #2458Simon Hafner2015-04-041-0/+7
|
* Make gcd iterative instead of recursivedef2015-02-161-4/+5
|
* Remove shuffle againdef2015-02-161-8/+0
|
* Export new math procsdef2015-02-161-2/+2
|
* Add shuffle to math moduledef2015-02-161-0/+8
|
* Add `^`, gcd and lcm to mathdef2015-02-161-0/+24
|
* Merge pull request #2111 from lyro/fix-2110Andreas Rumpf2015-02-121-2/+2
|\ | | | | fix conditions for int size in 'math.nextPowerOfTwo' #2110
| * fix conditions for int size in 'math.nextPowerOfTwo' #2110Frank Fischer2015-02-121-2/+2
| |
* | fixed minor bugs; cleaned up testsAraq2015-02-121-4/+4
|/
* Happy new year!Guillaume Gelin2015-01-061-1/+1
|
* Fix some deprecation warnings caused by renamesdef2014-11-131-1/+2
|
* Merge branch 'devel' into bigbreakAraq2014-11-031-1/+0
|\ | | | | | | | | | | | | | | Conflicts: lib/impure/db_postgres.nim lib/pure/json.nim lib/pure/math.nim lib/system/atomics.nim
| * Fix math.nim on windowsVarriount2014-11-031-1/+1
| |
| * Merge pull request #1448 from def-/posix-mathAndreas Rumpf2014-11-031-11/+0
| |\ | | | | | | Add -lm for fesetround and fegetround
| | * Move fenv to its own moduledef2014-08-221-54/+0
| | |
| | * Move floating point rounding and exceptions handling to mathdef2014-08-061-0/+43
| | | | | | | | | | | | (it's C99 as well, not just POSIX)
* | | Nimrod renamed to NimAraq2014-08-281-3/+3
| | |
* | | big renameAraq2014-08-271-15/+17
| | |
* | | renamefestAraq2014-08-231-2/+2
|/ /
* | Merge pull request #1351 from def-/random-openarraysDominik Picheta2014-08-131-1/+6
|\ \ | | | | | | Add random() for openarrays
| * | Add random() for openarraysdef2014-07-121-1/+6
| |/
* / distinguish between 'defined' and 'declared'Araq2014-08-111-1/+1
|/
* Hyperlinks back JavaScript target.Grzegorz Adam Hankiewicz2014-06-211-1/+2
|
* added a note about random(max: float): float's resolution on windowsCharlie2014-05-181-1/+2
|
* added random(max: float): float support to windowsCharlie2014-05-181-7/+13
|
* made large parts of the stdlib gcsafeAraq2014-04-201-6/+8
|
* JS: Fixes math and streams module and implements json.Dominik Picheta2014-04-111-2/+2
|
title='Blame the previous revision' href='/akspecs/ranger/blame/Makefile?h=v1.9.3&id=dbb04b860eb2cae2024523dd18b45401cc81e610'>^
e9e4b4ff ^
ececd03e ^
e9e4b4ff ^
0c2c782d ^
636d9393 ^
b0a216f5 ^
c6afc196 ^

c0d63e78 ^


ececd03e ^
f2c8a7ff ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145