A Base Conversion Method for Floating Point Numbers in Go
Creators: name: Chew, Kean Ho
Publisher: name: Zenodo
Year: 2019
Subjects: Go
Floating-Point Number
Base Numbering Conversion

description: In mathematics and computer science, for a given real number, there are situations where we need to perform base number conversion. Floating point numbers are known for their very large and very small number representations such as beyond CPU 64-bit integer supporting range at the expense of loosely controlled accuracy. In Go, floating-point number conversion is only limited to Base-10 to Base-2 numbering representations. To convert into other base number representations like Base-8, Base-16, Base-9, the converter is currently unavailable. To support such conversion, there is a need to investigate a way to convert floating-point number from one base numbering representation to another. This paper first reviews floating-point number fundamentals like working mechanism in mathematics and computer science domains. The goal is to understand floating point number’s role and working mechanisms. Then, the paper reviews its definitions, parts, requirements, tradeoff, and operating algorithms related to seek out available math functionalities in Go programming language. Next the paper derives and tests the base conversion algorithm based on the available resources. Lastly, the paper specifies its limitation based on the test results and concluded the derived algorithm.
description: {"references": ["JEREMY R. JOHNSON ANATOLE D. RUSLANOV WILLIAM M. MONGAN, 2004, \"Lecture 14: Floating Point Arithmetic\", System Architecture, Drexel University - Depart of Computer Science, viewed October 18, 2019, available at: https://www.cs.drexel.edu/~jjohnson/2012-13/fall/cs281/lectures/pdf/cs281_lec14.pdf", "JEAN-MICHEL MULLER NICOLAS BRISEBARRE FLORENT DE DINECHIN CLAUDE-PIERRE JEANNEROD VINCENT LEFEVRE ` GUILLAUME MELQUIOND NATHALIE REVOL DAMIEN STEHLE\u00b4 SERGE TORRES, 2010, \"Handbook of Floating-Point Arithmetic\", ISBN: 978-0-8176-4704-9, DOI: 10.1007/978-0-8176-4705-6, Birkh\u00a8auser Boston, a part of Springer Science+Business Media, LLC, viewed October 18, 2019, available at: https://doc.lagout.org/science/0_Computer%20Science/3_Theory/Handbook%20of%20Floating%20Point%20Arithmetic.pdf", "ERIK BRUNVAND, 2011, \"Floating Point Arithmetic\", VLSI Architecture, CS/EE 5830/6830, University of Utah - School of Computing, viewed October 18, 2019, available at: https://my.eng.utah.edu/~cs5830/Slides/FP5830x2.pdf", "GOLANG.ORG, 2019, \"Package math\", Golang.org Package Documentations, Golang.Org, viewed October 24, 2019, available at: https://golang.org/pkg/math/", "CRYPTABLE, 2015, \"ASN1Real.java\", asn1compiler, line 91, Cryptable via Github.Inc, viewed October 24, 2019, available at: https://github.com/cryptable/asn1compiler/blob/master/src/main/java/org/cryptable/asn1/runtime/ASN1Real.java#L91", "DOUGLAS A. KERR, 2011, \"Scientific Notation and Floating Point Representation\", The Pumpkin Library, dougkerr.net, viewed October 24, 2019, available at: http://dougkerr.net/Pumpkin/articles/Scientific_Floating.pdf", "JUSTIN C. KLEIN KEANE, n.d., \"Converting a Decimal Digit to IEEE 754 Binary Floating Point\", madirish.net, viewed October 24, 2019, available at: http://www.madirish.net/240", "BINARY-SYSTEM.BASE-CONVERSION.RO, 2019, \"Base ten decimal number 12.375 converted to 32 bit single precision IEEE 754 binary floating point standard\", binary-system.base-conversion.ro, viewed October 24, 2019, available at: https://binary-system.base-conversion.ro/real-number-converted-from-decimal-system-to-32bit-single-precision-IEEE754-binary-floating-point.php?decimal_number_base_ten=12.375&amp;sign=0&amp;exponent=10000010&amp;mantissa=10001100000000000000000", "KRISTER WALFRIDSSON, 2017, \"Integer Division is Slow\", Krister Walfridsson's Blog, Blogger.com, viewed Oct 24, 2019, available at: https://kristerw.blogspot.com/2017/05/integer-division-is-slow.html", "AGNER FOG, 2019, \"Instruction Tables - Lists of instruction latencies, throughputs and micro-operation breakdowns for Intel, AMD, and VIA CPUs\", Technical University of Denmark, viewed October 24, 2019, available at: https://www.agner.org/optimize/instruction_tables.pdf", "GOOGLE, 2019, \"Package strconv\", Golang.org Package Documentations, viewed October 30, 2019, available at: https://golang.org/pkg/strconv/#FormatFloat", "GOOGLE, 2019, \"Package big\", Golang.org Package Documentations, Golang.Org, viewed October 30, 2019, available at: https://golang.org/pkg/math/big/", "YURY STROZHEVSKY, 2012, \"ASN.1 by Simple Words\", free docs, strozhevsky.com, viewed October 31, 2019, available at: https://www.strozhevsky.com/free_docs/asn1_in_simple_words.pdf", "ERIKR, 2015, \"Encoding and decoding ASN.1 REAL with BER\", Stack Overflow, Stack Exchange Inc., viewed October 31, 2019, available at: https://stackoverflow.com/questions/28166194/encoding-and-decoding-asn-1-real-with-ber", "PYTHON PROGRAMMING LANGUAGE, 2019, \"15. Floating Point Arithmetic: Issues and Limitations\", Documentation &gt; The Python Tutorial, Python Software Foundation, viewed November 2, 2019, available at: https://docs.python.org/3/tutorial/floatingpoint.html", "J J O'CONNOR, E F ROBERTSON, 2000, \"Babylonian numerals\", Babylonian History, School of Mathematics and Statistics University of St Andrews, Scotland, viewed November 2, 2019, available at: https://www-history.mcs.st-and.ac.uk/~history/HistTopics/Babylonian_numerals.html", "CHEW KEAN HO, LIM LEE BOOI, 2019, \"Large Scale Unit Testing for Go Programming Language Packages\", ResearchGate.net, viewed 12 November 2019, available at: http://doi.org/10.13140/RG.2.2.36308.76166"]}