Age | Commit message (Collapse) | Author |
|
Without i686 we can remove some implementations for sqrt and round_to.
|
|
|
|
This patch adds the `USING_AK_GLOBALLY` macro which is enabled by
default, but can be overridden by build flags.
This is a step towards integrating Jakt and AK types.
|
|
|
|
These were incorrectly assumed to compile, but did indeed still have
a few issues.
|
|
These all require just a single instruction each, we only have to
differentiate between register prefixes accordingly.
|
|
Co-authored-by: Leon Albrecht <leon2002.la@gmail.com>
|
|
|
|
This fixes the lagom build on aarch64, as `__builtin_sincosf` doesn't
take double arguments.
|
|
This fixes the build on M1 Macs.
|
|
|
|
This uses the `fistp` and `cvts[sd]2si` respectively, to potentially
round floating point values with just one instruction.
This falls back to `llrint[fl]?` on aarch64 for now.
|
|
|
|
|
|
|
|
Calculating sin and cos at once is quite a bit cheaper than calculating
them individually.
x87 has even a dedicated instruction for it: `fsincos`.
|
|
This allows Lagom to be built successfully for Apple M1.
Fixes #12644.
|
|
|
|
For a `N` bit integer X, the log2 calculation should be as follows:
(N - 1) - ctz(X)
|
|
In order to reduce our reliance on __builtin_{ffs, clz, ctz, popcount},
this commit removes all calls to these functions and replaces them with
the equivalent functions in AK/BuiltinWrappers.h.
|
|
This is a naive implementation based on the symmetry with `asin`.
Before, I'm not really sure what we were doing, but it was returning
wildly incorrect results.
|
|
On x86, the `fprem` and `fmprem1` instructions may produce a 'partial
remainder', for which we should check by reading a FPU flag. If we don't
check for it, we may end up using values that are outside the expected
range of values.
|
|
This is to implement constexpr template based implementations for
mathematical functions
This also changes math.cpp to use these implementations.
Also adds a fastpath for floating point trucation for values smaller
than the signed 64 bit limit.
|