Commit Graph

53 Commits (3db98706691d38f0d1c5d099ed990ae0c6eaa6ee)

Author SHA1 Message Date
John Benediktsson da64b05e6d math.functions: adding e^-1.
This is for calculating e^x-1 for small values more accurately.  You can also
call expm1(x) function if you want, and it's available on your platform.

FUNCTION: double expm1 ( double x )
2019-11-05 10:19:32 -08:00
Doug Coleman 3f0ff53369 math.functions: add logit function and a test.
sigmoid is known as expit in scipy
2019-02-24 11:15:58 -06:00
Cat Stevens 4c96c9343c basis/math: add logn to math.functions (fix #1981) 2018-03-22 15:11:45 -07:00
Doug Coleman 9dbfc9351c math.functions: nan: -> NAN: oops 2017-12-28 00:43:51 -08:00
Doug Coleman 099549940a math.functions: disable a test. 2017-12-27 22:28:20 -08:00
Doug Coleman 0ac181c797 tools.test: Fix unit-test~ and a couple of tests. 2017-07-23 11:50:52 -05:00
Doug Coleman 62129ffea4 basis: Add unit-test~ and unit-test-v~ for testing floats.
Use unit-test~ in math.functions in some places to make sure we like it.
2017-07-22 18:47:59 -05:00
John Benediktsson c503659a93 math.functions: fix another test impacted by float truncate change. 2017-06-10 13:33:01 -07:00
John Benediktsson 57de1f5ab0 math.functions: make -0.3 truncate return 0.0 instead of -0.0. 2017-06-08 11:27:48 -07:00
Jon Harper 80e9d7c115 move math.extras:round-to-even to math.functions to use in basis:formatting
Also add round-to-odd in case it is needed.
Also change float rounding to be independent of the current rounding mode
2017-06-08 11:23:37 -07:00
Jon Harper 34f36a529e math.functions, speed up truncate for floats 2017-06-08 11:22:40 -07:00
Jon Harper c74cfe6c54 math.functions: fix truncate and round to output -0.0 for negative floats near 0 2017-06-08 11:22:40 -07:00
Jon Harper 271c7d9519 math.functions, fix round for ratios between -1/2 and -1
it was outputting 1 instead of -1
2017-06-08 11:22:40 -07:00
John Benediktsson c6fad4aa61 math.ratios: moving to core. 2015-07-30 10:31:00 -07:00
Doug Coleman 892c62e1dc factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test 2015-07-03 09:39:59 -07:00
Doug Coleman 59f3b1ea57 Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!"
Needs a bit more work.

This reverts commit 7e54cc2824.
2015-07-02 13:47:06 -07:00
Doug Coleman 7e54cc2824 factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool! 2015-07-02 11:36:08 -07:00
John Benediktsson 55b2fb0802 math.functions: implement ldexp. 2013-04-24 11:19:24 -07:00
John Benediktsson 360c2ee5a7 math.functions: remove round-to. 2013-04-01 17:02:44 -07:00
John Benediktsson 4c941e8996 math.functions: speed up round (thanks Loryn Jenkins!) 2013-03-26 14:22:21 -07:00
John Benediktsson 422ccf9901 math.functions: adding "round-to". 2013-01-30 09:41:21 -08:00
John Benediktsson d10fd71cb3 math.functions: implement copysign. 2012-06-01 08:24:35 -07:00
John Benediktsson 31c7bd8e86 math.functions: adding generalized signum function. Fixes #509. 2012-05-03 14:44:10 -07:00
Doug Coleman f6398365bd math.functions: rename exp to e^ to be consistent with 2^ and 10^. update things. 2012-05-02 10:22:23 -07:00
Doug Coleman fee4d76b73 math.functions: Add e^ and sigmoid functions. 2012-05-02 09:21:34 -07:00
John Benediktsson 7a15418cf4 math.functions: adding another test for roots. 2012-04-19 13:34:42 -07:00
John Benediktsson adc7b22997 math.functions: adding "roots" word to get arbitrary roots from numbers. 2012-04-19 12:19:14 -07:00
John Benediktsson 1e8eb18216 math.functions: adding docs and tests for ^mod. 2012-04-19 08:20:11 -07:00
Joe Groff 943596575a use radix literals 2011-11-23 19:03:40 -08:00
John Benediktsson cf54ce8e42 math.functions: when gcd is inlined, "gcd nip" is almost as good as "gcd*". 2011-10-18 10:30:39 -07:00
John Benediktsson ac98269f53 math.functions: faster gcd means faster ratios. 2011-10-17 20:36:28 -07:00
Joe Groff 954bf89c40 math.functions: clean up some more to trim back load-time dependencies; alter tests to avoid inexact float constants where possible and hex-ify inexact constants otherwise 2011-09-22 16:04:49 -07:00
John Benediktsson 90dbb84663 math.functions: test log with negative (really) bignums. 2011-09-22 11:15:06 -07:00
John Benediktsson 077ef8ed5b math.functions: implement "frexp" and support log of really big numbers. Fixes #160. 2011-09-22 09:42:28 -07:00
Joe Groff efe79cf6d3 math.functions: make sure zero zero ^ is always nan, regardless of the type of zero 2011-08-01 10:26:53 -07:00
Joe Groff fab5cbc6b9 fix float integer^ for denormal results 2009-11-01 00:43:04 -05:00
Slava Pestov 0a29e64287 math.functions: ~ now raises an invalid operation FP trap if one of the inputs is NaN 2009-09-29 23:41:08 -05:00
Slava Pestov fe0701deb1 math.functions: fix ~ with negative (relative) tolerance 2009-09-22 03:19:47 -05:00
Slava Pestov 4f702de449 math.functions: more accurate log10 (fixes problem reported by OneEyed) 2009-09-14 16:19:58 -05:00
Slava Pestov abedea0ccb math.functions: loosen tests up a bit since exp(1) on FreeBSD x86/64 differs from e in the last bit 2009-09-13 22:33:12 -05:00
Slava Pestov 7983b5515f math.functions: some fixes 2009-08-30 06:19:14 -05:00
Joe Groff a2640672d7 «0.0 1.0 ^» was returning 0 instead of 0.0 2009-06-11 17:47:52 -05:00
Slava Pestov e38e805015 math.functions: fix ^ for complex numbers 2009-05-31 23:28:29 -05:00
Joe Groff 2a00f10d1a lerp functions 2009-05-05 13:55:00 -05:00
Slava Pestov 0ffd43e2e3 1.0/0.0 => 1/0. 2009-04-13 19:48:08 -05:00
Aaron Schaefer c698a83a12 Add divisor? math function 2009-04-01 19:29:19 -04:00
Slava Pestov 127f9b3578 Add unit tests for bignum bug 2009-02-22 19:41:47 -06:00
Slava Pestov 34792a9f23 Remove >r/r> 2008-12-17 19:17:37 -06:00
Slava Pestov 4c0f2cc3f5 Move factor-2s from miller-rabin to math.functions; use it to make ^ more efficient 2008-11-11 11:30:47 -06:00
unknown cc7ab11881 Add more unit tests 2008-11-07 20:34:04 -06:00