Click to expand full text
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.