| ??? 08/28/00 02:52 Read: times |
#4732 - RE: Floating Point Mathematics: |
Babar,
What are you trying to do in free floating point binary? Quick Intro: Any binary number may be a free floating point binary if you treat it as such: (we just cleaned the office carpets and everything is scattered - I couldn't find my calculator... excuse any errors as I did it in my head) 54h ==> 54h = 84decimal (bbbbbbbb.) 54h ==> 5.4h = 5.25 decimal (bbbb.bbbb) 54h ==> A.8h = 10.5 decimal (bbbbb.bbb) Depending upon where you infer the binary point (not really a "decimal point") to be. You need to remember some math rules about what happens to decimal points when you multiply, add, subtract, or divide. The integer portion of a binary number is represented as a position reserved power of 2 {2^0,2^1,2^2,2^3...}, the fractional portion is the completion of the series in the other direction: {2^-1,2^-2,2^-3} etc. Put simply, the fractional portions bits are 1/2, 1/4, 1/8, 1/16, 1/32 etc. When I took my MSCS classes, we took a class called "DISCRETE STRUCTURES" wherein we learned all sort of clever tricks including this realm. I'm dismayed to see assembly language programmers putting blind trust in math libraries and needlessly burdening themsleves with IEEE Floating Point notation because they don't want to drag their minds through that swamp. Its understandable. But like I said many times, mathematics is what embedded programmers, particularly those hiding in higher level compilers, do so poorly and that keeps me and my company in demand. :) Many point out that its more efficient to use existing libraries in blind faith, but my policy around here is 15% of our time should be spent experimenting and trying to find faster or more efficient processes. -Jay C. Box Reference: From my homepage bio: CS 5333 DISCRETE STRUCTURES =========================== Mathematical foundations of computer science. Logic, sets, relations, graphs and algebraic structures. Combinatorics and metrics for performance evaluation of algorithms. (It was a fascinating class but it could smoke your brains if it were any longer than our 2hr class length.) |
| Topic | Author | Date |
| Floating Point Mathematics: | 01/01/70 00:00 | |
| RE: Floating Point Mathematics: | 01/01/70 00:00 | |
| RE: Floating Point Mathematics: | 01/01/70 00:00 | |
| RE: Floating Point Mathematics: | 01/01/70 00:00 | |
| RE: Floating Point Mathematics: | 01/01/70 00:00 | |
RE: Floating Point Mathematics: | 01/01/70 00:00 |



