Where can I find the class and package downloads.
javelin nuby
Posts: 27
I lost the link for the Javalin classes and packages.
Specifically I need to do some "floating point" math for scaling my inputs and unit conversion.
Does anyone know where I can download such?
Specifically I need to do some "floating point" math for scaling my inputs and unit conversion.
Does anyone know where I can download such?
Comments
I tried to multiply by 148 and divide by 100 but that does'nt work because of divide is only working on 1 word.
Is there a way to create two words with the Mult. then divide these two words by 100(so that I'm back to one word?
Maybe somthing like a Double Multiply and Double Divide in PLC programming?
http://tech.groups.yahoo.com/group/JavelinCode/files/Javelin%20Stamp%20IDE/lib/stamp/math/
int result = value + UnsignedIntMath.umulf(value,31457); //31457 = 0.48*65536
But in this case you could do without the class
1.48 * value = value + ((12*value)/25);
For a rounded result you can use
int result·= value + ((24*value + 25)/50);
regards peter
Post Edited (Peter Verkaik) : 9/20/2009 11:10:19 AM GMT