Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Corrected comment in maths library. | A. S. Budden | 2016-06-20 | 1 | -1/+1 |
| | |||||
* | Update math.nim | matkuki | 2016-06-18 | 1 | -1/+1 |
| | |||||
* | Windows MSVC < 2012 'round' function update | matkuki | 2016-06-17 | 1 | -5/+11 |
| | | | | Microsoft Visual C++ compilers prior to 2012 do not implement the 'round', 'roundl' or 'roundf' functions. This change is fixes this. Tested it with MSVC 2010. | ||||
* | Changed math.nim tests to use newly defined ==~ operator | A. S. Budden | 2016-05-31 | 1 | -24/+24 |
| | |||||
* | Correction to round0 following review. | A. S. Budden | 2016-05-31 | 1 | -1/+1 |
| | |||||
* | Implemented function to split floating point numbers at the decimal place ↵ | A. S. Budden | 2016-05-31 | 1 | -0/+25 |
| | | | | (equivalent to C's modf function). Fixes #4195. | ||||
* | Modification to implementation of round() such that it returns a float and ↵ | A. S. Budden | 2016-05-31 | 1 | -25/+67 |
| | | | | | | accepts a places argument (fixes #3473). This also involved moving some functions around to get the hierarchy correct and the documentation for frexp was modified such that it was clear that it can return a float in either the range [-1, -0.5] or [0.5, 1]. | ||||
* | moved random procs from math to its own module (breaking change) | Andreas Rumpf | 2016-05-30 | 1 | -110/+0 |
| | |||||
* | Merge branch 'patch-8' of https://github.com/apense/Nim into apense-patch-8 | Andreas Rumpf | 2016-05-30 | 1 | -52/+101 |
|\ | |||||
| * | Fixed silly format error | apense | 2015-06-24 | 1 | -1/+1 |
| | | | | | | Needed other bracket | ||||
| * | Converted tabs | apense | 2015-06-24 | 1 | -39/+39 |
| | | | | | | Not sure what was going on before | ||||
| * | Rewrote procs for float32/float64 | apense | 2015-06-24 | 1 | -86/+128 |
| | | | | | | When a proc is `importc`-ed, made explicit. Otherwise, used `[T: float32|float64]` | ||||
* | | Setting TAU to 2 * PI | gmpreussner | 2016-03-17 | 1 | -1/+1 |
| | | |||||
* | | Added TAU constant. | gmpreussner | 2016-03-17 | 1 | -0/+1 |
| | | |||||
* | | Removal of stats procs for openarray (use the RunningStat methodology) | JamesP | 2015-11-11 | 1 | -20/+0 |
| | | |||||
* | | Removal of RunningStats ready for new stats.nim pure lib file | JamesP | 2015-11-07 | 1 | -42/+0 |
| | | |||||
* | | fix float comparision failure in math tests | Aman Gupta | 2015-10-02 | 1 | -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 #3312 | Araq | 2015-09-18 | 1 | -15/+14 |
| | | |||||
* | | math.nim works with NimScript | Araq | 2015-08-21 | 1 | -7/+9 |
| | | |||||
* | | Fix exponentiation operation to avoid overflow. | Reimer Behrends | 2015-08-14 | 1 | -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 description | apense | 2015-06-29 | 1 | -1/+2 |
| | | | | | | Hypotenuse is really just the euclidean norm | ||||
* | | Added some documentation and examples | apense | 2015-06-29 | 1 | -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 work | Araq | 2015-06-29 | 1 | -39/+39 |
| | | |||||
* | | Merge pull request #2977 from apense/patch-5 | Andreas Rumpf | 2015-06-25 | 1 | -0/+13 |
|\ \ | |/ |/| | Conversion between radians and degrees.Fixes #2881 | ||||
| * | Specific float32/float64 procs | apense | 2015-06-24 | 1 | -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 #2881 | apense | 2015-06-24 | 1 | -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 mod | apense | 2015-06-24 | 1 | -0/+6 |
|/ | | | Along with a brief example for sign demonstration | ||||
* | Added some C99 funcs | apense | 2015-06-18 | 1 | -0/+18 |
| | | | Error function (and complementary) and gamma function (and truncated) | ||||
* | Updated RNG for Visual C | apense | 2015-06-14 | 1 | -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 windows | apense | 2015-06-11 | 1 | -6/+9 |
| | | | It actually doesn't use it because `rand_s` doesn't. | ||||
* | Updated random functions | apense | 2015-06-11 | 1 | -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 arguments | Boris Vassilev | 2015-05-13 | 1 | -0/+3 |
| | |||||
* | Merge pull request #2537 from jsanjuas/devel | Varriount | 2015-05-07 | 1 | -6/+11 |
|\ | | | | | Generalize mean to other types | ||||
| * | Convert to float before sum | Josep Sanjuas | 2015-04-18 | 1 | -2/+3 |
| | | |||||
| * | Document toFloat is necessary | Josep Sanjuas | 2015-04-18 | 1 | -0/+1 |
| | | |||||
| * | Generalize variance to other types | Josep Sanjuas | 2015-04-18 | 1 | -3/+3 |
| | | |||||
| * | Generalize mean to other types | Josep Sanjuas | 2015-04-12 | 1 | -2/+5 |
| | | |||||
* | | fixes isPowerOfTwo returning true on the smallest integer | Koala Zen | 2015-05-06 | 1 | -1/+1 |
| | | |||||
* | | Don't run non-test code when defined(testing) | Oleh Prypin | 2015-04-21 | 1 | -1/+3 |
|/ | |||||
* | no side effects on math procs, fixes #2458 | Simon Hafner | 2015-04-04 | 1 | -0/+7 |
| | |||||
* | Make gcd iterative instead of recursive | def | 2015-02-16 | 1 | -4/+5 |
| | |||||
* | Remove shuffle again | def | 2015-02-16 | 1 | -8/+0 |
| | |||||
* | Export new math procs | def | 2015-02-16 | 1 | -2/+2 |
| | |||||
* | Add shuffle to math module | def | 2015-02-16 | 1 | -0/+8 |
| | |||||
* | Add `^`, gcd and lcm to math | def | 2015-02-16 | 1 | -0/+24 |
| | |||||
* | Merge pull request #2111 from lyro/fix-2110 | Andreas Rumpf | 2015-02-12 | 1 | -2/+2 |
|\ | | | | | fix conditions for int size in 'math.nextPowerOfTwo' #2110 | ||||
| * | fix conditions for int size in 'math.nextPowerOfTwo' #2110 | Frank Fischer | 2015-02-12 | 1 | -2/+2 |
| | | |||||
* | | fixed minor bugs; cleaned up tests | Araq | 2015-02-12 | 1 | -4/+4 |
|/ | |||||
* | Happy new year! | Guillaume Gelin | 2015-01-06 | 1 | -1/+1 |
| | |||||
* | Fix some deprecation warnings caused by renames | def | 2014-11-13 | 1 | -1/+2 |
| |