Alexander Iljin
1cec145e46
math: fix stack effect declaration for the neg? generic
2016-07-30 09:25:30 -07:00
John Benediktsson
6b07e6caf2
math: rename fast-gcd to simple-gcd.
2016-03-19 12:20:09 -07:00
John Benediktsson
141f3c9e65
math: use "i/f" for stack effect.
2015-09-30 19:01:38 -07:00
John Benediktsson
e477f6996f
Fix comments to be ! not #!.
2015-09-08 16:15:10 -07:00
John Benediktsson
ceb75057da
change ERROR: words from throw-foo back to foo.
2015-08-13 16:13:05 -07:00
Doug Coleman
02008979d9
factor: Change ERROR: foo ; to define ``throw-foo`` instead of having ``foo`` throw implicitly. The old ``foo`` still throws implicitly because this is a big change to get right in one patch, but it should be removed soon.
2015-08-12 15:26:18 -05:00
John Benediktsson
c6fad4aa61
math.ratios: moving to core.
2015-07-30 10:31:00 -07:00
John Benediktsson
89e3cc511e
math: moving >fraction to math.
2015-07-19 16:57:45 -07:00
Doug Coleman
44e8e7b344
primitives: Change PRIMITIVE: to check that the word is in that vocabulary and the stack effect is correct.
...
Use PRIMITIVE: in core/ and basis/
2015-06-25 18:02:03 -07:00
John Benediktsson
24ad4e9424
math: remove out-of-fixnum-range error.
2014-06-07 09:50:50 -07:00
John Benediktsson
63514bbbf8
math: fix quot stack effect in unless-zero.
2014-01-07 08:25:18 -08:00
Doug Coleman
5a9e7cd374
classes.builtin: Add the BUILTIN: keyword which lets builtin classes show up in source files. Probably could use save-location to allow editing, but it seemed to break things.
2013-03-10 12:05:38 -07:00
John Benediktsson
ff95c17972
math: speed up (find-integer) and (all-integers?) by removing curry.
2013-03-04 17:32:11 -08:00
John Benediktsson
eaed0db99a
Revert "math: speed up integer>fixnum operations."
...
This reverts commit b467db9a9a
.
2012-09-16 07:46:22 -07:00
John Benediktsson
6ea9c0fc02
math: speed up integer>fixnum operations.
2012-09-15 08:52:06 -07:00
John Benediktsson
a4f264509d
math: cleaner "2/" speedup by using custom inlining.
2012-09-10 17:59:03 -07:00
John Benediktsson
36fb890be2
math: faster definition of 2/ (allows inlining of fixnum-shift-fast).
2012-09-10 17:20:31 -07:00
John Benediktsson
009fb4249e
math: faster recip for integers and ratios.
2012-09-02 09:47:31 -07:00
Doug Coleman
cd9dd9d752
core: Throw an error when assigning a bignum to a fixnum tuple slot if the bignum doesn't fit. Fixes #594 .
2012-08-03 14:59:59 -07:00
Doug Coleman
fb4e3ad9bc
compiler: Fix bitand on ratios, floats. Fix shift on ratios, floats. Add integer>fixnum. Fixes #500 .
2012-07-23 09:31:12 -07:00
John Benediktsson
4e72d80256
Using "same?" in more places.
2012-07-21 10:22:44 -07:00
Joe Groff
90f34d092c
math: neg? needs to be defined for all reals
2011-11-26 15:37:58 -08:00
Joe Groff
4e8a1d0bb4
math: add neg? word
...
Do the right thing with integers or floats
2011-11-23 19:51:05 -08:00
Joe Groff
943596575a
use radix literals
2011-11-23 19:03:40 -08:00
Doug Coleman
82a28a082b
Remove extraneous using from math/
2011-09-25 19:32:35 -07:00
John Benediktsson
3c1356bf69
Adding stack effects.
2011-09-23 17:46:40 -07:00
Slava Pestov
f27080498d
Remove bignum>float VM primitive, and use bignum/f to implement >float on bignums instead, for a slight accuracy gain. Also, bignum/f now has a more efficient post-scaling algorithm to break the circular dependency on bignum>float
2010-11-24 22:41:15 -08:00
Joe Groff
1196087991
math: declare quotation stack effects on each-integer, times, find-integer, all-integers?
2010-05-13 14:30:19 -07:00
Joe Groff
85f30987e2
spray some polymorphic stack effects on kernel, math, and sequences
2010-03-05 00:21:10 -08:00
Slava Pestov
0612bc6177
Factor source files should not be executable
2009-11-21 17:50:43 -06:00
Joe Groff
70ffa003ec
eliminate roll/-roll from core
2009-10-30 13:36:15 -05:00
Slava Pestov
32b95c2cdf
math: add unordered comparison operators u< u<= u> u>= which behave exactly like < <= > >= except no floating point exceptions are set if one or both inputs are NaNs; also add efficient intrinsic for unordered? predicate, and fix propagation type functions for abs, absq, and bitnot
2009-09-12 22:20:13 -05:00
Slava Pestov
11f984e734
math.floats: fix abs on floats; -0.0 abs should be 0.0 not -0.0
2009-09-12 16:24:07 -05:00
Joe Groff
14f412b404
add an "unordered?" predicate to math, with a dumb implementation for now
2009-09-10 23:45:18 -04:00
Slava Pestov
79cdc45339
math: move float methods to math.floats
2009-08-20 03:55:19 -05:00
Slava Pestov
030b1b816c
Add inline declarations for various assorted methods
2009-08-17 22:32:21 -05:00
Doug Coleman
7c92ab1ea5
move if-zero etc to math, remove 1-/1+ from math
2009-08-14 14:27:23 -05:00
Doug Coleman
686b3e348e
use ERROR: in several places instead of throwing strings
2009-08-11 23:09:02 -05:00
Joe Groff
c5d440700d
0.0 neg ought to be -0.0
2009-05-21 18:49:22 -05:00
Slava Pestov
4ee4357e75
Fix negative zero smashing with bootstrap
2009-05-09 18:17:30 -05:00
Joe Groff
9021062795
fp-nan? was defined incorrectly. while i'm here, let's add some more float manipulation words
2009-05-09 09:49:31 -05:00
Doug Coleman
0ad6d1fb7b
add a few usages of iota, remove most 1+ and 1- from core
2009-05-01 19:58:24 -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
Slava Pestov
1bbabcd5e1
Remove some usages of slip combinators from the core
2009-02-05 03:29:59 -06:00
Slava Pestov
669548e62e
Clean up some usages of tuck, and add Joe's curried cleave/spread/apply combinators to kernel vocabulary
2009-02-02 13:43:54 -06:00
Slava Pestov
058ba127cb
Cleaning up more -rot usages
2008-12-22 05:41:01 -06:00
Slava Pestov
0021cde743
Fix more compile errors
2008-12-15 22:21:56 -06:00
U-SLAVA-DFB8FF805\Slava
53db40ba13
Add more stack declarations
2008-12-13 05:06:28 -06:00
Slava Pestov
e4f8448eb1
Fix some problems with arithmetic type inference, exposed by recent changes to log2 word
...
- declared input type for bignum-shift was stricter than the runtime behavior, leading to bad propagation of type info if shift count was a bignum
- types inferred for type functions which used number-valued/integer-valued/real-valued were not always precise, eg bignum bignum bitxor => integer
- add interval-log2, type function for (log2)
- remove math-class-min, it was useless
2008-12-07 19:44:49 -06:00
Slava Pestov
8a8f0c925c
Use BSR instruction to implement fixnum-log2 intrinsic
2008-12-06 15:31:17 -06:00