| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
typechecking and easier debugging.
Made 32-bit division slightly more accurate and added a TODO comment to make it as accurate as the 64-bit division.
|
| |
|
|
| |
0.00065% (rather than 0.0035%) by multiplying by the reciprocal rather than using a divide algorithm.
|
| |
|
|
|
| |
and very slow (750% of float) but it does work.
Changed tan to be saturated (i.e. tan(pi/4) = fix16_max rather than divide by zero error), may revert or implement as stan later.
|
| |
|
| |
Implemented multiplication and signed multiplication in 32-bit.
|
| |
|
|
|
|
| |
lookup table implementation tends to run at about 33-36% of the speed of sinf on my machine (Intel T5500).
Fixed a bug in the sin lut code so that the results are always accurate.
Changed fixsingen tool to generate tables correctly for the new implementation.
|
| |
|
|
|
|
| |
and most accurate results.
Added tool to generate sin tables.
Tests indicate that using a lut is still ~2.1% out from sinf so it's very possible that our sin function is more accurate than the libmath sinf function on the computer I'm testing with. In which case the accuracy results are offset by that amount.
|
| |
|
|
|
| |
speed gain of 159%. The accuracy of the standard implementation is ~2.1% while this is ~2.3%.
This can be enabled using the FIXMATH_FAST_SIN macro.
|
| | |
|
| |
|
|
|
| |
if anyone can optimize this better then go ahead.
Modified fixtest to be a little more generic, can now easily change which function it tests.
|
| |
|
|
|
| |
the compiler which should make optimized functions much more readable.
Implemented FIXMATH_NO_ROUNDING in all multiplication and division functions too, it should now work for all functions in the library and allow for a choice between speed and accuracy on different projects.
|
| |
|
|
| |
Added FIXMATH_NO_ROUNDING macro to disable rounding, currently only applies to fix16_atan but will change to apply this to other operations (namely mul/div) too.
Changed optimization options for rel build in code::blocks project.
|
| |
|
|
|
| |
x86 with an FPU and full optimization fixed point is about 20% slower than floating point.
The multi-pass approach means that this test should run unmodified on embedded environments due to lower memory usage, this test also more realistically tests for cache behaviour.
|
| | |
|
| |
|
|
|
| |
real value for error is between 0.0060% and 0.0085%.
Changed default values to more sensible ones, though iter will need to be lowered if run on an embedded environment.
|
| |
|
|
|
|
|
|
| |
average error on x86 platforms, currently it produces quite wildly varying results depending on the input values.
The average error seems to vary between 3-8%, it's possible that setting iter to a higher value (and pass to a lower one) could give a more stable value.
Fixed point seems to be slower overall on x86 (50% of float) with good floating point hardware, however with the caching enabled depending on the program the fixed point implementation may be much faster (as float would be if cached).
With caching enabled there is a massive difference between and iter size below and above 4096, this is because the caching mechanism thrashes above this threshold, it probably makes sense to disable caching for these tests by compiling libfixmath with FIXMATH_NO_CACHE.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
algorithm so that it now works correctly over the full range of fixed point numbers and should be much faster too.
|
| |
|
|
| |
Added a macro (FIXMATH_NO_CACHE) to disable caching.
Added fix16_lerp8 and fix16_lerp32 (should be part of fract module really).
|
| |
|
|
| |
optimization purposes.
|
| | |
|
| | |
|
|
|
been separated into more descriptive files/modules.
|