d8e4354f22
maths: only enable util::limit for scalar types
...
this reduces conflicts with the coord limit operation.
2017-08-24 12:26:36 +10:00
046a369f55
coord: don't use kahan summation for sum(coord)
...
Our kahan summation algorithm has issues with infinities so we just
avoid using it in coordinates where speed and simplicity are more
important.
2017-06-16 17:38:55 +10:00
089caff53e
maths: take references for generic types in almost_equal
2017-06-13 14:18:53 +10:00
f50c77425d
maths: make almost_equal constexper for integers
2017-06-13 14:18:32 +10:00
da00e77e7e
maths: add signed overloads for renormalise
2017-05-24 15:15:25 +10:00
dca8b174c6
build: add forgotten clang/gcc7 headers
2017-05-16 17:12:14 +10:00
6f4bc6d6b2
maths: add is_nan for arbitrary types
2017-01-23 21:47:53 +11:00
5bb55f5437
maths: don't accidentally overload almost_equal
2017-01-23 21:47:30 +11:00
c4ca41d6c4
maths: make round_pow2 constexpr
2017-01-04 22:40:06 +11:00
0da8c189ec
maths: add linear mixing function
2016-12-21 20:23:43 +11:00
9a798446b5
build: remove unnecessary includes
...
discovered with include-what-you-use
2016-10-12 15:08:22 +11:00
9f3624ba3e
maths: add mod wrappers
2016-09-14 17:37:49 +10:00
3d5aff0f30
maths: use mult rather than negation in constexpr
...
util::digits was triggering signed overflow warnings under gcc. By using
negative multiplication rather than explicit negation we get the same
behaviour, sans warning.
2016-08-29 14:48:07 +10:00
277dfaafae
maths: add integer summation path for fsum
...
this allows us to simplify users of fsum which may not care what
value_type they're passing for summation
2016-08-15 20:56:10 +10:00
8cc4c1e82a
format: reimplement format rendering
...
requires literal string arrays, and implements more of the specifier
specification. does not implement 'n' or '$' specifiers. falls back to
snprintf for real arguments.
2016-07-28 13:39:27 +10:00
e71bd9f621
maths: move is_integer into headers to avoid param explosion
2016-05-12 17:34:47 +10:00
60286202fd
maths: make stirling inline rather than constexpr
...
stirling uses cmath functions which aren't constexpr, such as std::pow.
this sometimes works under linux/gcc but fails under clang/freebsd
2016-05-12 17:32:41 +10:00
2434424488
maths: explicitly inline small methods
...
Avoids multiply defined symbols when using more aggressive inlining
2016-04-27 15:57:05 +10:00
3a6faca98f
maths: use structured assertions in imit
2016-04-19 14:49:17 +10:00
8022d459e5
maths: add samesign convenience function
2016-02-03 13:56:40 +11:00
2224131955
debug: simplify CHECK macros for constexpr safety
2016-02-03 12:04:47 +11:00
c04c56ed32
maths: make is_pow2 constexpr
2016-02-02 11:32:29 +11:00
8e2c5f1942
maths: explanatory header for sign()
2015-11-16 17:57:53 +11:00
486cefc4c6
maths: move functions inline, remove ipp
2015-11-16 13:57:51 +11:00
eb2722bfa4
maths: style
2015-11-16 13:21:38 +11:00
791f8b2bcd
maths: remove rootsquare, use std::hypot instead
2015-11-16 13:18:29 +11:00
b1bc54ac8c
maths: move remaining operations into util namespace
2015-11-16 11:44:07 +11:00
5a26793b0a
maths: reduce template verbosity
2015-11-13 18:00:15 +11:00
b6a4166c68
maths: style
2015-11-13 17:25:21 +11:00
f2bd6501e2
maths: remove const/pure attributes
...
const/pure attributes are causing inconsitencies for various functions.
it's safer to just not use them until there's a more thorough
investigation of their impact.
2015-11-13 17:18:10 +11:00
89fe57b65b
maths: move more operations into util::
2015-11-13 17:18:10 +11:00
7b083df977
maths: tighten up type requirements for almost_equal
...
almost_equal only operates on two reals, or two integers (and even then
only on the same signedness).
2015-11-13 17:18:10 +11:00
c76e0716c4
maths: annotate with gnu::const where appropriate
2015-11-13 13:50:58 +11:00
02a42f282e
maths: use SFINAE for round_to instead of assert
2015-11-13 13:48:46 +11:00
cd58dc8cc3
maths: rename align as round_to
...
reduces confusion between pointer align, and number rounding
2015-11-13 13:48:46 +11:00
ac86ef3bd5
maths: fix hi-lo normalisation shift size
2015-10-29 18:22:46 +11:00
0369b16f73
maths: correct limit's assertion operator
2015-10-29 18:22:28 +11:00
4aeacc3a27
maths: make limit constexpr friendly
2015-10-29 10:51:43 +11:00
03efa074ab
maths: make limit constexpr
2015-10-20 16:54:15 +11:00
c2770a266b
maths: split normalise functions
2015-10-20 16:54:15 +11:00
36b4043faf
maths: add identity function
2015-10-19 17:06:52 +11:00
a342654ae1
maths: add namespaced wrappers
2015-10-06 15:21:48 +11:00
381da163e2
maths: style
2015-09-16 02:24:49 +10:00
95e5fc5834
maths: add namespaced wrapper for abs
2015-09-15 21:06:23 +10:00
3099e6be6c
maths: add kahan summation
2015-08-25 17:25:55 +10:00
0533e3caaf
maths: add gcd implementation
2015-07-13 16:30:54 +10:00
cd841acc7b
maths: style
2015-06-30 22:24:43 +10:00
eda46a9e7c
maths: ensure float types for to_{radians,degrees}
2015-06-04 14:38:12 +10:00
c052d7df4b
maths: use templated PI and E constants
2015-04-29 17:45:39 +10:00
2658b41ea1
relicence under Apache-2.0
2015-04-13 18:05:28 +10:00