Replies: 2 comments 3 replies
-
|
Templates offer flexibility, but at the cost of making APIs (and compiler warnings) so much more difficult to deal with. I definitely fell out of love with them some time ago. I really like the idea of typedefing via conditional compilation: I can work on this, because I'll need to add this to the unit testing also (hopefully all the standard lib function overloads will handle floats OK). I should have something by the weekend... |
Beta Was this translation helpful? Give feedback.
-
|
This is available in the latest build now. Define Let me know if this is a good solution for your environment and I'll mention that as a recommendation for embedded systems in the manual. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I will be using tinyexpr-plusplus in an embedded solution on a ARM Cortex M0+ (RP2040) Microcontroller without hardware FPU, and I imagine using
floatrather thandoubleinternally intinyexpr-pluspluswould provide quite a bit of a performance improvement.What would be the best way to make
tinyexpr-plusplususefloatrather thandoubleas the internal (and external) data type?As I see it, there are two workable paths for such a change
typedeftemplateargument in the te classesWhile using a
templateargument would be the most "pure" C++ solution, usingtypedefwould likely be the least invasive – and most backward compatible – approach.If I go ahead and ...
doublewithte_type/Texcercise... would there be any chance to have this change accepted as a pull request back into
tinyexpr-plusplusso I dont have to keep tracking upstream changes and make similar type-changes to any new code?Beta Was this translation helpful? Give feedback.
All reactions