Skip to main content

2018 | OriginalPaper | Buchkapitel

9. Software Implementation of Floating-Point Arithmetic

verfasst von : Jean-Michel Muller, Nicolas Brunie, Florent de Dinechin, Claude-Pierre Jeannerod, Mioara Joldes, Vincent Lefèvre, Guillaume Melquiond, Nathalie Revol, Serge Torres

Erschienen in: Handbook of Floating-Point Arithmetic

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

The previous chapter has presented the basic paradigms used for implementing floating-point arithmetic in hardware. However, some processors may not have such dedicated hardware, mainly for cost reasons. When it is necessary to handle floating-point numbers on such processors, one solution is to implement floating-point arithmetic in software.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
2
That bit is not actually stored in the floating-point representation. It is easily obtained from the exponent field, and we will use it many times.
 
3
VLIW is an acronym for very long instruction word.
 
5
We remind the reader that we have assumed at the beginning of this section that x and y are nonzero.
 
6
Since is upper bounded by the largest binary floating-point number strictly less than 2, this is not specific to rounding to nearest ties to even.
 
7
This is not the case when d < e min since in that case lies in the subnormal range; see the FLIP library on how to handle such cases.
 
8
We have used a minimax-like approximation and not, for example, a simpler Taylor-like polynomial 1 − t + t 2t 3 + ⋯ because, as detailed in [293], the domain \(\mathcal{T}\) on which a(t) should approximate 1∕(1 + t) is [0, 1 − 21−p] and thus contains values that are close to 1.
 
9
See Section 10.​3.​4 of this book, as well as http://​sollya.​gforge.​inria.​fr/​ and Lauter’s Ph.D. dissertation [371].
 
11
For the square root, the situation will be a little simpler since the output cannot be a subnormal number.
 
12
Note however that the IEEE 754 standards require that \(\sqrt{-0} = -0\), a special case which is covered in Section 9.5.1.
 
13
The latter is of course still true for \(\mathop{\circ }\nolimits \in \{\mathop{\mathrm{RZ}}\nolimits,\mathop{\mathrm{RD}}\nolimits \}\), but not for \(\mathop{\circ }\nolimits =\mathop{ \mathrm{RU}}\nolimits\), as shown in [292].
 
