Greetings, I think some more math libraries would be great for JALLIB.
My two cents worth opinion follows: Perhaps it would be advisable to consider testability first -- ideally an automated self-test for 16F and 18F would be run often, especially when a new compiler comes out or a new release of the JALLIB itself. With a good test suite, I don't see where it matters if the implementation is in pure JAL, assembly, or a mix of both. I noticed on the JALV2 page that JALV2 has 'built-in' multiply and divide, but I have not really done much with it -- if we can do, say 24 or 32 bit signed and unsigned multiply, divide, addition and subtraction, already in pure JAL, that would see a great start towards a fixed point library. A practical application might be converting K-type thermocouple A/D readings to degrees C or F. William On Oct 22, 10:39 am, vasile surducan <[email protected]> wrote: > Hi all, > > I've played a little with this (and other) math collection on the old jal. > In my opinion at least the floating math will be much faster if code is kept > as much as possible in assembler. However, with this new jal I can't be sure > will be the same. Math is quite difficuld for debugging anyway. > > best wishes, > Vasile > > On 10/22/09, Rob Hamerling <[email protected]> wrote: > > > > > > > Joep, and others who replied, > > > I'll make a start with a math lib with only a few relatively simple > > functions. Then we can gradually expand it with more functionality. > > > Joep Suijs wrote: > > > > - I suggest we don't code in assembler for now. Get it working with JAL. > > > It's easly enough to concider porting to asm if someone runs into > > > perfomance problems. > > > OK (will translate existing functions in ASM to JAL). > > > > - iirc we have multiply, divide, add, subract with any size of integer. > > > I wonder however how often it is used, besides 8,16 and 32 bits. > > > I have not checked it, but will put it in a test set anyway. > > > > - You define functions like goniometric functions (sin, cos, tg, etc), > > > square root and other 'power' functions, logarithm (natural?). These are > > > all candidates imho. > > > I was afraid of that! ;-) > > It has been a long time since I had to work with these! > > > > - You also mention integer, fixed point and floating point. This would > > > suggest 3 versions of each function mentioned above (and for fixed point > > > and float, also for multiply, divide, add, subtract). > > > I thought of starting with integer arithmetic. We'll see if the others > > are really worth the effort if we cannot find examples of it. > > > > I think I have a partially funcitonal fixed point sine laying around > > > somewhere and recently created a integer-based quare root funtion (not > > > too accurate, but like the sine, optimised for my problem....) > > > Welcome! I've seen the PicList has a collection, mostly in ASM, but with > > explanations (Scott Dattalo seems to be guru). I'll collect and make a > > comparison to see what can be implemented quickly and reliably. > > > Regards, Rob. > > > -- > > Rob Hamerling, Vianen, NL (http://www.robh.nl/) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
