aboutsummaryrefslogtreecommitdiffstats
path: root/gen
Commit message (Collapse)AuthorAgeFilesLines
* Change the API of some lib2.bc functionsGavin Howard2021-07-301-25/+29
| | | | Signed-off-by: Gavin Howard <gavin@yzena.com>
* Add more bitwise functions to lib2.bcGavin Howard2021-07-301-25/+95
| | | | Signed-off-by: Gavin Howard <gavin@yzena.com>
* Optimize the bitwise functions in lib2.bc with divmodGavin Howard2021-07-221-33/+22
| | | | Signed-off-by: Gavin Howard <gavin@yzena.com>
* Make s2un(x,n) work with max negative numbersGavin Howard2021-07-221-1/+13
| | | | | | Also, make it truncate. Signed-off-by: Gavin Howard <gavin@yzena.com>
* Add bitwise functions in lib2Gavin Howard2021-07-221-0/+109
| | | | | | These were requested by Stefan Esser of FreeBSD. Signed-off-by: Gavin Howard <gavin@yzena.com>
* Add two helper functions in lib2 that users might wantGavin Howard2021-07-221-1/+6
| | | | Signed-off-by: Gavin Howard <gavin@yzena.com>
* Add the redefine option to the bc help textGavin Howard2021-07-211-0/+11
| | | | Signed-off-by: Gavin Howard <gavin@yzena.com>
* Fix an oversightGavin Howard2021-06-221-2/+2
| | | | Signed-off-by: Gavin Howard <gavin@yzena.com>
* Add environment variables to help and manualsGavin Howard2021-06-222-0/+71
| | | | | | Also, add the plumbing for help to print defaults. Signed-off-by: Gavin Howard <gavin@yzena.com>
* Remove compiler warningsGavin Howard2021-06-192-20/+20
| | | | Signed-off-by: Gavin Howard <gavin@yzena.com>
* Finish documenting `gen/` in the development manualGavin Howard2021-06-192-9/+104
| | | | | | | This necessitated documenting algorithms from `lib2.bc` as well as documenting `strgen.c` thoroughly. Signed-off-by: Gavin Howard <gavin@yzena.com>
* More library clean upGavin Howard2021-06-191-2/+2
| | | | Signed-off-by: Gavin Howard <gavin@yzena.com>
* Fix multi-digit number bugs in the bc libsGavin Howard2021-06-192-16/+7
| | | | | | This also does some cleanup in the libs. Signed-off-by: Gavin Howard <gavin@yzena.com>
* Do a lot of work on the development manualGavin Howard2021-06-181-1/+9
| | | | | | | This commit also includes other documentation work related to development that I have noticed as I've gone along. Signed-off-by: Gavin Howard <gavin@yzena.com>
* Add gcd and lcm to lib2Gavin Howard2021-06-151-0/+31
| | | | | | I really want these. Signed-off-by: Gavin Howard <gavin@yzena.com>
* Fix compiler warningsGavin Howard2021-04-041-2/+2
|
* Start the process of making bc/dc work on WindowsGavin Howard2021-04-043-14/+66
| | | | | | This requires some code to make things match POSIX and especially making inline an empty string because Microsoft's compiler is picky about functions marked inline.
* Change the bc and dc help textsGavin Howard2021-03-312-2/+10
|
* Fix a divide by 0 bug in `root()` (lib2.bc)Gavin Howard2021-03-021-1/+1
|
* Update copyright to 2021Gavin Howard2021-01-266-8/+8
|
* Fix an oversightStefan Eßer2020-11-301-6/+5
| | | | | This oversight is that Gavin did not change `gen/strgen.sh` when he changed `gen/strgen.c` to remove an unused parameter.
* Fix warnings and errors revealed by release.shGavin Howard2020-11-251-7/+6
|
* Remove an unneeded lineGavin Howard2020-11-211-1/+0
|
* Move more stuff around and fix all compiler errors and warningsGavin Howard2020-11-212-4/+11
|
* Avoid clobbering `r` variable in Bessel functionMichael Forney2020-11-201-1/+1
| | | | | | | The `j` function uses `r` to accumulate its result, but did not declare it with auto, causing the caller's value to be clobbered. To fix this, declare `r` as auto to make it a local variable.
* Remove "All rights reserved" from license headers for FreeBSDGavin Howard2020-07-016-12/+0
| | | | | | | | | | After looking up what its use was, I found this link: https://opensource.stackexchange.com/questions/2121/mit-license-and-all-rights-reserved/4403#4403 Apparently, as I was told by FreeBSD, it's obsolete. Also the licenses I have from history only say to preserve the copyright notice and "conditions below," which taken literally does not include the "All rights reserved" portion.
* Add SPDX identifiers to filesGavin Howard2020-06-306-0/+12
| | | | This is a request from FreeBSD.
* Edit the bc help a bitGavin Howard2020-06-301-0/+5
|
* Remove a now unused auto from `ceil()`Gavin Howard2020-06-201-1/+1
|
* Make the implementation of `ceil()` more efficientGavin Howard2020-06-191-2/+1
|
* Fix a bug in lib2.bc's `ceil()` functionGavin Howard2020-06-101-2/+3
| | | | | | | The bug is that when the digit that is one place farther than the position that the number will be truncated to is 0, `ceil()` returns the same number, even if digits after it are greater than 0. This commit fixes that.
* Fix style in lib2.bcGavin Howard2020-04-281-1/+1
|
* Merge branch 'master' into randGavin Howard2020-03-112-5/+38
|\
| * Fix bugs in the new functionGavin Howard2020-03-081-1/+3
| |
| * Add a function to lib2.bcGavin Howard2020-03-081-0/+4
| |
| * Tweak lib2.bcGavin Howard2020-03-081-4/+4
| |
| * Add a license header to a file that is missing itGavin Howard2020-02-231-1/+28
| |
* | Merge branch 'master' into randGavin Howard2020-01-155-6/+6
|\|
| * Update copyright year 2019 --> 2020.Zach van Rijn2020-01-155-6/+6
| |
* | Add the brand() functionGavin Howard2019-11-291-0/+1
| |
* | Make more things errors pertaining to randGavin Howard2019-11-221-1/+1
| | | | | | | | | | For example, `irand()` only accepts positive, non-zero integers now. This also fixes manuals.
* | Add a random number generator to bcGavin Howard2019-11-221-0/+9
|/ | | | | | | This random number generator is a pseudo-random number generator, and it is seeded. The code to take care of the seed is all included. Code is also added to generate numbers of arbitrary size and arbitrary precision.
* Improve the root and cbrt API'sGavin Howard2019-10-291-0/+1
|
* Add root and cbrt function to lib2Gavin Howard2019-10-251-0/+23
|
* Add documentation for the -P/--no-prompt optionGavin Howard2019-05-262-0/+8
|
* Update all documentation that I could findGavin Howard2019-05-252-7/+8
| | | | | I might have missed a few things here and there, but those can be fixed in bug fix releases. However, I do actually think I got it all.
* Add atan2 to the extended math library with testsGavin Howard2019-05-231-0/+16
|
* Another style change to strgen.sh to make sure it is POSIX onlyGavin Howard2019-04-221-2/+4
|
* Slight fix to style on strgen.shGavin Howard2019-04-221-1/+1
|
* Split test into two parts to prevent parse error if the variable is unsetStefan Esser2019-04-221-1/+1
|