14
Although the square root is a univariate function, the real \(\ell= \sqrt{2^{c } \cdot m_{x}'}\) depends on c and m x ′. Hence, + 2−25 may be considered as the exact value of a suitable function \(F: S \times \mathcal{T} \rightarrow \mathbb{R}\).
 
Literatur
[3]
Zurück zum Zitat R. C. Agarwal, F. G. Gustavson, and M. S. Schmookler. Series approximation methods for divide and square root in the Power3TM processor. In 14th IEEE Symposium on Computer Arithmetic (ARITH-14), pages 116–123, April 1999. R. C. Agarwal, F. G. Gustavson, and M. S. Schmookler. Series approximation methods for divide and square root in the Power3TM processor. In 14th IEEE Symposium on Computer Arithmetic (ARITH-14), pages 116–123, April 1999.
[14]
Zurück zum Zitat C. Anderson, N. Astafiev, and S. Story. Accurate math functions on the Intel IA-32 architecture: A performance-driven design. In Real Numbers and Computers, pages 93–105, July 2006. C. Anderson, N. Astafiev, and S. Story. Accurate math functions on the Intel IA-32 architecture: A performance-driven design. In Real Numbers and Computers, pages 93–105, July 2006.
[78]
Zurück zum Zitat C. Bruel. If-conversion SSA framework for partially predicated VLIW architectures. In 4th Workshop on Optimizations for DSP and Embedded Systems (ODES), New York, NY, USA, March 2006. C. Bruel. If-conversion SSA framework for partially predicated VLIW architectures. In 4th Workshop on Optimizations for DSP and Embedded Systems (ODES), New York, NY, USA, March 2006.
[116]
Zurück zum Zitat M. Cornea, C. Anderson, J. Harrison, P. T. P. Tang, E. Schneider, and C. Tsen. A software implementation of the IEEE 754R decimal floating-point arithmetic using the binary encoding format. In 18th IEEE Symposium on Computer Arithmetic (ARITH-18), pages 29–37, June 2007. M. Cornea, C. Anderson, J. Harrison, P. T. P. Tang, E. Schneider, and C. Tsen. A software implementation of the IEEE 754R decimal floating-point arithmetic using the binary encoding format. In 18th IEEE Symposium on Computer Arithmetic (ARITH-18), pages 29–37, June 2007.
[117]
Zurück zum Zitat M. Cornea, J. Harrison, C. Anderson, P. T. P. Tang, E. Schneider, and E. Gvozdev. A software implementation of the IEEE 754R decimal floating-point arithmetic using the binary encoding format. IEEE Transactions on Computers, 58(2):148–162, 2009.MathSciNetCrossRef M. Cornea, J. Harrison, C. Anderson, P. T. P. Tang, E. Schneider, and E. Gvozdev. A software implementation of the IEEE 754R decimal floating-point arithmetic using the binary encoding format. IEEE Transactions on Computers, 58(2):148–162, 2009.MathSciNetCrossRef
[118]
Zurück zum Zitat M. Cornea, J. Harrison, and P. T. P. Tang. Scientific Computing on Itanium ®; -based Systems. Intel Press, Hillsboro, OR, 2002. M. Cornea, J. Harrison, and P. T. P. Tang. Scientific Computing on Itanium ®; -based Systems. Intel Press, Hillsboro, OR, 2002.
[137]
Zurück zum Zitat B. de Dinechin. From machine scheduling to VLIW instruction scheduling. ST Journal of Research, 1(2), 2004. B. de Dinechin. From machine scheduling to VLIW instruction scheduling. ST Journal of Research, 1(2), 2004.
[187]
Zurück zum Zitat M. D. Ercegovac and T. Lang. Digital Arithmetic. Morgan Kaufmann Publishers, San Francisco, CA, 2004. M. D. Ercegovac and T. Lang. Digital Arithmetic. Morgan Kaufmann Publishers, San Francisco, CA, 2004.
[288]
Zurück zum Zitat C.-P. Jeannerod and J. Jourdan-Lu. Simultaneous floating-point sine and cosine for VLIW integer processors. In 23rd International Conference on Application-Specific Systems, Architectures and Processors (ASAP’12), pages 69–76, 2012. C.-P. Jeannerod and J. Jourdan-Lu. Simultaneous floating-point sine and cosine for VLIW integer processors. In 23rd International Conference on Application-Specific Systems, Architectures and Processors (ASAP’12), pages 69–76, 2012.
[289]
Zurück zum Zitat C.-P. Jeannerod, J. Jourdan-Lu, and C. Monat. Non-generic floating-point software support for embedded media processing. In IEEE Symposium on Industrial Embedded Systems (SIES’12), pages 283–286, 2012. C.-P. Jeannerod, J. Jourdan-Lu, and C. Monat. Non-generic floating-point software support for embedded media processing. In IEEE Symposium on Industrial Embedded Systems (SIES’12), pages 283–286, 2012.
[290]
Zurück zum Zitat C.-P. Jeannerod, J. Jourdan-Lu, C. Monat, and G. Revy. How to square floats accurately and efficiently on the ST231 integer processor. In 20th IEEE Symposium on Computer Arithmetic (ARITH-20), pages 77–81, Tübingen, Germany, July 2011. C.-P. Jeannerod, J. Jourdan-Lu, C. Monat, and G. Revy. How to square floats accurately and efficiently on the ST231 integer processor. In 20th IEEE Symposium on Computer Arithmetic (ARITH-20), pages 77–81, Tübingen, Germany, July 2011.
[291]
Zurück zum Zitat C.-P. Jeannerod, H. Knochel, C. Monat, and G. Revy. Faster floating-point square root for integer processors. In IEEE Symposium on Industrial Embedded Systems (SIES’07), pages 324–327, 2007. C.-P. Jeannerod, H. Knochel, C. Monat, and G. Revy. Faster floating-point square root for integer processors. In IEEE Symposium on Industrial Embedded Systems (SIES’07), pages 324–327, 2007.
[292]
Zurück zum Zitat C.-P. Jeannerod, H. Knochel, C. Monat, and G. Revy. Computing floating-point square roots via bivariate polynomial evaluation. IEEE Transactions on Computers, 60(2):214–227, 2011.MathSciNetCrossRef C.-P. Jeannerod, H. Knochel, C. Monat, and G. Revy. Computing floating-point square roots via bivariate polynomial evaluation. IEEE Transactions on Computers, 60(2):214–227, 2011.MathSciNetCrossRef
[293]
Zurück zum Zitat C.-P. Jeannerod, H. Knochel, C. Monat, G. Revy, and G. Villard. A new binary floating-point division algorithm and its software implementation on the ST231 processor. In 19th IEEE Symposium on Computer Arithmetic (ARITH-19), June 2009. C.-P. Jeannerod, H. Knochel, C. Monat, G. Revy, and G. Villard. A new binary floating-point division algorithm and its software implementation on the ST231 processor. In 19th IEEE Symposium on Computer Arithmetic (ARITH-19), June 2009.
[301]
Zurück zum Zitat C.-P. Jeannerod and G. Revy. Optimizing correctly-rounded reciprocal square roots for embedded VLIW cores. In 43rd Asilomar Conference on Signals, Systems, and Computers, pages 731–735, November 2009. C.-P. Jeannerod and G. Revy. Optimizing correctly-rounded reciprocal square roots for embedded VLIW cores. In 43rd Asilomar Conference on Signals, Systems, and Computers, pages 731–735, November 2009.
[311]
Zurück zum Zitat J. Jourdan-Lu. Custom floating-point arithmetic for integer processors: algorithms, implementation, and selection. Ph.D. thesis, Université de Lyon - ÉNS de Lyon, France, November 2012. J. Jourdan-Lu. Custom floating-point arithmetic for integer processors: algorithms, implementation, and selection. Ph.D. thesis, Université de Lyon - ÉNS de Lyon, France, November 2012.
[433]
Zurück zum Zitat C. Mouilleron and G. Revy. Automatic generation of fast and certified code for polynomial evaluation. In 20th IEEE Symposium on Computer Arithmetic, pages 233–242, 2011. C. Mouilleron and G. Revy. Automatic generation of fast and certified code for polynomial evaluation. In 20th IEEE Symposium on Computer Arithmetic, pages 233–242, 2011.
[509]
Zurück zum Zitat G. Revy. Implementation of binary floating-point arithmetic on embedded integer processors: polynomial evaluation-based algorithms and certified code generation. Ph.D. thesis, Université de Lyon - ÉNS de Lyon, France, December 2009. G. Revy. Implementation of binary floating-point arithmetic on embedded integer processors: polynomial evaluation-based algorithms and certified code generation. Ph.D. thesis, Université de Lyon - ÉNS de Lyon, France, December 2009.
Metadaten
Titel
Software Implementation of Floating-Point Arithmetic
verfasst von
Jean-Michel Muller
Nicolas Brunie
Florent de Dinechin
Claude-Pierre Jeannerod
Mioara Joldes
Vincent Lefèvre
Guillaume Melquiond
Nathalie Revol
Serge Torres
Copyright-Jahr
2018
DOI
https://doi.org/10.1007/978-3-319-76526-6_9