ID: SANDBOX-0010
STATUS: 90% complete
AUTHOR: Anna Ceguerra
DATE: 11 August 2010
Copyright © 2010 Anna Ceguerra
This is an implementation of a (non-standard) half-floating point library. It has the mathematical operations of add, subtract, multiply, divide, sqrt, round, log, trig, compare & various print functions. It is not complete as I have been unable to implement pow, exp and antilog (though I had tried my best, I couldn't get it to work).
Compiled with the main method, it takes up just over 4900 bytes, on Picaso GFX2. You can remove the main method and try to make it into a library, with sections that you can conditionally compile with your code.
Attached in the zip file is an introduction, the 4DGL code, and the answers to the test cases in the main method.
Hopefully this will fill in the gap for those who need a half-floating point implementation for Picaso based smart displays.
'Til next time!
Regards,
Anna.
P.S. I have just reattached the .zip file to include the code that works on Goldelox - make sure you comment out line 2 of the .4dg file. Enjoy!
A.C.
P.P.S. Thanks to Dave for pointing out how to avoid commenting out line 2 - Version 0.4.4 should do it. No commenting out necessary.
A.C.
Attached files half_floatingpoint_v0_4_4.4dg (24.5 KB) SANDBOX-0011_halffloat.zip (177.7 KB)
STATUS: 90% complete
AUTHOR: Anna Ceguerra
DATE: 11 August 2010
Copyright © 2010 Anna Ceguerra
This is an implementation of a (non-standard) half-floating point library. It has the mathematical operations of add, subtract, multiply, divide, sqrt, round, log, trig, compare & various print functions. It is not complete as I have been unable to implement pow, exp and antilog (though I had tried my best, I couldn't get it to work).
Compiled with the main method, it takes up just over 4900 bytes, on Picaso GFX2. You can remove the main method and try to make it into a library, with sections that you can conditionally compile with your code.
Attached in the zip file is an introduction, the 4DGL code, and the answers to the test cases in the main method.
Hopefully this will fill in the gap for those who need a half-floating point implementation for Picaso based smart displays.
'Til next time!
Regards,
Anna.
P.S. I have just reattached the .zip file to include the code that works on Goldelox - make sure you comment out line 2 of the .4dg file. Enjoy!
A.C.
P.P.S. Thanks to Dave for pointing out how to avoid commenting out line 2 - Version 0.4.4 should do it. No commenting out necessary.
A.C.
Attached files half_floatingpoint_v0_4_4.4dg (24.5 KB) SANDBOX-0011_halffloat.zip (177.7 KB)
Comment