| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix #9125
* Update tests/stdlib/tmath.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* back
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
|
|
|
|
|
| |
* add math.copySign
* fix + tests
|
|
|
|
|
|
|
|
| |
* add `euclDiv` and `euclMod` to `math`
* use abs
* Update lib/pure/math.nim
Co-authored-by: Clyybber <darkmine956@gmail.com>
|
|
|
|
|
| |
* fix #16428 vmops now works for generic procs
* remove duplication
|
| |
|
|
|
|
|
|
|
| |
* add math.isNaN
* isNaN now works with --passc:-ffast-math; tests
* Update lib/pure/math.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
| |
* math.nim: procs with {.noSideEffect} -> funcs
* math.nim: procs without {.noSideEffect.} -> funcs
* math.nim: proc -> func in links
* math.nim: proc -> func in doc comments
* test: add `math` to strictFuncs test
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* move tests to testament
* minor
* fix random
* disable test random
|
|
|
|
|
|
|
|
|
| |
(#15900)
* original docs are wrong
* fix pathnorm
* Update lib/pure/pathnorm.nim
Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add approxequal
* Address review comments, tests that pass
* more wikipedia links [ci skip]
* forgot since
Co-authored-by: b3liever <b3liever@yandex.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
| |
|
|
|
|
|
|
|
| |
* update to the latest Jester
* remove deprecated procs from some stdlib modules
* 'criterion' is not maintained anymore and relies on obsolete stuff
|
|
|
|
| |
* move since from inclrtl to std/private/since
* move since import in system below for HCR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Error -> Defect for defects
The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.
With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Fix classify to test for subnormality.
* Minor fix.
* Modified to maintain existing API.
* Minor change.
* Removed 32-bit case since float is always 64-bit.
|
|
|
|
|
| |
This fixes some tiny issues with using Nim on 16-bit platforms. Not
entirely sure why the AVR chip I was compiling for with "cpu = avr" was
detected as 16-bit, but that's probably another issue..
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fix many broken links
Note that contrary to what docgen.rst currently says, the ids have
to match exactly or else most web browsers will not jump to the
intended symbol.
* Prefer relative links for Nim documentation
This is more friendly to those browsing the documentation without
a network connection. The nim-doc package in Debian allows this,
for example.
Also, the domain name being used was not consistent. It could have
been either nim-lang.org or nim-lang.github.io, and those reading
the stable docs could have found themselves suddenly reading the
devel docs instead.
* koch.rst: remove link to nonexistent section
* manual.rst: remove unintended link
cast[T](0) is interpreted as a link to id 0 with text T, so escape
the opening parentheses to display the intended output.
* asyncstreams: replace unintended link with emphasis
* Fix word wrapping
|
| |
| |
| |
| |
| |
| | |
Note that contrary to what docgen.rst currently says, the ids have
to match exactly or else most web browsers will not jump to the
intended symbol.
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
`Math.cbrt()` exists:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cbrt
The binding was missing for the JavaScript backend.
|
|
|
|
|
|
|
|
|
| |
* Render deprecated pragmas
* fix the expected html
* clean up the documentation regarding deprecations
* fix typo
* fix system.nim
* fix random
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Readline pasthru, add linker to config, do not pass -lm to linker.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Resolve things raised in https://github.com/nim-lang/Nim/issues/10081 ?
CDF is a standard ident in all things related to random numbers/sampling,
and full words "cumulativeDistributionFunction" would be silly long, in
this case, IMO. We use lowercase `cdf` to make it not look like a type,
remove all looping from `sample` letting callers do it. Besides just
side-stepping any `sampleSize` name choice, callers may want to filter
out samples anyway which this makes slightly simpler.
Also add two variants of `cumsum`, value return and in-place update
distinguished by the var-ness of the first argument. Add tests for
`int` and `float` for both `cumsum` and the new `sample`. (The sample
tests exercise the value return mode of `cumsum`.)
Functionality pre-this-PR `sample(a, w)` is now the almost as simple
`for i in 0..<n: sample(a, w.cumsum)`, but this new code factoring is
almost surely better. The statistical tests pass, as before.
* Address Araq comment in https://github.com/nim-lang/Nim/pull/10084
We can always add in some `var` version later if desired to save
memory, but this change now at least firms up the `sample` interface.
* Rename `cumsum` -> `cumsummed` to honor NEP1 style. Re-instate `cumsum` as
the in-place transformation. Test both in `tests/stdlib/tmath.nim` and use
`cumsummed` in the example code for sample since that's a simpler example.
* Fix requests from https://github.com/nim-lang/Nim/pull/10084 :
example in lib/pure/math.nim and comment whitespace in lib/pure/random.nim
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Small documentation typo in math
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* posix_other: Haiku now has spawn.h
This is added per https://dev.haiku-os.org/ticket/13446
* posix_other: Add Haiku specific Dirent members
* cpuinfo: Add an implementation for Haiku
* distros: Add basic Haiku support
* encodings: update Haiku support
* fenv, math: Haiku now provides libm
* times: Add Haiku struct members
* ansi_c, osalloc: Add Haiku constants
* threads: Add Haiku support
* testament: Haiku uses LIBRARY_PATH
* nim.cfg: Update Haiku support
libnetwork should only be linked if network functions are used
* threads: Haiku does not support -pthread switch
* tworkingdir: Haiku's env is in /bin
* posix_other: add SIGKILLTHR for Haiku
* sockets: link with libnetwork on Haiku
* coro: correct ucontext.h location
http://pubs.opengroup.org/onlinepubs/009696699/basedefs/ucontext.h.html
* coro: ucontext backend is not available on Haiku
Haiku doesn't provide the <ucontext.h> header, as it was removed from POSIX
* coro: fix setjmp backend
The compiler does not allow statements after a noreturn function
* nativesockets: Haiku doesn't support AI_V4MAPPED
* system: hostOS can contains "haiku"
* os: add support for Haiku's packagefs
packagefs is read-only, but there are writable holes to the underlying
file system as well
* os: update constant for Haiku
|
| |
|