| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* Rename tgamma to gamma
* set the deprecating version 0.19.0
* update changelog and use description in deprecated pragma
|
|
|
|
|
|
| |
* Add product proc
* Update changelog
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Use truncation division in mod for floats
* Add changelog entry
* Add floorDiv/floorMod to math.nim
* Update changelog
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inverse hyperbolic, and change to use defined functions in C or JS for logs and hyperbolics. (#7893)
* Add secant, cosecant and cotangent.
* Add hyperbolic functions of cotangent, secant and cosecant.
* Add inverse hyperbolic functions.
* Change to use defined function of C and JS.
* Bug fix and refactoring.
* Add change to changelog.md
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Faster binary gcd algorithm.
* Use built in countTrailingZeroBits to calculate gcd.
* Add definitions of gcd for integers and other types.
* Unified signed case and unsinged case in one proc by using when syntax.
* Change to faster one.
|
| |
|
|
|
|
|
|
|
|
| |
* Replace factorial function with a compile time one
* Fix the indentation
* Update
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Fixed #4532, VS2010 now can compile Nim
Fixed #4532, VS2010 now can compile Nim
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
(equivalent to C's modf function). Fixes #4195.
|
|
|
|
|
|
| |
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].
|
| |
|
|\ |
|
| |
| |
| | |
Needed other bracket
|
| |
| |
| | |
Not sure what was going on before
|
| |
| |
| | |
When a proc is `importc`-ed, made explicit. Otherwise, used `[T: float32|float64]`
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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]
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| | |
Hypotenuse is really just the euclidean norm
|
| |
| |
| | |
I think I remember reading that the documentation is generated from the normal targets (not javascript), so that's where I put the docs
|
| | |
|
|\ \
| |/
|/| |
Conversion between radians and degrees.Fixes #2881
|
| |
| |
| | |
I still used generics, but made them choose from `float32` or `float64`. I can rewrite in separate, explicit procs if is wanted
|
| |
| |
| | |
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
|
|/
|
| |
Along with a brief example for sign demonstration
|
|
|
| |
Error function (and complementary) and gamma function (and truncated)
|
|
|
| |
Can't test it, but it should work just fine. Can be extended to MinGW w/ GCC and other compilers sometime in the future
|
|
|
| |
It actually doesn't use it because `rand_s` doesn't.
|
|
|
| |
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`).
|
| |
|
|\
| |
| | |
Generalize mean to other types
|