DatasheetsPDF.com

AN575

Microchip Technology

IEEE 754 Compliant Floating-Point Routines

www.DataSheet.co.kr IEEE 754 Compliant Floating-Point Routines AN575 IEEE 754 Compliant Floating-Point Routines Author...


Microchip Technology

AN575

File Download Download AN575 Datasheet


Description
www.DataSheet.co.kr IEEE 754 Compliant Floating-Point Routines AN575 IEEE 754 Compliant Floating-Point Routines Author: Frank Testa INTRODUCTION This application note presents an implementation of the following floating point math routines for the PIC16/17 microcontroller family: INTxx( A ) float to integer conversion FLOxx( A ) NRMxx( A ) FPAxx( A , B ) FPMxx( A , B ) FPDxx( A , B ) integer to float conversion normalize add/subtract multiply divide Decimal 1.0 0.15625 0.1 1.23x10 3 Using biased exponents permits comparison of exponents through a simple unsigned comparator, and further results in a unique representation of zero given by f = eb = 0. Algorithms for radix conversion are discussed in APPENDIX A, and can be used to produce the binary floating point representation of a given decimal number. Examples of sign-magnitude floating point representations of some decimal numbers are as follows: e 1 -2 -3 11 f .10000000 .10100000 .110011001100.... .10011001110 Routines for the PIC16/17 families are provided in a modified IEEE754 32 bit format together with versions in 24-bit truncated format. 5 FLOATING POINT ARITHMETIC Although fixed point arithmetic can usually be employed in many numerical problems through the use of proper scaling techniques, this approach can become complicated and sometimes result in less efficient code than is possible using floating point methods[1]. Floating point arithmetic is essentially equivalent to arithmetic in scientific notation rel...




Similar Datasheet




@ 2014 :: Datasheetspdf.com :: Semiconductors datasheet search & download site. (Privacy Policy & Contact)