Note: With this refactoring, `math/utils' no longer depends on `rackunit'.
* (flexp2 x) computes (flexpt 2.0 x) but in about 1/3 the time for integer
`x' using a lookup table. Written for exact argument reduction in `fllog2'
after discovering that (flexpt 2.0 x) was the main performance bottleneck.
* (fllog2 x) computes (/ (fllog x) (fllog 2.0)) with near perfect accuracy.
Invented an algorithm to compute it with at least 8 extra bits before
final rounding; quite pleased with the result. Needed `fllog2' to ensure
(fllogb 2.0 x) would be exact when `x' is a power of two.
* (fllogb b x) computes (/ (fllog x) (fllog b)) with better accuracy, and
also handles limit values in a way that's consistent with the mathematical
limits. When those are ambiguous, it's consistent with `flexpt', which
follows IEEE 754 and C99. Otherwise returns +nan.0. See docs for details.
* `bflogb' is currently just for testing `fllogb'.
* Refactored FPU testing and documented it. So far, the only documented way
to do it is by calling `test-floating-point', which runs a comprehensive
deterministic+randomized suite of tests and returns a list representing
failed tests. I'll document individual tests after I document flonum
expansions and result/error functions like `fl+/error'.
* Added `fllog2' and `fllogb' to the flonum tests.
renamed `partition-count' to `partitions' to be consistent with
`permutations', and gave better examples in `multinomial' docs
* (flulp-error +inf.0 +nan.0) was returning +nan.0 instead of +inf.0
* Type of `multinomial' didn't match its docs or `flmultinomial'
* Reworded docs for `diagonal-array'
* Reworked/reordered quite a few things in docs for `math/bigfloat'
* Fixed first identity given in `gamma-inc' docs
* Fixed descrption for `+max.0', etc.
Cleaned up other docs in preparation for alpha-testing announcement
Created `math/utils' module for stuff that doesn't go anywhere else (e.g.
FFT scaling convention, max-math-threads parameters)
Reduced the number of macros that expand to applications of `array-map'
Added `flvector-sum', defined `flsum' in terms of it
Reduced the number of pointwise `flvector', `flarray' and `fcarray' operations
Reworked `inline-build-flvector' and `inline-flvector-map' to be faster and
expand to less code in both typed and untyped Racket
Redefined conversions like `list->flvector' in terms of for loops (can do
it now that TR has working `for/flvector:', etc.)
clean up build
Moved `float-complex?' and `number->float-complex' to `math/base',
documented them
Documented `flexpt1p'
Removed `samples->immutable-hash' (not covariant anyway; not going to
use hashes)
Fixed a few limit cases in some distributions (e.g. (uniform-dist 0 0) didn't
act like a delta distribution, (beta-dist 0 0) and (beta-dist +inf.0 +inf.0)
pretended to be defined by unique limits even though they can't be)
Made integer distributions' pdfs return +nan.0 when given non-integers
Added "private/statistics/counting.rkt", for hashing and binning samples
Added `flvector-sums' (cumulative sums with single rounding error)
Added `flinteger?', `flnan?' and `flrational?', which are faster than their
non-flonum counterparts (at least in Typed Racket; haven't tested untyped)
Fixes after merge weirdness from pull request (specifically, removed `bfrandom' from "mpfr.rkt" again)
Removed dependence of math/flonum on math/bigfloat (better build parallelization)
Changed `divides?' to return #f when its first argument is 0
Made return type of `quadratic-character' more precise
Made argument types more permissive:
* second argument to `solve-chinese'
* second argument to `next-primes'
* second argument to `prev-primes'
in the original GitHub fork:
https://github.com/ntoronto/racket
Some things about this are known to be broken (most egregious is that the
array tests DO NOT RUN because of a problem in typed/rackunit), about half
has no coverage in the tests, and half has no documentation. Fixes and
docs are coming. This is committed now to allow others to find errors and
inconsistency in the things that appear to be working, and to give the
author a (rather incomplete) sense of closure.