Jon: If people want simplicity to attract people who want to port COBOL code and generate new code for financial users that have used only COBOL in the past, a new class defined through JTC1 and other international standards is definitely the way to go.
The most important library functions to watch are the log and exponentiation functions because these will be used for the commonly-used interest rate computations. You can ensure robustness with external decimal arithmetic in a context of what-we-would-see-as-absurd overflows of 10^4096 and such by operating on the exponent separately in both the log and exponentiation functions. Accuracy and word length checks can fork to quad precision when necessary; anything beyond that should be rare enough to allow evocation of an error message for a first cut; you may never have a need for more digits. Speed is likely important in the log and exponential functions because large programs that use thousands or even millions of interest rate computations are quite common, and logarithmic analysis of equities performance is the rule out there. I would not expect speed to be as important in the trigonometric functions and such so a careful, maintainable set of algorithms that deal simply and robustly with external decimal arithmetic formats is probably best for those in a first generation library. James K Beard -----Original Message----- From: Jon [mailto:[email protected]] On Behalf Of JonY Sent: Sunday, April 03, 2011 9:25 PM To: [email protected]; [email protected] Subject: Re: [Mingw-w64-public] mingw-w64 Decimal Floating Point math -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 4/3/2011 22:07, James K Beard wrote: > A quick glance through the document seems to tell us that the decimal > arithmetic will incorporate checks to ensure that any rounding in binary > floating point does not compromise the accuracy of the final decimal result. > That s pretty much what I was suggesting in my message of March 26 below. > The JTC1 Committee is apparently considering putting it in the standard. > This could be a very good thing for people porting code from COBOL, and > useful for new applications in environments previously restricted to COBOL > such as the banking and accounting industries. > > > > James K Beard > Guess I'll start mapping the math functions using simple type casting when I get the time, libgcc already have those routines. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) iEYEARECAAYFAk2ZHgQACgkQp56AKe10wHfHSwCeOcyUzonWzg980dItyv5FF5+I 2twAn0lrttuuGhEjuTVy0xpulM9v0GYH =Ggsw -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
