[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-561821-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-561821-en":131,"doc-similar-561821":217},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","an575-ieee-754-compliant-floating-point-routines","AN575 - IEEE 754 Compliant Floating Point Routines","","AN575 describes IEEE 754 compliant floating-point arithmetic routines implemented for PICmicro microcontroller families. It covers float-to-integer and integer-to-float conversion, normalization, addition/subtraction, multiplication, and division, including variants in a modified 32-bit IEEE 754 format and reduced 24-bit format. The note explains floating-point representation details, biased exponents, fraction/mantissa normalization conventions, and how rounding methods handle truncation bias using guard-bit strategies for higher precision.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/an575-ieee-754-compliant-floating-point-routines/561821/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/an575-ieee-754-compliant-floating-point-routines/561821.png","ImageObject",300,407,{"name":42,"@type":43},"Blitz","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-12","2026-10-12",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",14,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"Which floating-point operations are implemented in AN575 for PICmicro controllers?","Question",{"text":63,"@type":64},"The note provides routines for float to integer conversion, integer to float conversion, normalization, add/subtract, multiply, and divide.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does AN575 describe the biased exponent and exponent range for IEEE 754 compliance?",{"text":68,"@type":64},"It discusses biased exponent encoding, including how the bias is adjusted to create a final slot for infinity, and states an exponent range of -126 ≤ e ≤ 128 given the implementation choice.",{"name":70,"@type":61,"acceptedAnswer":71},"What rounding approaches does AN575 use to reduce truncation error?",{"text":72,"@type":64},"It contrasts truncation and adder-based rounding, then explains IEEE 754 nearest-even rounding using guard bits (and a less sensitive single-guard-bit method for the PIC16 implementation), noting that a sticky bit is not used in this implementation.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},561821,1791843692,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,110,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":146,"preview_page_count":147,"preview_urls":148},24464137899374,"https://us-avatar.wpscdn.com/davatar_3d24733baf745e90a7e4bdd5f77d97b2","M  \nAN575  \nIEEE 754 Compliant Floating Point Routines  \nAuthor: Frank J. Testa FJT Consulting  \nINTRODUCTION  \nThis application note presents an implementation of the following ﬂoating point math routines for the PICmicro􀃤 microcontroller families:  \n• ﬂoat to integer conversion  \n• integer to ﬂoat conversion  \n• normalize  \n• add/subtract  \n• multiply  \n• divide  \nRoutines for the PIC16/17 families are provided in a modiﬁed IEEE 754 32-bit format together with versions in 24-bit reduced format.  \nA Glossary of terms is located on page 8.  \nFLOATING POINT ARITHMETIC  \nAlthough ﬁxed 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 efﬁcient code than is possible using ﬂoating point methods[1] . Floating point arithmetic is essentially equivalent to arithmetic in scientiﬁc notation relative toa particular base or radix.  \nThe base used in an implementation of ﬂoating point arithmetic is distinct from the base associated with a particular computing system. For example, the IBM System/360 is a binary computer with a hexadecimal or base-16 ﬂoating point representation, whereas the VAX together with most contemporary microcomputers are binary machines with base-2 ﬂoating point implementations. Before the establishment of the IEEE 754 ﬂoating point standard, base-2 ﬂoating point numbers were typically represented in the form  \nA = (–1)sf ⋅ 2e,  \nn – 1  \nf = ∑ a( k) ⋅ 2–( k + 1) , k = 0  \nwhere f is the fraction or mantissa, e is the exponent or characteristic, n is the number of bits inf and a(k) is the bit value where, k = 0 ,.., n-1 number with a(0) = MSb, and s is the sign bit. The fraction was in normalized sign-magnitude representation with implicit MSb equal to one, and e was stored in biased form, where the bias was the magnitude of the most negative possible exponent[1,2], leading to a biased exponent eb in the form  \neb = e + 2m – 1,  \nwhere m is the number of bits in the exponent. The fractionf then satisﬁes the inequality  \n0.˙5 ≤ f \u003C 1.  \nFinalization of the IEEE 754 standard[4] deviated from these conventions on several points. First, the radix point was located to the right of the MSb, yielding the representation  \nA = (–1)sf ⋅ 2e,  \nn – 1  \nf = ∑ a( k) ⋅ 2–k,  \nk = 0  \nwith f satisfying the bounds given by 1 ≤ f \u003C 2. . In order to accommodate a slot in the biased exponent format for representations of inﬁnity to implement exact inﬁnity arithmetic, the bias was reduced by one, yielding the biased exponent eb given by  \neb = e + 2m – 1 – 1 .  \nIn the case of single precision with m = 8 , this results ina bias of 127. The use of 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. Since our ﬂoating point implementation will not include exact inﬁnity arithmetic  \n􀃓 1997 Microchip Technology Inc. DS00575B-page 1  \nAN575  \nat this time, we use the IEEE 754 bias but allow the representation of the exponent to extend into this ﬁnal slot, resulting in the range of exponents  \n–126 ≤ e ≤ 128.  \nAlgorithms for radix conversion are discussed in Appendix A, and can be used to produce the binary ﬂoating point representation of a given decimal number. Examples of sign-magnitude ﬂoating point representations of some decimal numbers are as follows:  \n\n| Decimal | e | f |\n| --- | --- | --- |\n| 1.0 | 0 | 1.0000000 |\n| 0.15625 | -3 | 1.0100000 |\n| 0.1 | -4 | 1.10011001100.... |\n| 1.23x10**3 | 10 | 1.0011001110 |\n\nIt is important to note that the only numbers that can be represented exactly in binary arithmetic are those which are sums of powers of two, resulting in nonterminating binary representations of some simple decimal numbers such as 0.1 as shown above, and leading to truncation errors regardless of the value of n. Floating point calculations, even involving numbers admitting an exact binary rep","cbCaitJaxChlui6P","https://ap.wps.com/l/cbCaitJaxChlui6P","pdf",804119,151,"English","# Introduction\n# Floating Point Arithmetic\n## Floating-point representation and exponents\n# Rounding Methods\n## Truncation bias and nearest-even rounding","[{\"question\":\"Which floating-point operations are implemented in AN575 for PICmicro controllers?\",\"answer\":\"The note provides routines for float to integer conversion, integer to float conversion, normalization, add/subtract, multiply, and divide.\"},{\"question\":\"How does AN575 describe the biased exponent and exponent range for IEEE 754 compliance?\",\"answer\":\"It discusses biased exponent encoding, including how the bias is adjusted to create a final slot for infinity, and states an exponent range of -126 ≤ e ≤ 128 given the implementation choice.\"},{\"question\":\"What rounding approaches does AN575 use to reduce truncation error?\",\"answer\":\"It contrasts truncation and adder-based rounding, then explains IEEE 754 nearest-even rounding using guard bits (and a less sensitive single-guard-bit method for the PIC16 implementation), noting that a sticky bit is not used in this implementation.\"}]","AN575 - IEEE 754 Compliant Floating Point Routines | PDF",1791807009,381,16,[149,153,157,161,165,169,173,177,181,185,189,194,199,204,208,213],{"page_no":22,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/e67da0d4cb81466526352c8cefd4bca5.webp",983,1272,{"page_no":26,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ea22b8f561b3eb5d152a03bdfc873b6e.webp",982,1270,{"page_no":30,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f77094e2573d3eaad73d12cb7dab0b70.webp",981,1269,{"page_no":33,"url":162,"width":163,"height":164},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/d689303e2ff5dd6e4924d3e2583dca53.webp",980,1268,{"page_no":97,"url":166,"width":167,"height":168},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/635a40b8f49249409811df430cebc8d3.webp",979,1267,{"page_no":102,"url":170,"width":171,"height":172},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/34eada7e1f951d7a17bdc0be4a6eedc1.webp",978,1265,{"page_no":106,"url":174,"width":175,"height":176},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/4c9640fbdc35701cef1505b6aa979aea.webp",977,1264,{"page_no":111,"url":178,"width":179,"height":180},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/b727910e12c27dd3cef6f6d30bd53fb8.webp",976,1263,{"page_no":116,"url":182,"width":183,"height":184},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/d3852cface3568ddec375059c836217e.webp",975,1261,{"page_no":124,"url":186,"width":187,"height":188},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f5ca1ddd01b6056320038df41d761cc2.webp",974,1260,{"page_no":190,"url":191,"width":192,"height":193},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/95ecc013052e1268aeec90842f0960e8.webp",973,1259,{"page_no":195,"url":196,"width":197,"height":198},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/e25f3958a65e306dd3173f5dceaf6a6b.webp",972,1257,{"page_no":200,"url":201,"width":202,"height":203},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/7d41d5f755d266e2c785a8ea9abf3bcd.webp",971,1256,{"page_no":55,"url":205,"width":206,"height":207},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/dd323f22470a9d441ee75f1568670d0b.webp",970,1255,{"page_no":209,"url":210,"width":211,"height":212},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/39d0ed9b6949322119b636d0856a7062.webp",969,1254,{"page_no":147,"url":214,"width":215,"height":216},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/0417bb00f477dfdb7e04a28ebe57aae9.webp",968,1252,{"list":218,"token":11},[219,225,232,239,245,251,257,263,269,275],{"doc_id":220,"doc_title":221,"file_type":138,"home_preview_img_url":222,"slug":223,"view_count":102,"category_name":29,"create_tm":224},691821,"Arm Cortex-M33 Processor Datasheet","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002052502/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796406659&Signature=trgnPaNa%2FF%2B%2FSs7OnwdY469Lrs0%3D","arm-cortex-m33-processor-datasheet",1794176262,{"doc_id":226,"doc_title":227,"file_type":138,"home_preview_img_url":228,"slug":229,"view_count":230,"category_name":29,"create_tm":231},343239,"ALP: Adaptive Lossless Floating-Point Compression","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229910747256/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796406659&Signature=qo0ewkFJqC2tD2Vz7qunZSLQVdI%3D","alp-adaptive-lossless-floating-point-compression",21,1790050396,{"doc_id":233,"doc_title":234,"file_type":138,"home_preview_img_url":235,"slug":236,"view_count":237,"category_name":29,"create_tm":238},640493,"Modbus® RTU Serial Communications User Manual - Revision T - February 2013","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229970404431/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796406659&Signature=5sK%2B1LT20iWaDdrS66IP0U7r17c%3D","modbus-rtu-serial-communications-user-manual-revision-t-february-2013",26,1792709649,{"doc_id":240,"doc_title":241,"file_type":138,"home_preview_img_url":242,"slug":243,"view_count":106,"category_name":29,"create_tm":244},690306,"AURIX™ 32-bit TC4Dx A-step COM Datasheet - v1.1","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002016053/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796406659&Signature=sPmCwMz%2BPnid9Icz9AUUemlFWTs%3D","aurix-32-bit-tc4dx-a-step-com-datasheet-v11",1794162298,{"doc_id":246,"doc_title":247,"file_type":138,"home_preview_img_url":248,"slug":249,"view_count":200,"category_name":29,"create_tm":250},690258,"SAM4E Series - Datasheet","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002605879/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796406659&Signature=9H%2FXv2WCAHFewTYy93XnpJjhjzs%3D","sam4e-series-datasheet",1794159838,{"doc_id":252,"doc_title":253,"file_type":138,"home_preview_img_url":254,"slug":255,"view_count":106,"category_name":29,"create_tm":256},700213,"Apollo MCU Datasheet - Ultra-Low Power MCU Family - Key Features and Applications","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012018372/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796406659&Signature=vyZixzAfcooadtZQH33oQBEj03s%3D","apollo-mcu-datasheet-ultra-low-power-mcu-family-key-features-and-applications",1794517077,{"doc_id":258,"doc_title":259,"file_type":138,"home_preview_img_url":260,"slug":261,"view_count":116,"category_name":29,"create_tm":262},686447,"GOLD_E_F_Modbus_260227 - Modbus RTU/TCP - Supported Commands & Coil Status","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000839103/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796406659&Signature=lhO%2FcS%2F7CYaJnXbgEsgF86fMYT4%3D","gold_e_f_modbus_260227-modbus-rtutcp-supported-commands-coil-status",1794043891,{"doc_id":264,"doc_title":265,"file_type":138,"home_preview_img_url":266,"slug":267,"view_count":102,"category_name":29,"create_tm":268},682215,"Integers and floats - Python programming style guidance","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229998448523/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796406659&Signature=%2BKFsy1fQFBDSsdKjNqZut5T11qo%3D","integers-and-floats-python-programming-style-guidance",1793963004,{"doc_id":270,"doc_title":271,"file_type":138,"home_preview_img_url":272,"slug":273,"view_count":190,"category_name":29,"create_tm":274},646208,"x86-64 Assembly Language Programming with Ubuntu - 1.1.28 - January 2019","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229971799316/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796406659&Signature=YHPPlkkJLDUfvGE1MDzecYvt%2FjE%3D","x86-64-assembly-language-programming-with-ubuntu-1128-january-2019",1792753408,{"doc_id":276,"doc_title":277,"file_type":138,"home_preview_img_url":278,"slug":279,"view_count":151,"category_name":29,"create_tm":280},115355,"Claude AI Bible - The Complete Guide to Mastering Claude, Claude Code, Claude Cowork, MCP, AI Agents, Automation & Advanced Prompting","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229831893665/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796406659&Signature=E1uGdVTytL75bD9YJemMGHIc5fg%3D","claude-ai-bible-the-complete-guide-to-mastering-claude-claude-code-claude-cowork-mcp-ai-agents-automation-advanced-prompting",1785472614]