Commit Graph

64 Commits (fda12a99723c8c0854c8ea5f7e0b7da845432343)

Author SHA1 Message Date
John Benediktsson fda12a9972 math.functions: adding generalized signum function. Fixes #509. 2012-05-03 14:44:10 -07:00
Doug Coleman 9a125e82e9 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 4338db58a4 math.functions: Add e^ and sigmoid functions. 2012-05-02 09:21:34 -07:00
John Benediktsson 13a4e3f2a8 math.functions: adding "roots" word to get arbitrary roots from numbers. 2012-04-19 12:19:14 -07:00
John Benediktsson c8e2bd63a4 Revert "math.functions: simpler without "simple-gcd"."
This reverts commit aa7f60ebbc.
2012-04-05 10:34:50 -07:00
John Benediktsson aa7f60ebbc math.functions: simpler without "simple-gcd". 2012-04-05 10:31:46 -07:00
John Benediktsson 1b8f1d9945 math: adding a fast-gcd that speeds up all ratio operations by up to 10 times for bignum ratios. 2012-04-05 09:17:52 -07:00
Joe Groff eee483654a use radix literals 2011-11-23 19:03:40 -08:00
Doug Coleman dde0599353 math.functions: flushable and foldable don't do anything on inline words because flushable and foldable work on call sites (#call nodes), and inlined words are inlined into another word's call site; they don't generate their own #call node. 2011-11-06 19:25:53 -08:00
John Benediktsson 599f08f05d math.functions: when gcd is inlined, "gcd nip" is almost as good as "gcd*". 2011-10-18 10:30:39 -07:00
John Benediktsson 046f2b7d9c math.functions: improve stack effect names for gcd*. 2011-10-17 20:37:36 -07:00
John Benediktsson 302cd52c74 math.functions: faster gcd means faster ratios. 2011-10-17 20:36:28 -07:00
Joe Groff 1d9f30b4bf 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 09800a3c55 math.functions: inline 'on-bits' per Joe Groff's suggestion. 2011-09-22 13:44:30 -07:00
John Benediktsson a2e3ef14b3 math.functions: rename 'bignum-log-helper'. 2011-09-22 12:38:33 -07:00
John Benediktsson 2513fd8fd5 math.functions: duplicate on-bits to avoid circular dependency on math.bitwise. 2011-09-22 12:23:16 -07:00
John Benediktsson 95ff94585e math.functions: add forgotten imports and fix between? check. 2011-09-22 10:00:22 -07:00
John Benediktsson 621c1c37a5 math.functions: implement "frexp" and support log of really big numbers. Fixes #160. 2011-09-22 09:42:28 -07:00
Joe Groff cd8f63c8bc math.functions: make sure zero zero ^ is always nan, regardless of the type of zero 2011-08-01 10:26:53 -07:00
Slava Pestov 1563fbcd70 math.functions: clean up 2010-02-10 15:04:58 +13:00
Slava Pestov 27592b27c7 math.functions: fix memory protection error if exp called on a complex number with a rational real part (reported by prunedtree) 2010-01-15 08:23:48 +13:00
Joe Groff f1ed3b1787 fix float integer^ for denormal results 2009-11-01 00:43:04 -05:00
Doug Coleman 897ef1aa62 move nth-root to math.functions, use exchange-unsafe in math.statistics 2009-10-30 02:35:51 -05:00
Slava Pestov f1ce5ca191 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 3a4465f6ae math.functions: fix ~ with negative (relative) tolerance 2009-09-22 03:19:47 -05:00
Slava Pestov 1b5614f974 math.functions: more accurate log10 (fixes problem reported by OneEyed) 2009-09-14 16:19:58 -05:00
Joe Groff c31791d470 log1+ word (maps to C99 log1p function) 2009-09-11 20:28:15 -05:00
Slava Pestov c19ec4b8ec math.functions: some fixes 2009-08-30 06:19:14 -05:00
Slava Pestov bee6fa641e Add inline declarations for various assorted methods 2009-08-17 22:32:21 -05:00
Doug Coleman aa71f27094 add docs for if-zero etc, add docs for 10^ 2009-08-11 18:45:01 -05:00
Doug Coleman e1bdd33156 use if-zero in a few more places 2009-08-11 18:15:53 -05:00
Doug Coleman 9e0caf641b add 10^ to math.functions and update usages 2009-08-11 18:00:24 -05:00
Joe Groff c58a302d7e give range models a step parameter; use it on sliders so the thumb can step by any interval 2009-06-18 20:57:02 -05:00
Joe Groff ed10661c30 «0.0 1.0 ^» was returning 0 instead of 0.0 2009-06-11 17:47:52 -05:00
Slava Pestov 921de6ba3f math.functions: fix ^ for complex numbers 2009-05-31 23:28:29 -05:00
Joe Groff 15bc3625e8 Merge branch 'master' of git://factorcode.org/git/factor 2009-05-06 13:23:05 -05:00
Joe Groff 58fd3a415f make ^n foldable 2009-05-06 12:36:34 -05:00
Doug Coleman c2fe62f7d6 remove 1-, 1+, use iota somewhere 2009-05-05 23:32:23 -05:00
Joe Groff ca0c8937ca lerp functions 2009-05-05 13:55:00 -05:00
Slava Pestov fc4894fbdf Replace ratio and complex built-in types with tuples defined in the library. This frees up two lo-tags, so move array and quotation over to these tags and update compiler for new tags 2009-04-30 00:27:35 -05:00
sheeple a4e62dfdba Fix for math.parser syntax change 2009-04-13 14:47:39 -05:00
Doug Coleman 7e0f271cf3 fix typo in docs 2009-04-02 17:00:29 -05:00
Aaron Schaefer c698a83a12 Add divisor? math function 2009-04-01 19:29:19 -04:00
Slava Pestov 25a877e50b Merge OneEyed's patch 2009-02-28 17:06:55 -06:00
Slava Pestov 78ce670101 Merge branch 'for-slava' of git://git.rfc1149.net/factor 2009-02-28 14:42:56 -06:00
Slava Pestov 91d0c4ed1f Fix conflict 2009-02-22 20:02:13 -06:00
Daniel Ehrenberg 70d931d0b2 Creating math.bits 2009-02-20 20:14:54 -06:00
Slava Pestov 15b5d696c1 Merge branch 'master' into new_ui 2009-02-19 18:25:59 -06:00
Jason Merrill 90b6b38fd1 Changed math.dual to define words as dword instead of overloading generic words on dual numbers. 2009-02-19 18:49:13 -05:00
Slava Pestov 5e19766330 Fix conflict 2009-02-18 22:20:05 -06:00