Commit Graph

  • c59675818b Fixed issue 12 in fix16_div when FIXMATH_NO_64BIT defined vincent.del.medico 2011-06-10 13:49:11 +0000
  • 5248e45183 Faster atan2 algorithm (about twice faster), same precision vincent.del.medico 2011-06-09 12:32:50 +0000
  • 716d5fa179 Added a new algo for sin() function, and a small error analysis to show the precision differences vincent.del.medico 2011-06-08 22:46:14 +0000
  • b2e8a96e21 Fixed some compiler errors in int64.h. Fixed and tested ARM assembler version of fix16_mul. Flatmush 2011-03-16 10:56:29 +0000
  • 39d1029807 Changed the #if defined to __thumb2__ did not test a compile joe.schaack 2011-03-15 15:48:46 +0000
  • 8f01005d11 Fixed assembler error in fix16_mul, had used 'or' instead of the correct 'orr' mnemonic. Flatmush 2011-03-14 21:02:43 +0000
  • ccf378f1e0 Fixed a dumb mistake in compilation macros which meant that fix16_mul didn't correctly compile for a certain mix of ARM and Thumb macros. Flatmush 2011-03-14 20:57:36 +0000
  • e83267f757 Changed ARM fix16_mul to be disabled for thumb. Flatmush 2011-03-13 18:39:26 +0000
  • 98bbaf3b17 Added ARM specific fix16_mul which should be faster, this is untested however so if somebody with an ARM target could compile and check it then I'd be greatful. flatmush 2011-03-04 12:42:58 +0000
  • 5fd33d1f98 Updated lerp6 and lerp16 (LinEar inteRPolation) to use the new int64 header so that it can be used with FIXMATH_NO_64BIT. Included "int64.h" in "fixmath.h" so that 64-bit integer support is now part of the libraries functionality. flatmush 2011-03-03 11:51:10 +0000
  • cc1e97463e Added int64.h which performs 64-bit calculations using 32-bit operations, this means that the FIXMATH_NO_64BIT macro can now be used to enable these operations on compilers without 64-bit support, note that some of these operations are slower than the built-in gcc ones (though some are faster too). sqrt can now be compiled without 64-bit compiler support. All remaining functions which aren't supported in 32-bit are now disabled when the FIXMATH_NO_64BIT macro is enable which should stop any compiler errors on compilers where 64-bit isn't supported. flatmush 2011-03-03 11:21:20 +0000
  • 88b4ee4c0e I assume you mean to subtract the two for the ssub function... joe.schaack 2011-03-02 19:56:20 +0000
  • e8ab51042b Added fix16_add, fix16_sub, fix16_ssub as static inline functions. Updated C++ interface to include saturated operators. flatmush 2011-03-02 16:33:28 +0000
  • 62eb1059a5 Updated C++ interface slightly, to make it more coherent. flatmush 2011-03-02 14:21:26 +0000
  • 46cb5cd8df Added C++ class interface. Optimized rounding on 32-bit divide function. flatmush 2011-03-02 12:58:08 +0000
  • 359ed66670 Edited wiki page Trig_Math through web user interface. Flatmush 2011-03-01 16:00:53 +0000
  • 324ae1684e Updated code::blocks project file to compile optimized release by default. flatmush 2011-03-01 15:34:50 +0000
  • 9c8a4f9aa9 Updated 32-bit division so it's now actually accurate to within 0.00065% even for non-reciprocals, the algorithm is slightly slower and slightly less accurate than the 64-bit version on my machine though. Added 32-bit tan port using joe's atan2_complex algorithm, this is accurate to 0.0055% when used with the new 32-bit divide. flatmush 2011-03-01 15:26:37 +0000
  • 577a41ec50 Edited wiki page Trig_Math through web user interface. joe.schaack 2011-03-01 04:09:51 +0000
  • ed9401264c Added some more images for the wiki joeschaack 2011-03-01 04:07:24 +0000
  • d5a2503cc9 Added a bunch of info regarding the trig stuff joe.schaack 2011-03-01 03:33:02 +0000
  • 629239496d Added the image in the correct place joeschaack 2011-03-01 02:09:45 +0000
  • 20fd47bb85 Added the first image for the wiki documentation joeschaack 2011-03-01 02:06:37 +0000
  • b87b87485e Created wiki page through web user interface. joe.schaack 2011-03-01 01:45:38 +0000
  • caabb05333 Replaced all macros with static inline functions and static consts for 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. flatmush 2011-02-28 15:49:51 +0000
  • 047ab9fba0 Updated 32-bit divide, gained 1600% speed increase and an accuracy of 0.00065% (rather than 0.0035%) by multiplying by the reciprocal rather than using a divide algorithm. flatmush 2011-02-28 15:04:50 +0000
  • ae58c98283 Added 32-bit division option, it is less accurate (inaccuracy of ~0.0035%) 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. flatmush 2011-02-28 11:24:38 +0000
  • 8737eb5fe2 Added FIXMATH_NO_64BIT macro. Implemented multiplication and signed multiplication in 32-bit. flatmush 2011-02-28 09:59:36 +0000
  • 5dd63f37ce Updated sin lut to use ~200KiB for it's table with the same accuracy, the 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. flatmush 2011-02-25 16:07:39 +0000
  • 0317f964f4 Added option to replace sin function with ~384KiB look-up table for fastest 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. flatmush 2011-02-25 15:32:23 +0000
  • 0ecfa08dc3 Added a new faster version of the sin function, it loses 0.2% accuracy for a 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. flatmush 2011-02-25 13:37:37 +0000
  • 10c82e1c17 Fixed a minor error in previous commit where the wrong function name is printed. flatmush 2011-02-25 12:09:55 +0000
  • 8cbe9b3f9b Added fix16_exp currently using the Taylor Series algorithm off Wikipedia, 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. flatmush 2011-02-25 12:08:03 +0000
  • 7c2852e7f6 Changed conversion functions to macros so that they can be optimized out by 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. Flatmush 2011-02-24 20:04:55 +0000
  • d829f83d31 Updated fix16_atan, now removes some un-necessary code. 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. flatmush 2011-02-24 17:18:08 +0000
  • 3fc97475e1 Added multi-pass approach to fixtest, now produces more accurate results. On 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. flatmush 2011-02-24 17:13:30 +0000
  • a9ff155dcc Minor fix regarding printf format in fixtest. flatmush 2011-02-24 16:57:54 +0000
  • edce6d699e Fixed an obvious bug, error was reported at 65536 times the correct value, 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. flatmush 2011-02-24 16:48:57 +0000
  • d3482256c2 Added a small program called fixtest which currently tests performance and 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). flatmush 2011-02-24 16:23:50 +0000
  • 0e06a1e8b7 Edited wiki page Microcontroller_Usage through web user interface. Flatmush 2011-02-24 13:43:47 +0000
  • b3cdf32f8d Edited wiki page Microcontroller_Usage through web user interface. joe.schaack 2011-02-24 02:34:23 +0000
  • 14492d6692 Created wiki page through web user interface. joe.schaack 2011-02-24 02:32:03 +0000
  • f5cb74ab2e Added an optimized and improved implementation of joe's fixed point atan2 algorithm so that it now works correctly over the full range of fixed point numbers and should be much faster too. flatmush 2011-02-23 17:07:17 +0000
  • 5d939700e8 Fixed errors in asin/atan, where incorrect integer maths was used. Added a macro (FIXMATH_NO_CACHE) to disable caching. Added fix16_lerp8 and fix16_lerp32 (should be part of fract module really). flatmush 2011-02-23 09:47:08 +0000
  • e06f826388 Changed consts such as e, pi, one to macros as suggested by mth for compiler optimization purposes. Flatmush 2011-02-14 21:53:27 +0000
  • 87c75fa880 Updated code::blocks project file. Flatmush 2011-02-14 21:02:23 +0000
  • 75076642f5 Deleted objects and compiled files which should never have been uploaded. Flatmush 2011-02-14 21:00:45 +0000
  • 3420855dc0 Initial commit. Since its use in fgl and the Dingoo SDK the functions have been separated into more descriptive files/modules. Flatmush 2011-02-14 20:59:41 +0000